eth deploy updates

This commit is contained in:
Csongor Kiss 2022-01-26 16:15:10 +00:00 committed by Evan Gray
parent 3fc065846e
commit 3a24a26a7d
4 changed files with 85 additions and 4 deletions

22
ethereum/1conf.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/ethereum/contracts/bridge/Bridge.sol b/ethereum/contracts/bridge/Bridge.sol
index 3f06757f..6c70e6fa 100644
--- a/ethereum/contracts/bridge/Bridge.sol
+++ b/ethereum/contracts/bridge/Bridge.sol
@@ -58,7 +58,7 @@ contract Bridge is BridgeGovernance, ReentrancyGuard {
sequence = wormhole().publishMessage{
value : msg.value
- }(nonce, encoded, 15);
+ }(nonce, encoded, 1);
}
function wrapAndTransferETH(uint16 recipientChain, bytes32 recipient, uint256 arbiterFee, uint32 nonce) public payable returns (uint64 sequence) {
@@ -173,7 +173,7 @@ contract Bridge is BridgeGovernance, ReentrancyGuard {
sequence = wormhole().publishMessage{
value : callValue
- }(nonce, encoded, 15);
+ }(nonce, encoded, 1);
}
function updateWrapped(bytes memory encodedVm) external returns (address token) {

View File

@ -0,0 +1,12 @@
// run with:
// npm run deploy-bridge-implementation-only
// e.g. Ethereum Mainnet
// INFURA_KEY="" MNEMONIC="" npm run deploy-bridge-implementation-only -- --network mainnet
// e.g. BSC
// MNEMONIC="" npm run deploy-bridge-implementation-only -- --network binance
// e.g. Polygon
// MNEMONIC="" npm run deploy-bridge-implementation-only -- --network polygon
const BridgeImplementation = artifacts.require("BridgeImplementation");
module.exports = async function(deployer) {
await deployer.deploy(BridgeImplementation);
};

View File

@ -13,7 +13,7 @@
"@truffle/hdwallet-provider": "^1.7.0", "@truffle/hdwallet-provider": "^1.7.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"mocha": "^8.2.1", "mocha": "^8.2.1",
"truffle": "^5.3.6", "truffle": "^5.3.14",
"truffle-assertions": "^0.9.2", "truffle-assertions": "^0.9.2",
"truffle-plugin-verify": "^0.5.11" "truffle-plugin-verify": "^0.5.11"
}, },
@ -22,8 +22,9 @@
"test": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle test", "test": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle test",
"migrate": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle migrate --to 5", "migrate": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle migrate --to 5",
"flatten": "mkdir -p node_modules/@poanet/solidity-flattener/contracts && cp -r contracts/* node_modules/@poanet/solidity-flattener/contracts/ && poa-solidity-flattener", "flatten": "mkdir -p node_modules/@poanet/solidity-flattener/contracts && cp -r contracts/* node_modules/@poanet/solidity-flattener/contracts/ && poa-solidity-flattener",
"deploy_weth9": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle migrate --f 9", "verify": "patch -u -f node_modules/truffle-plugin-verify/constants.js -i truffle-verify-constants.patch; truffle run verify $npm_config_module@$npm_config_contract_address --network $npm_config_network",
"verify": "patch -u -f node_modules/truffle-plugin-verify/constants.js -i truffle-verify-constants.patch; truffle run verify $npm_config_module@$npm_config_contract_address --network $npm_config_network" "deploy-bridge-implementation-only": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle migrate --f 6",
"deploy_weth9": "mkdir -p build/contracts && cp node_modules/@openzeppelin/contracts/build/contracts/* build/contracts/ && truffle migrate --f 9"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@ -16,7 +16,7 @@ module.exports = {
), ),
network_id: 1, network_id: 1,
gas: 10000000, gas: 10000000,
gasPrice: 101000000000, gasPrice: 191000000000,
confirmations: 1, confirmations: 1,
timeoutBlocks: 200, timeoutBlocks: 200,
skipDryRun: false, skipDryRun: false,
@ -55,6 +55,52 @@ module.exports = {
gas: 70000000, gas: 70000000,
gasPrice: 8000000000, gasPrice: 8000000000,
}, },
binance_testnet: {
provider: () => new HDWalletProvider(
process.env.MNEMONIC,
"https://data-seed-prebsc-1-s1.binance.org:8545/"
),
network_id: "97",
gas: 70000000,
gasPrice: 8000000000,
},
polygon: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://polygon-rpc.com"
);
},
network_id: "137",
gas: 10000000,
gasPrice: 700000000000,
},
mumbai: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://polygon-mumbai.infura.io/v3/" + process.env.INFURA_KEY)
},
network_id: "80001",
},
avalanche: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://api.avax.network/ext/bc/C/rpc"
);
},
network_id: "43114",
gas: 8000000,
gasPrice: 26000000000,
},
fuji: {
provider: () => new HDWalletProvider(
process.env.MNEMONIC,
"https://api.avax-test.network/ext/bc/C/rpc"
),
network_id: "43113",
},
oasis: { oasis: {
provider: () => { provider: () => {
return new HDWalletProvider( return new HDWalletProvider(