Fantom deploy (#920)

* Truffle changes

* Always require fantomRPC
This commit is contained in:
bruce-riley 2022-02-28 15:32:22 -06:00 committed by GitHub
parent 0642288697
commit 60363dd3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 16 deletions

View File

@ -0,0 +1,14 @@
# Fantom mainnet env
# Rename to .env to use with truffle migrations
# Wormhole Core Migrations
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
INIT_CHAIN_ID=0xa
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=0xa
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
BRIDGE_INIT_WETH=0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83

View File

@ -132,6 +132,18 @@ module.exports = {
gas: 70000000,
gasPrice: 8000000000,
},
fantom: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://rpc.ftm.tools/"
)
},
network_id: 250,
gas: 8000000,
gasPrice: 3000000000000,
timeoutBlocks: 15000,
},
fantom_testnet: {
provider: () => {
return new HDWalletProvider(

View File

@ -372,6 +372,12 @@ func runNode(cmd *cobra.Command, args []string) {
if *oasisRPC == "" {
logger.Fatal("Please specify --oasisRPC")
}
if *fantomRPC == "" {
logger.Fatal("Please specify --fantomRPC")
}
if *fantomContract == "" && !*unsafeDevMode {
logger.Fatal("Please specify --fantomContract")
}
if *testnetMode {
if *ethRopstenRPC == "" {
logger.Fatal("Please specify --ethRopstenRPC")
@ -379,12 +385,6 @@ func runNode(cmd *cobra.Command, args []string) {
if *ethRopstenContract == "" {
logger.Fatal("Please specify --ethRopstenContract")
}
if *fantomRPC == "" {
logger.Fatal("Please specify --fantomRPC")
}
if *fantomContract == "" {
logger.Fatal("Please specify --fantomContract")
}
} else {
if *ethRopstenRPC != "" {
logger.Fatal("Please do not specify --ethRopstenRPC in non-testnet mode")
@ -392,12 +392,6 @@ func runNode(cmd *cobra.Command, args []string) {
if *ethRopstenContract != "" {
logger.Fatal("Please do not specify --ethRopstenContract in non-testnet mode")
}
if *fantomRPC == "" {
logger.Fatal("Please do not specify --fantomRPC in non-testnet mode")
}
if *fantomContract == "" {
logger.Fatal("Please do not specify --fantomContract in non-testnet mode")
}
}
if *nodeName == "" {
logger.Fatal("Please specify --nodeName")
@ -706,15 +700,15 @@ func runNode(cmd *cobra.Command, args []string) {
ethereum.NewEthWatcher(*oasisRPC, oasisContractAddr, "oasis", common.ReadinessOasisSyncing, vaa.ChainIDOasis, lockC, nil, 1, chainObsvReqC[vaa.ChainIDOasis]).Run); err != nil {
return err
}
if err := supervisor.Run(ctx, "fantomwatch",
ethereum.NewEthWatcher(*fantomRPC, fantomContractAddr, "fantom", common.ReadinessFantomSyncing, vaa.ChainIDFantom, lockC, nil, 1, chainObsvReqC[vaa.ChainIDFantom]).Run); err != nil {
return err
}
if *testnetMode {
if err := supervisor.Run(ctx, "ethropstenwatch",
ethereum.NewEthWatcher(*ethRopstenRPC, ethRopstenContractAddr, "ethropsten", common.ReadinessEthRopstenSyncing, vaa.ChainIDEthereumRopsten, lockC, setC, 1, chainObsvReqC[vaa.ChainIDEthereumRopsten]).Run); err != nil {
return err
}
if err := supervisor.Run(ctx, "fantomwatch",
ethereum.NewEthWatcher(*fantomRPC, fantomContractAddr, "fantom", common.ReadinessFantomSyncing, vaa.ChainIDFantom, lockC, nil, 1, chainObsvReqC[vaa.ChainIDFantom]).Run); err != nil {
return err
}
}
// Start Terra watcher only if configured