-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from VenusProtocol/feat/ven-2875
[VEN-2875] [VEN-2877] Deploy XVS and XVS Bridge on Base Sepolia and Mainnet
- Loading branch information
Showing
108 changed files
with
52,487 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
import { parseUnits } from "ethers/lib/utils"; | ||
import { NETWORK_ADDRESSES } from "src/networkAddresses"; | ||
import { LzChainId } from "src/types"; | ||
import { makeProposal } from "src/utils"; | ||
|
||
const { basemainnet } = NETWORK_ADDRESSES; | ||
|
||
const ACM = "0x9E6CeEfDC6183e4D0DF8092A9B90cDF659687daB"; | ||
|
||
export const XVS_BRIDGE_ADMIN_PROXY = "0x6303FEcee7161bF959d65df4Afb9e1ba5701f78e"; | ||
export const XVS = "0xebB7873213c8d1d9913D8eA39Aa12d74cB107995"; | ||
export const XVS_BRIDGE_DEST = "0x3dD92fB51a5d381Ae78E023dfB5DD1D45D2426Cd"; | ||
|
||
export const OPBNB_TRUSTED_REMOTE = "0x100D331C1B5Dcd41eACB1eCeD0e83DCEbf3498B2"; | ||
export const ETHEREUM_TRUSTED_REMOTE = "0x888E317606b4c590BBAD88653863e8B345702633"; | ||
export const BNB_MAINNET_TRUSTED_REMOTE = "0xf8F46791E3dB29a029Ec6c9d946226f3c613e854"; | ||
export const ARBITRUM_REMOTE = "0x20cEa49B5F7a6DBD78cAE772CA5973eF360AA1e6"; | ||
export const ZYSYNC_REMOTE = "0x16a62B534e09A7534CD5847CFE5Bf6a4b0c1B116"; | ||
export const OP_TRUSTED_REMOTE = "0xbBe46bAec851355c3FC4856914c47eB6Cea0B8B4"; | ||
|
||
export const XVS_MINT_LIMIT = parseUnits("500000", 18); | ||
|
||
const vip001 = () => { | ||
return makeProposal([ | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setSendVersion(uint16)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setReceiveVersion(uint16)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "forceResumeReceive(uint16,bytes)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setOracle(address)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setMaxSingleTransactionLimit(uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setMaxDailyLimit(uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setMaxSingleReceiveTransactionLimit(uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setMaxDailyReceiveLimit(uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "pause()", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "unpause()", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "removeTrustedRemote(uint16)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "dropFailedMessage(uint16,bytes,uint64)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setPrecrime(address)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setMinDstGas(uint16,uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setPayloadSizeLimit(uint16,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setWhitelist(address,bool)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setConfig(uint16,uint16,uint256,bytes)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "sweepToken(address,address,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "updateSendAndCallEnabled(bool)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "mint(address,uint256)", XVS_BRIDGE_DEST], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "burn(address,uint256)", XVS_BRIDGE_DEST], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "setTrustedRemoteAddress(uint16,bytes)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS_BRIDGE_ADMIN_PROXY, "transferBridgeOwnership(address)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "migrateMinterTokens(address,address)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "setMintCap(address,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "updateBlacklist(address,bool)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "pause()", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [XVS, "unpause()", basemainnet.GUARDIAN], | ||
}, | ||
{ target: XVS_BRIDGE_ADMIN_PROXY, signature: "acceptOwnership()", params: [] }, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.bscmainnet, BNB_MAINNET_TRUSTED_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.opbnbmainnet, OPBNB_TRUSTED_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.ethereum, ETHEREUM_TRUSTED_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.arbitrumone, ARBITRUM_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.zksyncmainnet, ZYSYNC_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setTrustedRemoteAddress(uint16,bytes)", | ||
params: [LzChainId.opmainnet, OP_TRUSTED_REMOTE], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setWhitelist(address,bool)", | ||
params: [basemainnet.VTREASURY, true], | ||
}, | ||
{ | ||
target: XVS_BRIDGE_ADMIN_PROXY, | ||
signature: "setWhitelist(address,bool)", | ||
params: [basemainnet.GUARDIAN, true], | ||
}, | ||
{ | ||
target: XVS, | ||
signature: "setMintCap(address,uint256)", | ||
params: [XVS_BRIDGE_DEST, XVS_MINT_LIMIT], | ||
}, | ||
]); | ||
}; | ||
|
||
export default vip001; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { NETWORK_ADDRESSES } from "src/networkAddresses"; | ||
import { makeProposal } from "src/utils"; | ||
|
||
const { basemainnet } = NETWORK_ADDRESSES; | ||
|
||
export const XVS_STORE = "0x11b084Cfa559a82AAC0CcD159dBea27899c7955A"; | ||
export const ACM = "0x9E6CeEfDC6183e4D0DF8092A9B90cDF659687daB"; | ||
|
||
const vip002 = () => { | ||
return makeProposal([ | ||
{ | ||
target: basemainnet.XVS_VAULT_PROXY, | ||
signature: "_acceptAdmin()", | ||
params: [], | ||
}, | ||
|
||
{ | ||
target: XVS_STORE, | ||
signature: "acceptAdmin()", | ||
params: [], | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [basemainnet.XVS_VAULT_PROXY, "pause()", basemainnet.GUARDIAN], | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [basemainnet.XVS_VAULT_PROXY, "resume()", basemainnet.GUARDIAN], | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [basemainnet.XVS_VAULT_PROXY, "add(address,uint256,address,uint256,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [basemainnet.XVS_VAULT_PROXY, "set(address,uint256,uint256)", basemainnet.GUARDIAN], | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [basemainnet.XVS_VAULT_PROXY, "setRewardAmountPerBlockOrSecond(address,uint256)", basemainnet.GUARDIAN], // func name changed from setRewardAmountPerBlock to setRewardAmountPerBlockOrSecond | ||
}, | ||
|
||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [ | ||
basemainnet.XVS_VAULT_PROXY, | ||
"setWithdrawalLockingPeriod(address,uint256,uint256)", | ||
basemainnet.GUARDIAN, | ||
], | ||
}, | ||
|
||
{ | ||
target: basemainnet.XVS_VAULT_PROXY, | ||
signature: "add(address,uint256,address,uint256,uint256)", | ||
params: [basemainnet.XVS, 100, basemainnet.XVS, "0", 604800], | ||
}, | ||
{ | ||
target: basemainnet.XVS_VAULT_PROXY, | ||
signature: "pause()", | ||
params: [], | ||
}, | ||
]); | ||
}; | ||
|
||
export default vip002; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { NETWORK_ADDRESSES } from "src/networkAddresses"; | ||
import { makeProposal } from "src/utils"; | ||
|
||
const { basemainnet } = NETWORK_ADDRESSES; | ||
|
||
export const ACM = "0x9E6CeEfDC6183e4D0DF8092A9B90cDF659687daB"; | ||
export const PSR = "0x3565001d57c91062367C3792B74458e3c6eD910a"; | ||
export const NATIVE_TOKEN_GATEWAY_CORE_POOL = "0x8e890ca3829c740895cdEACd4a3BE36ff9343643"; | ||
|
||
const vip003 = () => { | ||
return makeProposal([ | ||
{ | ||
target: PSR, | ||
signature: "acceptOwnership()", | ||
params: [], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [PSR, "addOrUpdateDistributionConfigs(DistributionConfig[])", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", | ||
params: [PSR, "removeDistributionConfig(Schema,address)", basemainnet.GUARDIAN], | ||
}, | ||
{ | ||
target: PSR, | ||
signature: "addOrUpdateDistributionConfigs((uint8,uint16,address)[])", | ||
params: [ | ||
[ | ||
[0, 10000, basemainnet.VTREASURY], | ||
[1, 10000, basemainnet.VTREASURY], | ||
], | ||
], | ||
}, | ||
{ | ||
target: PSR, | ||
signature: "setPoolRegistry(address)", | ||
params: [basemainnet.POOL_REGISTRY], | ||
}, | ||
{ | ||
target: NATIVE_TOKEN_GATEWAY_CORE_POOL, | ||
signature: "acceptOwnership()", | ||
params: [], | ||
}, | ||
]); | ||
}; | ||
|
||
export default vip003; |
Oops, something went wrong.