From fbb3da276a9cb871dfbb412bc9ef1952a0e7bd07 Mon Sep 17 00:00:00 2001 From: daniel1302 Date: Tue, 27 Sep 2022 15:57:58 -0500 Subject: [PATCH] feat: allow to specify Ethereum chain id --- config/config.yaml | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- token/service.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 41ca1a5..4d9c7f4 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -13,7 +13,7 @@ pricing: wallet: url: http://127.0.0.1:1789 token: - ethereumAPIAddress: https://127.0.0.1:8545 + ethereumChainID: 1440 erc20BridgeAddress: 0x9708FF7510D4A7B9541e1699d15b53Ecb1AFDc54 stakingBridgeAddress: 0x9135f5afd6F055e731bca2348429482eE614CFfA erc20TokenAddress: 0x1b8a1B6CBE5c93609b46D1829Cc7f3Cb8eeE23a0 diff --git a/go.mod b/go.mod index 2bd5626..66e5877 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ go 1.18 require ( code.vegaprotocol.io/priceproxy v0.1.0 code.vegaprotocol.io/protos v0.53.0 - code.vegaprotocol.io/shared v0.0.0-20220704150014-7c22d12ccb72 + code.vegaprotocol.io/shared v0.0.0-20220816105810-a519d6b44f35 code.vegaprotocol.io/vega v0.53.0 code.vegaprotocol.io/vegawallet v0.16.1 - github.com/ethereum/go-ethereum v1.10.20 + github.com/ethereum/go-ethereum v1.10.21 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 github.com/hashicorp/go-multierror v1.1.1 diff --git a/go.sum b/go.sum index f925b9e..4995821 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ code.vegaprotocol.io/priceproxy v0.1.0 h1:PibvUIcTXS/MOIJKJwGXhJbDwg9ZPLItcIlfMv code.vegaprotocol.io/priceproxy v0.1.0/go.mod h1:W/CpimpwdplSLOnO1gEz2+VLQIV5I9FsDOST+1NDJ5A= code.vegaprotocol.io/protos v0.53.0 h1:3Xl/2o+IWd3dxe1kHnLCbF5DqKq5AoiaI8rVIdpjcng= code.vegaprotocol.io/protos v0.53.0/go.mod h1:4BqwDw6jhc/mnwbXq8ZFUtYBFCnk8tBW6zuPsBt8OrQ= -code.vegaprotocol.io/shared v0.0.0-20220704150014-7c22d12ccb72 h1:BJwmbEbC+ujqLSA1dSyUwDOc4+aRoZcndj/RM210CtE= -code.vegaprotocol.io/shared v0.0.0-20220704150014-7c22d12ccb72/go.mod h1:P9MfU2GyzI4Vc7OrKx9+qN9JV0bNGFB/aYe0++e7158= +code.vegaprotocol.io/shared v0.0.0-20220816105810-a519d6b44f35 h1:k3jN0KvFQPu07hF4omfYU1CD4FwBZLsmVIRZ1F090hc= +code.vegaprotocol.io/shared v0.0.0-20220816105810-a519d6b44f35/go.mod h1:XzX67GsyOHzvytMr0QOHX4CCTdCZDYKUUi88rx40Nt0= code.vegaprotocol.io/vega v0.53.0 h1:GaJQxiQYbiyJZ8FZc9zV5PdzN4LR4HhgZPCN2RgVB2I= code.vegaprotocol.io/vega v0.53.0/go.mod h1:pBUCAGr1Sv1TbpX2QlXwor21k7QhEn9kQuZ6wXGhN1I= code.vegaprotocol.io/vegawallet v0.16.1 h1:BRRxCKMa6vaIVHBBzwlG8Sbm1+m2xh9h6QyRt2JwVJQ= @@ -238,8 +238,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= -github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= +github.com/ethereum/go-ethereum v1.10.21 h1:5lqsEx92ZaZzRyOqBEXux4/UR06m296RGzN3ol3teJY= +github.com/ethereum/go-ethereum v1.10.21/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= diff --git a/token/service.go b/token/service.go index 5a1a1db..40ba9b8 100644 --- a/token/service.go +++ b/token/service.go @@ -30,7 +30,7 @@ type Service struct { func NewService(conf *config.TokenConfig, vegaPubKey string) (*Service, error) { ctx := context.Background() - client, err := vgethereum.NewClient(ctx, conf.EthereumAPIAddress, 1440) + client, err := vgethereum.NewClient(ctx, conf.EthereumAPIAddress) if err != nil { return nil, fmt.Errorf("failed to create Ethereum client: %w", err) }