diff --git a/config/config.go b/config/config.go index 5a854f35..e7638b4c 100644 --- a/config/config.go +++ b/config/config.go @@ -145,6 +145,7 @@ type WalletConfig struct { type TokenConfig struct { EthereumAPIAddress string `yaml:"ethereumAPIAddress"` + EthereumChainID int `yaml:"ethereumChainID"` Erc20BridgeAddress string `yaml:"erc20BridgeAddress"` StakingBridgeAddress string `yaml:"stakingBridgeAddress"` ERC20TokenAddress string `yaml:"erc20TokenAddress"` diff --git a/config/config.yaml b/config/config.yaml index 41ca1a53..08a43034 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -14,6 +14,7 @@ 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/token/service.go b/token/service.go index 5a1a1dbd..48a78603 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, int64(conf.EthereumChainID)) if err != nil { return nil, fmt.Errorf("failed to create Ethereum client: %w", err) }