Skip to content

Commit e47979d

Browse files
feat(ethexe/contracts): add env to use existing WrappedVara address (#5245)
1 parent 91a0984 commit e47979d

File tree

8 files changed

+19
-9
lines changed

8 files changed

+19
-9
lines changed

ethexe/contracts/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ROUTER_VALIDATORS_LIST="0x0000000000000000000000000000000000000000,0x00000000000
1414
# address that receives half of WVARA token supply
1515
# SENDER_ADDRESS="0x0000000000000000000000000000000000000000" # optional, only for testing
1616

17+
# https://wiki.vara.network/docs/vara-network/bridge/developer_hub#ethereum-mainnet
18+
# override WrappedVara to Ethereum Mainnet address (optional)
19+
# EXISTING_WRAPPED_VARA="0xB67010F2246814e5c39593ac23A925D9e9d7E5aD" # ethereum address
20+
# override WrappedVara to Ethereum Testnet address (optional)
21+
# EXISTING_WRAPPED_VARA="0xE1ab85A8B4d5d5B6af0bbD0203EB322DF33d0464" # ethereum address
22+
1723
# In Proof of Authority (PoA) mode, Symbiotic contracts & Middleware will not be deployed
1824
# instead, POAMiddleware contract will be deployed
1925
IS_POA="true"

ethexe/contracts/script/Deployment.s.sol

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ contract DeploymentScript is Script {
3232

3333
vm.startBroadcast(privateKey);
3434

35-
wrappedVara = WrappedVara(
36-
Upgrades.deployUUPSProxy("WrappedVara.sol", abi.encodeCall(WrappedVara.initialize, (deployerAddress)))
37-
);
35+
if (vm.envExists("EXISTING_WRAPPED_VARA")) {
36+
wrappedVara = WrappedVara(vm.envAddress("EXISTING_WRAPPED_VARA"));
37+
} else {
38+
wrappedVara = WrappedVara(
39+
Upgrades.deployUUPSProxy("WrappedVara.sol", abi.encodeCall(WrappedVara.initialize, (deployerAddress)))
40+
);
41+
}
3842

3943
bool isPoa = vm.envExists("IS_POA") && vm.envBool("IS_POA");
4044

ethexe/ethereum/abi/BatchMulticall.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ethexe/ethereum/abi/Middleware.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ethexe/ethereum/abi/Mirror.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ethexe/ethereum/abi/POAMiddleware.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ethexe/ethereum/abi/Router.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ethexe/ethereum/abi/WrappedVara.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)