diff --git a/copy_contracts.sh b/copy_contracts.sh index bb342a3b..91a83cc3 100755 --- a/copy_contracts.sh +++ b/copy_contracts.sh @@ -16,6 +16,12 @@ mkdir -p ./contracts/protocol cp -rf ./node_modules/@venusprotocol/venus-protocol/contracts/ ./contracts/protocol/contracts rm -rf contracts/protocol/contracts/test +mkdir -p ./contracts/governance/contracts/Governance +mkdir -p ./contracts/governance/contracts/legacy +cp ./node_modules/@venusprotocol/governance-contracts/contracts/legacy/GovernorBravoDelegateV1.sol ./contracts/governance/contracts/legacy/GovernorBravoDelegateV1.sol +cp ./node_modules/@venusprotocol/governance-contracts/contracts/legacy/GovernorBravoInterfaces.sol ./contracts/governance/contracts/legacy/GovernorBravoInterfaces.sol +cp ./node_modules/@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol ./contracts/governance/contracts/Governance/GovernorBravoInterfaces.sol + rm contracts/protocol/contracts/Governance/GovernorBravoDelegate.sol rm contracts/protocol/contracts/Governance/GovernorBravoDelegator.sol rm contracts/protocol/contracts/Governance/Timelock.sol diff --git a/package.json b/package.json index 79230496..6ba8a2da 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,9 @@ "@types/mustache": "^4.2.1", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", - "@venusprotocol/governance-contracts": "^1.1.0-dev.1", + "@venusprotocol/governance-contracts": "^1.3.0", "@venusprotocol/isolated-pools": "2.1.0-dev.2", - "@venusprotocol/oracle": "^1.7.2", + "@venusprotocol/oracle": "^1.7.3-dev.1", "@venusprotocol/venus-protocol": "3.1.0", "assemblyscript": "0.19.23", "chai": "^4.3.6", diff --git a/packages/venus-governance-abis/XVSToken.json b/packages/venus-governance-abis/XVSToken.json deleted file mode 100644 index 6a512220..00000000 --- a/packages/venus-governance-abis/XVSToken.json +++ /dev/null @@ -1,308 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint32", "name": "", "type": "uint32" } - ], - "name": "checkpoints", - "outputs": [ - { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, - { "internalType": "uint96", "name": "votes", "type": "uint96" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "delegatee", "type": "address" }], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "delegatee", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "uint256", "name": "expiry", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "delegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getCurrentVotes", - "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "name": "getPriorVotes", - "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "numCheckpoints", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "src", "type": "address" }, - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/packages/venus-governance-abis/XVSVault.json b/packages/venus-governance-abis/XVSVault.json deleted file mode 100644 index 079097ee..00000000 --- a/packages/venus-governance-abis/XVSVault.json +++ /dev/null @@ -1,1211 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "XVSVault", - "sourceName": "contracts/XVSVault/XVSVault.sol", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ExecutedWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "allocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "rewardPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "name": "PoolAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldAllocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newAllocPoints", - "type": "uint256" - } - ], - "name": "PoolUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ReqestedWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldReward", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReward", - "type": "uint256" - } - ], - "name": "RewardAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "oldStore", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStore", - "type": "address" - } - ], - "name": "StoreUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldPeriod", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPeriod", - "type": "uint256" - } - ], - "name": "WithdrawalLockingPeriodUpdated", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVSVaultProxy", - "name": "xvsVaultProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - }, - { - "internalType": "contract IBEP20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardPerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_lockPeriod", - "type": "uint256" - } - ], - "name": "add", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "burnAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "executeWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getEligibleWithdrawalAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "withdrawalAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getRequestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getUserInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingWithdrawals", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getWithdrawalRequests", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockedUntil", - "type": "uint256" - } - ], - "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - } - ], - "name": "massUpdatePools", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingReward", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingXVSVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "poolInfos", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allocPoint", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastRewardBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accRewardPerShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "rewardToken", - "type": "address" - } - ], - "name": "poolLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "requestWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewardTokenAmountsPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - } - ], - "name": "set", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardAmount", - "type": "uint256" - } - ], - "name": "setRewardAmountPerBlock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newPeriod", - "type": "uint256" - } - ], - "name": "setWithdrawalLockingPeriod", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsStore", - "type": "address" - } - ], - "name": "setXvsStore", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalAllocPoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "updatePool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsStore", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055613b5f806100326000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c80637ac9245611610130578063a09eab7a116100b8578063de0368b21161007c578063de0368b2146104c9578063e7a324dc146104d1578063f1127ed8146104d9578063f851a440146104fa578063fba1b1f91461050257610232565b8063a09eab7a1461045d578063b4b5ea5714610470578063c210259614610483578063c3cda520146104a3578063d7ae45e2146104b657610232565b80638ed7333d116100ff5780638ed7333d146103de57806392e35000146103f157806393c7c4d11461041557806398e1b31b146104285780639e2b6c4d1461044a57610232565b80637ac924561461039d5780637ecebe00146103b057806381bdf98c146103c35780638308d7e9146103cb57610232565b80634298bdbd116101be5780635ff56315116101825780635ff563151461032f5780636dd77cbd146103425780636e9960c3146103555780636fcfff451461035d578063782d6fe11461037d57610232565b80634298bdbd146102db5780635362b503146102ee578063587cde1e146103015780635c19a95c146103145780635c60da1b1461032757610232565b806320606b701161020557806320606b701461029b57806324f52bbf146102a357806326782247146102b85780632eda5c6c146102c0578063358ae036146102d357610232565b80630af13728146102375780630efe6a8b14610260578063115b512f146102755780631d504dc614610288575b600080fd5b61024a610245366004612b9c565b610515565b60405161025791906136ca565b60405180910390f35b61027361026e366004612c5e565b61055b565b005b610273610283366004612c5e565b6107b9565b610273610296366004612d76565b61099b565b61024a610acf565b6102ab610ae6565b60405161025791906135f4565b6102ab610af5565b61024a6102ce366004612af6565b610b04565b6102ab610b16565b61024a6102e9366004612af6565b610b25565b6102736102fc366004612af6565b610b37565b6102ab61030f366004612af6565b610b71565b610273610322366004612af6565b610b8c565b6102ab610b96565b61027361033d366004612b32565b610ba5565b61024a610350366004612b9c565b610c5d565b6102ab610d12565b61037061036b366004612af6565b610d21565b6040516102579190613956565b61039061038b366004612b6c565b610d39565b604051610257919061397f565b6102736103ab366004612b6c565b610f48565b61024a6103be366004612af6565b611167565b610273611179565b6102736103d9366004612c5e565b6111ed565b6102736103ec366004612b6c565b61134b565b6104046103ff366004612b6c565b611363565b604051610257959493929190613750565b610273610423366004612b6c565b6113b8565b61043b610436366004612b9c565b61144c565b6040516102579392919061393b565b610273610458366004612c5e565b61149e565b61024a61046b366004612b9c565b611574565b61039061047e366004612af6565b61175d565b610496610491366004612b9c565b6117d0565b60405161025791906136b9565b6102736104b1366004612ca1565b611876565b61024a6104c4366004612af6565b6119f7565b6102ab611a12565b61024a611a21565b6104ec6104e7366004612d28565b611a2d565b604051610257929190613964565b6102ab611a62565b610273610510366004612be9565b611a71565b60006105218484611cc2565b506001600160a01b0380841660009081526007602090815260408083208684528252808320938516835292905220600201545b9392505050565b600354600160a01b900460ff1661058d5760405162461bcd60e51b81526004016105849061387d565b60405180910390fd5b6003805460ff60a01b191690556105a48383611cc2565b6001600160a01b03831660009081526008602052604081208054849081106105c857fe5b600091825260208083206001600160a01b0388168452600782526040808520888652835280852033865290925292206005909102909101915061060b8585611cf9565b8054156106c0576000610658826001015461064c64e8d4a5100061064087600301548760000154611e7c90919063ffffffff16565b9063ffffffff611eb616565b9063ffffffff611ef816565b6004805460405163135b33cd60e31b81529293506001600160a01b031691639ad99e689161068c918a913391879101613602565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b50505050505b81546106dd906001600160a01b031633308663ffffffff611f3a16565b80546106ef908463ffffffff611f9b16565b80825560038301546107129164e8d4a5100091610640919063ffffffff611e7c16565b600182015560055482546001600160a01b039081169116141561075357336000908152600f602052604081205461075391906001600160a01b031685611fc0565b83856001600160a01b0316336001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78660405161079791906136ca565b60405180910390a450506003805460ff60a01b1916600160a01b179055505050565b600354600160a01b900460ff166107e25760405162461bcd60e51b81526004016105849061387d565b6003805460ff60a01b191690556107f98383611cc2565b600081116108195760405162461bcd60e51b81526004016105849061385d565b6001600160a01b0383166000908152600760209081526040808320858452825280832033845290915290206002810154610859908363ffffffff611f9b16565b815410156108795760405162461bcd60e51b81526004016105849061390d565b6001600160a01b038416600090815260086020526040812080548590811061089d57fe5b600091825260208083206001600160a01b0389168452600a8252604080852089865283528085203386529092529083206005929092020160048101549093509091906108e99042611f9b565b90506108f784838784612152565b6005546001600160a01b038881169116141561093357336000908152600f6020526040812054610933916001600160a01b039091169087611fc0565b85876001600160a01b0316336001600160a01b03167fc0863fcc3a3b119da683cc8d57bce56f78d0d373c023726dea2aaf6ce3f837ac8860405161097791906136ca565b60405180910390a450506003805460ff60a01b1916600160a01b1790555050505050565b806001600160a01b031663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d457600080fd5b505afa1580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a0c9190810190612b14565b6001600160a01b0316336001600160a01b031614610a3c5760405162461bcd60e51b81526004016105849061391d565b806001600160a01b031663c1e803346040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610a7757600080fd5b505af1158015610a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610aaf9190810190612d94565b15610acc5760405162461bcd60e51b8152600401610584906138bd565b50565b604051610adb906135de565b604051809103902081565b6004546001600160a01b031681565b6001546001600160a01b031681565b60066020526000908152604090205481565b6005546001600160a01b031681565b60096020526000908152604090205481565b6001600160a01b038116600090815260086020526040812054905b81811015610b6c57610b648382611cf9565b600101610b52565b505050565b600f602052600090815260409020546001600160a01b031681565b610acc338261227c565b6002546001600160a01b031681565b6000546001600160a01b03163314610bcf5760405162461bcd60e51b81526004016105849061389d565b60058054600480546001600160a01b03198084166001600160a01b038881169190911790955581168585161790915560038054600160a01b60ff60a01b199091161790556040519183169216907f559f314bb90394a4a9ceb724f365b36a53587d894352c43d12901fd68010145690610c4f90849084908890889061362a565b60405180910390a150505050565b6000610c698484611cc2565b6001600160a01b038085166000908152600a60209081526040808320878452825280832093861683529290522080545b600081118015610cc95750610cc9826001830381548110610cb657fe5b906000526020600020906002020161230b565b15610d0957610cfe826001830381548110610ce057fe5b6000918252602090912060029091020154849063ffffffff611f9b16565b925060001901610c99565b50509392505050565b6000546001600160a01b031690565b60116020526000908152604090205463ffffffff1681565b6000438210610d5a5760405162461bcd60e51b81526004016105849061383d565b6001600160a01b03831660009081526011602052604090205463ffffffff1680610d88576000915050610f42565b6001600160a01b038416600090815260106020908152604080832063ffffffff600019860181168552925290912054168310610e04576001600160a01b03841660009081526010602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050610f42565b6001600160a01b038416600090815260106020908152604080832083805290915290205463ffffffff16831015610e3f576000915050610f42565b600060001982015b8163ffffffff168163ffffffff161115610f0257600282820363ffffffff16048103610e71612a87565b506001600160a01b038716600090815260106020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915290871415610edd57602001519450610f429350505050565b805163ffffffff16871115610ef457819350610efb565b6001820392505b5050610e47565b506001600160a01b038516600090815260106020908152604080832063ffffffff909416835292905220546001600160601b03600160201b909104169150505b92915050565b600354600160a01b900460ff16610f715760405162461bcd60e51b81526004016105849061387d565b6003805460ff60a01b19169055610f888282611cc2565b6001600160a01b0382166000908152600860205260408120805483908110610fac57fe5b600091825260208083206001600160a01b038716808552600783526040808620888752845280862033808852908552818720928752600a8552818720898852855281872090875290935291842060059093020193509161100c8383612315565b90506000811161102e5760405162461bcd60e51b8152600401610584906138cd565b6110388686611cf9565b6000611066846001015461064c64e8d4a5100061064089600301548960000154611e7c90919063ffffffff16565b6004805460405163135b33cd60e31b81529293506001600160a01b031691639ad99e689161109a918b913391879101613602565b600060405180830381600087803b1580156110b457600080fd5b505af11580156110c8573d6000803e3d6000fd5b505085546110df925090508363ffffffff611ef816565b80855560038601546111029164e8d4a5100091610640919063ffffffff611e7c16565b60018501558454611123906001600160a01b0316338463ffffffff6123c316565b85876001600160a01b0316336001600160a01b03167fe31da05fae6db869f5ea51f4b638aa6884070b6c87f18f63bd2291a12cb2f5188560405161097791906136ca565b600e6020526000908152604090205481565b6000546001600160a01b031633146111a35760405162461bcd60e51b81526004016105849061389d565b600080546040516001600160a01b03909116907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146112175760405162461bcd60e51b81526004016105849061389d565b6112218383611cc2565b61122a83610b37565b6001600160a01b038316600090815260086020526040902080546112a09083906112949084908790811061125a57fe5b60009182526020808320600160059093020191909101546001600160a01b038a16835260099091526040909120549063ffffffff611ef816565b9063ffffffff611f9b16565b6001600160a01b03851660009081526009602052604081209190915581548290859081106112ca57fe5b9060005260206000209060050201600101549050828285815481106112eb57fe5b90600052602060002090600502016001018190555083856001600160a01b03167f6ee09c6cb801194690c195c69f465aaf7c80255cbeafaab9600f47ed79de2ca9838660405161133c92919061392d565b60405180910390a35050505050565b6113558282611cc2565b61135f8282611cf9565b5050565b6008602052816000526040600020818154811061137c57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b039093169550909350919085565b6000546001600160a01b031633146113e25760405162461bcd60e51b81526004016105849061389d565b6113eb82610b37565b6001600160a01b0382166000818152600660205260409081902080549084905590519091907fad96cee0d692f0250b98e085504f399da6733854908215f6203fe3c69366d9f59061143f908490869061392d565b60405180910390a2505050565b600080600061145b8686611cc2565b5050506001600160a01b03928316600090815260076020908152604080832094835293815283822092909416815292529020805460018201546002909201549092565b6000546001600160a01b031633146114c85760405162461bcd60e51b81526004016105849061389d565b6114d28383611cc2565b600081116114f25760405162461bcd60e51b8152600401610584906138dd565b6001600160a01b038316600090815260086020526040812080548490811061151657fe5b9060005260206000209060050201905060008160040154905082826004018190555083856001600160a01b03167f0bcf80c5060ccf99b7a993c57a94b232fc2c5c04bd74c7c7d174595fee6bc31f838660405161133c92919061392d565b60006115808484611cc2565b6001600160a01b03841660009081526008602052604081208054859081106115a457fe5b600091825260208083206001600160a01b0389811685526007835260408086208a8752845280862089831687529093528285206005949094029091016003810154815493516370a0823160e01b8152919650939492909116906370a08231906116119030906004016135f4565b60206040518083038186803b15801561162957600080fd5b505afa15801561163d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116619190810190612d94565b6001600160a01b038916600090815260066020526040902054600286015491925043918211801561169157508215155b156117275760006116af876002015484611ef890919063ffffffff16565b6001600160a01b038c1660009081526009602052604081205460018a015492935090916116f79190610640906116eb868863ffffffff611e7c16565b9063ffffffff611e7c16565b9050611722611715866106408464e8d4a5100063ffffffff611e7c16565b879063ffffffff611f9b16565b955050505b61174f856001015461064c64e8d4a51000610640888a60000154611e7c90919063ffffffff16565b9a9950505050505050505050565b6001600160a01b03811660009081526011602052604081205463ffffffff16806117885760006117c7565b6001600160a01b0383166000908152601060209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9150505b919050565b60606117dc8484611cc2565b6001600160a01b038085166000908152600a602090815260408083208784528252808320938616835292815282822080548451818402810184019095528085529092909184015b8282101561186957838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611823565b5050505090509392505050565b6000604051611884906135de565b604080519182900382208282019091526008825267161594d5985d5b1d60c21b6020909201919091527fddfcc46608a8bd52ebf900f03a24cc97b73a6046cec8c5d0f74a211e376e967a6118d66123e5565b306040516020016118ea949392919061370d565b6040516020818303038152906040528051906020012090506000604051611910906135e9565b60405190819003812061192b918a908a908a906020016136d8565b604051602081830303815290604052805190602001209050600082826040516020016119589291906135ad565b604051602081830303815290604052805190602001209050600061197e828888886123e9565b6001600160a01b0381166000908152600e6020526040902080546001810190915590915089146119c05760405162461bcd60e51b81526004016105849061380d565b874211156119e05760405162461bcd60e51b8152600401610584906137fd565b6119ea818b61227c565b505050505b505050505050565b6001600160a01b031660009081526008602052604090205490565b6003546001600160a01b031681565b604051610adb906135e9565b601060209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6000546001600160a01b031681565b6000546001600160a01b03163314611a9b5760405162461bcd60e51b81526004016105849061389d565b6004546001600160a01b0316611ac35760405162461bcd60e51b8152600401610584906138ad565b611acc85610b37565b6001600160a01b0385166000908152600860205260408120805490915b81811015611b4757856001600160a01b0316838281548110611b0757fe5b60009182526020909120600590910201546001600160a01b03161415611b3f5760405162461bcd60e51b81526004016105849061388d565b600101611ae9565b506001600160a01b038716600090815260096020526040902054611b71908763ffffffff611f9b16565b6001600160a01b0388811660009081526009602090815260408083209490945560068152838220889055835160a08101855289841681528082018b81524382870190815260608301858152608084018b81528a5460018082018d558c8952969097209451600590970290940180546001600160a01b031916968816969096178655915185850155516002850155516003840155516004928301558154935163fb66fb4d60e01b8152939092169263fb66fb4d92611c30928c9201613683565b600060405180830381600087803b158015611c4a57600080fd5b505af1158015611c5e573d6000803e3d6000fd5b50505050846001600160a01b03166001838054905003886001600160a01b03167fd7fa4bff1cd2253c0789c3291a786a6f6b1a3b4569a75af683a15d52abb6a0bf898888604051611cb19392919061393b565b60405180910390a450505050505050565b6001600160a01b038216600090815260086020526040902054811061135f5760405162461bcd60e51b8152600401610584906137bd565b6001600160a01b0382166000908152600860205260408120805483908110611d1d57fe5b9060005260206000209060050201905080600201544311611d3e575061135f565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611d6e9030906004016135f4565b60206040518083038186803b158015611d8657600080fd5b505afa158015611d9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dbe9190810190612d94565b905080611dd257504360029091015561135f565b60028201544390600090611ded90839063ffffffff611ef816565b6001600160a01b03871660009081526009602090815260408083205460018901546006909352908320549394509192611e369291610640916116eb90879063ffffffff611e7c16565b9050611e65611e54856106408464e8d4a5100063ffffffff611e7c16565b60038701549063ffffffff611f9b16565b600386015550504360029093019290925550505050565b600082611e8b57506000610f42565b82820282848281611e9857fe5b04146105545760405162461bcd60e51b81526004016105849061386d565b600061055483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612413565b600061055483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061244a565b604051611f959085906323b872dd60e01b90611f5e90879087908790602401613668565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612476565b50505050565b6000828201838110156105545760405162461bcd60e51b81526004016105849061381d565b816001600160a01b0316836001600160a01b031614158015611feb57506000816001600160601b0316115b15610b6c576001600160a01b038316156120a3576001600160a01b03831660009081526011602052604081205463ffffffff16908161202b57600061206a565b6001600160a01b0385166000908152601060209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061209182856040518060600160405280602c8152602001613af1602c913961255b565b905061209f86848484612592565b5050505b6001600160a01b03821615610b6c576001600160a01b03821660009081526011602052604081205463ffffffff1690816120de57600061211d565b6001600160a01b0384166000908152601060209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061214482856040518060600160405280602b8152602001613a8e602b9139612747565b90506119ef85848484612592565b82546040805180820190915260008082526020808301828152600180860189558884529190922092516002850290930192835590519101555b6000811180156121bb5750818460018303815481106121a657fe5b90600052602060002090600202016001015411155b15612210578360018203815481106121cf57fe5b90600052602060002090600202018482815481106121e957fe5b6000918252602090912082546002909202019081556001918201549101556000190161218b565b60405180604001604052808481526020018381525084828154811061223157fe5b9060005260206000209060020201600082015181600001556020820151816001015590505061226d838660020154611f9b90919063ffffffff16565b85600201819055505050505050565b6001600160a01b038083166000908152600f6020526040812054909116906122a384612783565b6001600160a01b038581166000818152600f602052604080822080546001600160a01b031916898616908117909155905194955093928616927f0cc323ffec3ea49cbcddc0de1480978126d350c6a45dff33ad2f1cda6ae992619190a4611f95828483611fc0565b6001015442101590565b80546000905b6000811180156123385750612338836001830381548110610cb657fe5b156123a25761236d83600183038154811061234f57fe5b6000918252602090912060029091020154839063ffffffff611f9b16565b91508280548061237957fe5b60008281526020812060001992830160028102909101828155600101919091559091550161231b565b5060028301546123b8908263ffffffff611ef816565b600284015592915050565b604051610b6c90849063a9059cbb60e01b90611f5e908690869060240161369e565b4690565b60008060006123fa87878787612876565b9150915061240781612956565b5090505b949350505050565b600081836124345760405162461bcd60e51b8152600401610584919061379c565b50600083858161244057fe5b0495945050505050565b6000818484111561246e5760405162461bcd60e51b8152600401610584919061379c565b505050900390565b612488826001600160a01b0316612a1f565b6124a45760405162461bcd60e51b8152600401610584906138fd565b60006060836001600160a01b0316836040516124c091906135a1565b6000604051808303816000865af19150503d80600081146124fd576040519150601f19603f3d011682016040523d82523d6000602084013e612502565b606091505b5091509150816125245760405162461bcd60e51b8152600401610584906138ed565b805115611f95578080602001905161253f9190810190612d58565b611f955760405162461bcd60e51b8152600401610584906137ed565b6000836001600160601b0316836001600160601b03161115829061246e5760405162461bcd60e51b8152600401610584919061379c565b60006125b643604051806060016040528060388152602001613ab960389139612a58565b905060008463ffffffff161180156125ff57506001600160a01b038516600090815260106020908152604080832063ffffffff6000198901811685529252909120548282169116145b1561265e576001600160a01b0385166000908152601060209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b038516021790556126fd565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152601083528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252601190935292909220805460018801909316929091169190911790555b846001600160a01b03167f6adb589fed1e8542fb7a6b10f00a85e02265e77f9ae3ca8ff93b22983e1af9a0848460405161273892919061398d565b60405180910390a25050505050565b6000838301826001600160601b03808716908316101561277a5760405162461bcd60e51b8152600401610584919061379c565b50949350505050565b6005546000906001600160a01b03166127ae5760405162461bcd60e51b8152600401610584906137dd565b6005546001600160a01b03166000908152600860205260408120805490915b8181101561286b5760055483546001600160a01b03909116908490839081106127f257fe5b60009182526020909120600590910201546001600160a01b03161415612863576005546001600160a01b0390811660009081526007602090815260408083208584528252808320938916835292905220600281015481546128589163ffffffff611ef816565b9450505050506117cb565b6001016127cd565b506000949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128ad575060009050600361294d565b8460ff16601b141580156128c557508460ff16601c14155b156128d6575060009050600461294d565b6000600187878787604051600081526020016040526040516128fb9493929190613735565b6020604051602081039080840390855afa15801561291d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129465750600091506001905061294d565b9150600090505b94509492505050565b600081600481111561296457fe5b141561296f57610acc565b600181600481111561297d57fe5b141561299b5760405162461bcd60e51b8152600401610584906137ad565b60028160048111156129a957fe5b14156129c75760405162461bcd60e51b8152600401610584906137cd565b60038160048111156129d557fe5b14156129f35760405162461bcd60e51b81526004016105849061382d565b6004816004811115612a0157fe5b1415610acc5760405162461bcd60e51b81526004016105849061384d565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061240b575050151592915050565b600081600160201b8410612a7f5760405162461bcd60e51b8152600401610584919061379c565b509192915050565b604080518082019091526000808252602082015290565b8035610f4281613a4c565b8051610f4281613a4c565b8051610f4281613a60565b8035610f4281613a69565b8035610f4281613a72565b8051610f4281613a69565b8035610f4281613a7b565b8035610f4281613a84565b600060208284031215612b0857600080fd5b600061240b8484612a9e565b600060208284031215612b2657600080fd5b600061240b8484612aa9565b60008060408385031215612b4557600080fd5b6000612b518585612a9e565b9250506020612b6285828601612a9e565b9150509250929050565b60008060408385031215612b7f57600080fd5b6000612b8b8585612a9e565b9250506020612b6285828601612abf565b600080600060608486031215612bb157600080fd5b6000612bbd8686612a9e565b9350506020612bce86828701612abf565b9250506040612bdf86828701612a9e565b9150509250925092565b600080600080600060a08688031215612c0157600080fd5b6000612c0d8888612a9e565b9550506020612c1e88828901612abf565b9450506040612c2f88828901612aca565b9350506060612c4088828901612abf565b9250506080612c5188828901612abf565b9150509295509295909350565b600080600060608486031215612c7357600080fd5b6000612c7f8686612a9e565b9350506020612c9086828701612abf565b9250506040612bdf86828701612abf565b60008060008060008060c08789031215612cba57600080fd5b6000612cc68989612a9e565b9650506020612cd789828a01612abf565b9550506040612ce889828a01612abf565b9450506060612cf989828a01612aeb565b9350506080612d0a89828a01612abf565b92505060a0612d1b89828a01612abf565b9150509295509295509295565b60008060408385031215612d3b57600080fd5b6000612d478585612a9e565b9250506020612b6285828601612ae0565b600060208284031215612d6a57600080fd5b600061240b8484612ab4565b600060208284031215612d8857600080fd5b600061240b8484612aca565b600060208284031215612da657600080fd5b600061240b8484612ad5565b6000612dbe8383613559565b505060400190565b612dcf81613a00565b82525050565b612dcf816139bb565b6000612de9826139ae565b612df381856139b2565b9350612dfe836139a8565b8060005b83811015612e2c578151612e168882612db2565b9750612e21836139a8565b925050600101612e02565b509495945050505050565b612dcf816139c6565b612dcf816139cb565b612dcf612e55826139cb565b6139cb565b6000612e65826139ae565b612e6f81856117cb565b9350612e7f818560208601613a16565b9290920192915050565b612dcf816139ce565b6000612e9d826139ae565b612ea781856139b2565b9350612eb7818560208601613a16565b612ec081613a42565b9093019392505050565b6000612ed76018836139b2565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000815260200192915050565b6000612f106013836139b2565b727661756c743a20706f6f6c206578697374733f60681b815260200192915050565b6000612f3f601f836139b2565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800815260200192915050565b6000612f786030836139b2565b7f5856535661756c743a3a6765745374616b65416d6f756e743a2078767320616481526f191c995cdcc81a5cc81b9bdd081cd95d60821b602082015260400192915050565b6000612fca602a836139b2565b7f5361666542455032303a204245503230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b602082015260400192915050565b6000613016602a836139b2565b7f5856535661756c743a3a64656c656761746542795369673a207369676e6174758152691c9948195e1c1a5c995960b21b602082015260400192915050565b60006130626026836139b2565b7f5856535661756c743a3a64656c656761746542795369673a20696e76616c6964815265206e6f6e636560d01b602082015260400192915050565b60006130aa6002836117cb565b61190160f01b815260020192915050565b60006130c8601b836139b2565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006131016022836139b2565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c815261756560f01b602082015260400192915050565b6000613145602b836139b2565b7f5856535661756c743a3a6765745072696f72566f7465733a206e6f742079657481526a0819195d195c9b5a5b995960aa1b602082015260400192915050565b60006131926022836139b2565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c815261756560f01b602082015260400192915050565b60006131d66043836117cb565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b6000613241601f836139b2565b7f72657175657374656420616d6f756e742063616e6e6f74206265207a65726f00815260200192915050565b600061327a6021836139b2565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f8152607760f81b602082015260400192915050565b60006132bd600a836139b2565b691c994b595b9d195c995960b21b815260200192915050565b60006132e36018836139b2565b7f4572726f7220706f6f6c20616c72656164792061646465640000000000000000815260200192915050565b600061331c600e836139b2565b6d37b7363c9030b236b4b71031b0b760911b815260200192915050565b6000613346601e836139b2565b7f53746f726520636f6e74726163742061646472657320697320656d7074790000815260200192915050565b600061337f6015836139b2565b7418da185b99d9481b9bdd08185d5d1a1bdc9a5e9959605a1b815260200192915050565b60006133b06013836139b2565b726e6f7468696e6720746f20776974686472617760681b815260200192915050565b60006133df601a836139b2565b7f496e76616c6964206e6577206c6f636b696e6720706572696f64000000000000815260200192915050565b60006134186020836139b2565b7f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815260200192915050565b6000613451603a836117cb565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b60006134b0601f836139b2565b7f5361666542455032303a2063616c6c20746f206e6f6e2d636f6e747261637400815260200192915050565b60006134e9601b836139b2565b7f72657175657374656420616d6f756e7420697320696e76616c69640000000000815260200192915050565b60006135226022836139b2565b7f6f6e6c792070726f78792061646d696e2063616e206368616e676520627261698152616e7360f01b602082015260400192915050565b8051604083019061356a8482612e40565b506020820151611f956020850182612e40565b612dcf816139e5565b612dcf816139ee565b612dcf81613a0b565b612dcf816139f4565b60006105548284612e5a565b60006135b88261309d565b91506135c48285612e49565b6020820191506135d48284612e49565b5060200192915050565b6000610f42826131c9565b6000610f4282613444565b60208101610f428284612dd5565b606081016136108286612dd5565b61361d6020830185612dc6565b61240b6040830184612e40565b608081016136388287612dd5565b6136456020830186612dd5565b6136526040830185612dd5565b61365f6060830184612dd5565b95945050505050565b606081016136768286612dd5565b61361d6020830185612dd5565b604081016136918285612dd5565b6105546020830184612e37565b604081016136ac8285612dd5565b6105546020830184612e40565b602080825281016105548184612dde565b60208101610f428284612e40565b608081016136e68287612e40565b6136f36020830186612dd5565b6137006040830185612e40565b61365f6060830184612e40565b6080810161371b8287612e40565b6137286020830186612e40565b6136526040830185612e40565b608081016137438287612e40565b6136f36020830186613586565b60a0810161375e8288612e89565b61376b6020830187612e40565b6137786040830186612e40565b6137856060830185612e40565b6137926080830184612e40565b9695505050505050565b602080825281016105548184612e92565b60208082528101610f4281612eca565b60208082528101610f4281612f03565b60208082528101610f4281612f32565b60208082528101610f4281612f6b565b60208082528101610f4281612fbd565b60208082528101610f4281613009565b60208082528101610f4281613055565b60208082528101610f42816130bb565b60208082528101610f42816130f4565b60208082528101610f4281613138565b60208082528101610f4281613185565b60208082528101610f4281613234565b60208082528101610f428161326d565b60208082528101610f42816132b0565b60208082528101610f42816132d6565b60208082528101610f428161330f565b60208082528101610f4281613339565b60208082528101610f4281613372565b60208082528101610f42816133a3565b60208082528101610f42816133d2565b60208082528101610f428161340b565b60208082528101610f42816134a3565b60208082528101610f42816134dc565b60208082528101610f4281613515565b604081016136ac8285612e40565b606081016139498286612e40565b61361d6020830185612e40565b60208101610f42828461357d565b60408101613972828561357d565b6105546020830184613598565b60208101610f428284613598565b6040810161399b828561358f565b610554602083018461358f565b60200190565b5190565b90815260200190565b6000610f42826139d9565b151590565b90565b6000610f42826139bb565b6001600160a01b031690565b63ffffffff1690565b60ff1690565b6001600160601b031690565b6000610f42826139ce565b6000610f42826139f4565b60005b83811015613a31578181015183820152602001613a19565b83811115611f955750506000910152565b601f01601f191690565b613a55816139bb565b8114610acc57600080fd5b613a55816139c6565b613a55816139cb565b613a55816139ce565b613a55816139e5565b613a55816139ee56fe5856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77735856535661756c743a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974735856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773a365627a7a723158203e968a71c7a65b69d853db4dc3c4e026ea31e6ba9cf4657029f83d882a6422b96c6578706572696d656e74616cf564736f6c63430005100040", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102325760003560e01c80637ac9245611610130578063a09eab7a116100b8578063de0368b21161007c578063de0368b2146104c9578063e7a324dc146104d1578063f1127ed8146104d9578063f851a440146104fa578063fba1b1f91461050257610232565b8063a09eab7a1461045d578063b4b5ea5714610470578063c210259614610483578063c3cda520146104a3578063d7ae45e2146104b657610232565b80638ed7333d116100ff5780638ed7333d146103de57806392e35000146103f157806393c7c4d11461041557806398e1b31b146104285780639e2b6c4d1461044a57610232565b80637ac924561461039d5780637ecebe00146103b057806381bdf98c146103c35780638308d7e9146103cb57610232565b80634298bdbd116101be5780635ff56315116101825780635ff563151461032f5780636dd77cbd146103425780636e9960c3146103555780636fcfff451461035d578063782d6fe11461037d57610232565b80634298bdbd146102db5780635362b503146102ee578063587cde1e146103015780635c19a95c146103145780635c60da1b1461032757610232565b806320606b701161020557806320606b701461029b57806324f52bbf146102a357806326782247146102b85780632eda5c6c146102c0578063358ae036146102d357610232565b80630af13728146102375780630efe6a8b14610260578063115b512f146102755780631d504dc614610288575b600080fd5b61024a610245366004612b9c565b610515565b60405161025791906136ca565b60405180910390f35b61027361026e366004612c5e565b61055b565b005b610273610283366004612c5e565b6107b9565b610273610296366004612d76565b61099b565b61024a610acf565b6102ab610ae6565b60405161025791906135f4565b6102ab610af5565b61024a6102ce366004612af6565b610b04565b6102ab610b16565b61024a6102e9366004612af6565b610b25565b6102736102fc366004612af6565b610b37565b6102ab61030f366004612af6565b610b71565b610273610322366004612af6565b610b8c565b6102ab610b96565b61027361033d366004612b32565b610ba5565b61024a610350366004612b9c565b610c5d565b6102ab610d12565b61037061036b366004612af6565b610d21565b6040516102579190613956565b61039061038b366004612b6c565b610d39565b604051610257919061397f565b6102736103ab366004612b6c565b610f48565b61024a6103be366004612af6565b611167565b610273611179565b6102736103d9366004612c5e565b6111ed565b6102736103ec366004612b6c565b61134b565b6104046103ff366004612b6c565b611363565b604051610257959493929190613750565b610273610423366004612b6c565b6113b8565b61043b610436366004612b9c565b61144c565b6040516102579392919061393b565b610273610458366004612c5e565b61149e565b61024a61046b366004612b9c565b611574565b61039061047e366004612af6565b61175d565b610496610491366004612b9c565b6117d0565b60405161025791906136b9565b6102736104b1366004612ca1565b611876565b61024a6104c4366004612af6565b6119f7565b6102ab611a12565b61024a611a21565b6104ec6104e7366004612d28565b611a2d565b604051610257929190613964565b6102ab611a62565b610273610510366004612be9565b611a71565b60006105218484611cc2565b506001600160a01b0380841660009081526007602090815260408083208684528252808320938516835292905220600201545b9392505050565b600354600160a01b900460ff1661058d5760405162461bcd60e51b81526004016105849061387d565b60405180910390fd5b6003805460ff60a01b191690556105a48383611cc2565b6001600160a01b03831660009081526008602052604081208054849081106105c857fe5b600091825260208083206001600160a01b0388168452600782526040808520888652835280852033865290925292206005909102909101915061060b8585611cf9565b8054156106c0576000610658826001015461064c64e8d4a5100061064087600301548760000154611e7c90919063ffffffff16565b9063ffffffff611eb616565b9063ffffffff611ef816565b6004805460405163135b33cd60e31b81529293506001600160a01b031691639ad99e689161068c918a913391879101613602565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b50505050505b81546106dd906001600160a01b031633308663ffffffff611f3a16565b80546106ef908463ffffffff611f9b16565b80825560038301546107129164e8d4a5100091610640919063ffffffff611e7c16565b600182015560055482546001600160a01b039081169116141561075357336000908152600f602052604081205461075391906001600160a01b031685611fc0565b83856001600160a01b0316336001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78660405161079791906136ca565b60405180910390a450506003805460ff60a01b1916600160a01b179055505050565b600354600160a01b900460ff166107e25760405162461bcd60e51b81526004016105849061387d565b6003805460ff60a01b191690556107f98383611cc2565b600081116108195760405162461bcd60e51b81526004016105849061385d565b6001600160a01b0383166000908152600760209081526040808320858452825280832033845290915290206002810154610859908363ffffffff611f9b16565b815410156108795760405162461bcd60e51b81526004016105849061390d565b6001600160a01b038416600090815260086020526040812080548590811061089d57fe5b600091825260208083206001600160a01b0389168452600a8252604080852089865283528085203386529092529083206005929092020160048101549093509091906108e99042611f9b565b90506108f784838784612152565b6005546001600160a01b038881169116141561093357336000908152600f6020526040812054610933916001600160a01b039091169087611fc0565b85876001600160a01b0316336001600160a01b03167fc0863fcc3a3b119da683cc8d57bce56f78d0d373c023726dea2aaf6ce3f837ac8860405161097791906136ca565b60405180910390a450506003805460ff60a01b1916600160a01b1790555050505050565b806001600160a01b031663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d457600080fd5b505afa1580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a0c9190810190612b14565b6001600160a01b0316336001600160a01b031614610a3c5760405162461bcd60e51b81526004016105849061391d565b806001600160a01b031663c1e803346040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610a7757600080fd5b505af1158015610a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610aaf9190810190612d94565b15610acc5760405162461bcd60e51b8152600401610584906138bd565b50565b604051610adb906135de565b604051809103902081565b6004546001600160a01b031681565b6001546001600160a01b031681565b60066020526000908152604090205481565b6005546001600160a01b031681565b60096020526000908152604090205481565b6001600160a01b038116600090815260086020526040812054905b81811015610b6c57610b648382611cf9565b600101610b52565b505050565b600f602052600090815260409020546001600160a01b031681565b610acc338261227c565b6002546001600160a01b031681565b6000546001600160a01b03163314610bcf5760405162461bcd60e51b81526004016105849061389d565b60058054600480546001600160a01b03198084166001600160a01b038881169190911790955581168585161790915560038054600160a01b60ff60a01b199091161790556040519183169216907f559f314bb90394a4a9ceb724f365b36a53587d894352c43d12901fd68010145690610c4f90849084908890889061362a565b60405180910390a150505050565b6000610c698484611cc2565b6001600160a01b038085166000908152600a60209081526040808320878452825280832093861683529290522080545b600081118015610cc95750610cc9826001830381548110610cb657fe5b906000526020600020906002020161230b565b15610d0957610cfe826001830381548110610ce057fe5b6000918252602090912060029091020154849063ffffffff611f9b16565b925060001901610c99565b50509392505050565b6000546001600160a01b031690565b60116020526000908152604090205463ffffffff1681565b6000438210610d5a5760405162461bcd60e51b81526004016105849061383d565b6001600160a01b03831660009081526011602052604090205463ffffffff1680610d88576000915050610f42565b6001600160a01b038416600090815260106020908152604080832063ffffffff600019860181168552925290912054168310610e04576001600160a01b03841660009081526010602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050610f42565b6001600160a01b038416600090815260106020908152604080832083805290915290205463ffffffff16831015610e3f576000915050610f42565b600060001982015b8163ffffffff168163ffffffff161115610f0257600282820363ffffffff16048103610e71612a87565b506001600160a01b038716600090815260106020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915290871415610edd57602001519450610f429350505050565b805163ffffffff16871115610ef457819350610efb565b6001820392505b5050610e47565b506001600160a01b038516600090815260106020908152604080832063ffffffff909416835292905220546001600160601b03600160201b909104169150505b92915050565b600354600160a01b900460ff16610f715760405162461bcd60e51b81526004016105849061387d565b6003805460ff60a01b19169055610f888282611cc2565b6001600160a01b0382166000908152600860205260408120805483908110610fac57fe5b600091825260208083206001600160a01b038716808552600783526040808620888752845280862033808852908552818720928752600a8552818720898852855281872090875290935291842060059093020193509161100c8383612315565b90506000811161102e5760405162461bcd60e51b8152600401610584906138cd565b6110388686611cf9565b6000611066846001015461064c64e8d4a5100061064089600301548960000154611e7c90919063ffffffff16565b6004805460405163135b33cd60e31b81529293506001600160a01b031691639ad99e689161109a918b913391879101613602565b600060405180830381600087803b1580156110b457600080fd5b505af11580156110c8573d6000803e3d6000fd5b505085546110df925090508363ffffffff611ef816565b80855560038601546111029164e8d4a5100091610640919063ffffffff611e7c16565b60018501558454611123906001600160a01b0316338463ffffffff6123c316565b85876001600160a01b0316336001600160a01b03167fe31da05fae6db869f5ea51f4b638aa6884070b6c87f18f63bd2291a12cb2f5188560405161097791906136ca565b600e6020526000908152604090205481565b6000546001600160a01b031633146111a35760405162461bcd60e51b81526004016105849061389d565b600080546040516001600160a01b03909116907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146112175760405162461bcd60e51b81526004016105849061389d565b6112218383611cc2565b61122a83610b37565b6001600160a01b038316600090815260086020526040902080546112a09083906112949084908790811061125a57fe5b60009182526020808320600160059093020191909101546001600160a01b038a16835260099091526040909120549063ffffffff611ef816565b9063ffffffff611f9b16565b6001600160a01b03851660009081526009602052604081209190915581548290859081106112ca57fe5b9060005260206000209060050201600101549050828285815481106112eb57fe5b90600052602060002090600502016001018190555083856001600160a01b03167f6ee09c6cb801194690c195c69f465aaf7c80255cbeafaab9600f47ed79de2ca9838660405161133c92919061392d565b60405180910390a35050505050565b6113558282611cc2565b61135f8282611cf9565b5050565b6008602052816000526040600020818154811061137c57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b039093169550909350919085565b6000546001600160a01b031633146113e25760405162461bcd60e51b81526004016105849061389d565b6113eb82610b37565b6001600160a01b0382166000818152600660205260409081902080549084905590519091907fad96cee0d692f0250b98e085504f399da6733854908215f6203fe3c69366d9f59061143f908490869061392d565b60405180910390a2505050565b600080600061145b8686611cc2565b5050506001600160a01b03928316600090815260076020908152604080832094835293815283822092909416815292529020805460018201546002909201549092565b6000546001600160a01b031633146114c85760405162461bcd60e51b81526004016105849061389d565b6114d28383611cc2565b600081116114f25760405162461bcd60e51b8152600401610584906138dd565b6001600160a01b038316600090815260086020526040812080548490811061151657fe5b9060005260206000209060050201905060008160040154905082826004018190555083856001600160a01b03167f0bcf80c5060ccf99b7a993c57a94b232fc2c5c04bd74c7c7d174595fee6bc31f838660405161133c92919061392d565b60006115808484611cc2565b6001600160a01b03841660009081526008602052604081208054859081106115a457fe5b600091825260208083206001600160a01b0389811685526007835260408086208a8752845280862089831687529093528285206005949094029091016003810154815493516370a0823160e01b8152919650939492909116906370a08231906116119030906004016135f4565b60206040518083038186803b15801561162957600080fd5b505afa15801561163d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116619190810190612d94565b6001600160a01b038916600090815260066020526040902054600286015491925043918211801561169157508215155b156117275760006116af876002015484611ef890919063ffffffff16565b6001600160a01b038c1660009081526009602052604081205460018a015492935090916116f79190610640906116eb868863ffffffff611e7c16565b9063ffffffff611e7c16565b9050611722611715866106408464e8d4a5100063ffffffff611e7c16565b879063ffffffff611f9b16565b955050505b61174f856001015461064c64e8d4a51000610640888a60000154611e7c90919063ffffffff16565b9a9950505050505050505050565b6001600160a01b03811660009081526011602052604081205463ffffffff16806117885760006117c7565b6001600160a01b0383166000908152601060209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9150505b919050565b60606117dc8484611cc2565b6001600160a01b038085166000908152600a602090815260408083208784528252808320938616835292815282822080548451818402810184019095528085529092909184015b8282101561186957838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611823565b5050505090509392505050565b6000604051611884906135de565b604080519182900382208282019091526008825267161594d5985d5b1d60c21b6020909201919091527fddfcc46608a8bd52ebf900f03a24cc97b73a6046cec8c5d0f74a211e376e967a6118d66123e5565b306040516020016118ea949392919061370d565b6040516020818303038152906040528051906020012090506000604051611910906135e9565b60405190819003812061192b918a908a908a906020016136d8565b604051602081830303815290604052805190602001209050600082826040516020016119589291906135ad565b604051602081830303815290604052805190602001209050600061197e828888886123e9565b6001600160a01b0381166000908152600e6020526040902080546001810190915590915089146119c05760405162461bcd60e51b81526004016105849061380d565b874211156119e05760405162461bcd60e51b8152600401610584906137fd565b6119ea818b61227c565b505050505b505050505050565b6001600160a01b031660009081526008602052604090205490565b6003546001600160a01b031681565b604051610adb906135e9565b601060209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6000546001600160a01b031681565b6000546001600160a01b03163314611a9b5760405162461bcd60e51b81526004016105849061389d565b6004546001600160a01b0316611ac35760405162461bcd60e51b8152600401610584906138ad565b611acc85610b37565b6001600160a01b0385166000908152600860205260408120805490915b81811015611b4757856001600160a01b0316838281548110611b0757fe5b60009182526020909120600590910201546001600160a01b03161415611b3f5760405162461bcd60e51b81526004016105849061388d565b600101611ae9565b506001600160a01b038716600090815260096020526040902054611b71908763ffffffff611f9b16565b6001600160a01b0388811660009081526009602090815260408083209490945560068152838220889055835160a08101855289841681528082018b81524382870190815260608301858152608084018b81528a5460018082018d558c8952969097209451600590970290940180546001600160a01b031916968816969096178655915185850155516002850155516003840155516004928301558154935163fb66fb4d60e01b8152939092169263fb66fb4d92611c30928c9201613683565b600060405180830381600087803b158015611c4a57600080fd5b505af1158015611c5e573d6000803e3d6000fd5b50505050846001600160a01b03166001838054905003886001600160a01b03167fd7fa4bff1cd2253c0789c3291a786a6f6b1a3b4569a75af683a15d52abb6a0bf898888604051611cb19392919061393b565b60405180910390a450505050505050565b6001600160a01b038216600090815260086020526040902054811061135f5760405162461bcd60e51b8152600401610584906137bd565b6001600160a01b0382166000908152600860205260408120805483908110611d1d57fe5b9060005260206000209060050201905080600201544311611d3e575061135f565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611d6e9030906004016135f4565b60206040518083038186803b158015611d8657600080fd5b505afa158015611d9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dbe9190810190612d94565b905080611dd257504360029091015561135f565b60028201544390600090611ded90839063ffffffff611ef816565b6001600160a01b03871660009081526009602090815260408083205460018901546006909352908320549394509192611e369291610640916116eb90879063ffffffff611e7c16565b9050611e65611e54856106408464e8d4a5100063ffffffff611e7c16565b60038701549063ffffffff611f9b16565b600386015550504360029093019290925550505050565b600082611e8b57506000610f42565b82820282848281611e9857fe5b04146105545760405162461bcd60e51b81526004016105849061386d565b600061055483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612413565b600061055483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061244a565b604051611f959085906323b872dd60e01b90611f5e90879087908790602401613668565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612476565b50505050565b6000828201838110156105545760405162461bcd60e51b81526004016105849061381d565b816001600160a01b0316836001600160a01b031614158015611feb57506000816001600160601b0316115b15610b6c576001600160a01b038316156120a3576001600160a01b03831660009081526011602052604081205463ffffffff16908161202b57600061206a565b6001600160a01b0385166000908152601060209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061209182856040518060600160405280602c8152602001613af1602c913961255b565b905061209f86848484612592565b5050505b6001600160a01b03821615610b6c576001600160a01b03821660009081526011602052604081205463ffffffff1690816120de57600061211d565b6001600160a01b0384166000908152601060209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061214482856040518060600160405280602b8152602001613a8e602b9139612747565b90506119ef85848484612592565b82546040805180820190915260008082526020808301828152600180860189558884529190922092516002850290930192835590519101555b6000811180156121bb5750818460018303815481106121a657fe5b90600052602060002090600202016001015411155b15612210578360018203815481106121cf57fe5b90600052602060002090600202018482815481106121e957fe5b6000918252602090912082546002909202019081556001918201549101556000190161218b565b60405180604001604052808481526020018381525084828154811061223157fe5b9060005260206000209060020201600082015181600001556020820151816001015590505061226d838660020154611f9b90919063ffffffff16565b85600201819055505050505050565b6001600160a01b038083166000908152600f6020526040812054909116906122a384612783565b6001600160a01b038581166000818152600f602052604080822080546001600160a01b031916898616908117909155905194955093928616927f0cc323ffec3ea49cbcddc0de1480978126d350c6a45dff33ad2f1cda6ae992619190a4611f95828483611fc0565b6001015442101590565b80546000905b6000811180156123385750612338836001830381548110610cb657fe5b156123a25761236d83600183038154811061234f57fe5b6000918252602090912060029091020154839063ffffffff611f9b16565b91508280548061237957fe5b60008281526020812060001992830160028102909101828155600101919091559091550161231b565b5060028301546123b8908263ffffffff611ef816565b600284015592915050565b604051610b6c90849063a9059cbb60e01b90611f5e908690869060240161369e565b4690565b60008060006123fa87878787612876565b9150915061240781612956565b5090505b949350505050565b600081836124345760405162461bcd60e51b8152600401610584919061379c565b50600083858161244057fe5b0495945050505050565b6000818484111561246e5760405162461bcd60e51b8152600401610584919061379c565b505050900390565b612488826001600160a01b0316612a1f565b6124a45760405162461bcd60e51b8152600401610584906138fd565b60006060836001600160a01b0316836040516124c091906135a1565b6000604051808303816000865af19150503d80600081146124fd576040519150601f19603f3d011682016040523d82523d6000602084013e612502565b606091505b5091509150816125245760405162461bcd60e51b8152600401610584906138ed565b805115611f95578080602001905161253f9190810190612d58565b611f955760405162461bcd60e51b8152600401610584906137ed565b6000836001600160601b0316836001600160601b03161115829061246e5760405162461bcd60e51b8152600401610584919061379c565b60006125b643604051806060016040528060388152602001613ab960389139612a58565b905060008463ffffffff161180156125ff57506001600160a01b038516600090815260106020908152604080832063ffffffff6000198901811685529252909120548282169116145b1561265e576001600160a01b0385166000908152601060209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b038516021790556126fd565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152601083528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252601190935292909220805460018801909316929091169190911790555b846001600160a01b03167f6adb589fed1e8542fb7a6b10f00a85e02265e77f9ae3ca8ff93b22983e1af9a0848460405161273892919061398d565b60405180910390a25050505050565b6000838301826001600160601b03808716908316101561277a5760405162461bcd60e51b8152600401610584919061379c565b50949350505050565b6005546000906001600160a01b03166127ae5760405162461bcd60e51b8152600401610584906137dd565b6005546001600160a01b03166000908152600860205260408120805490915b8181101561286b5760055483546001600160a01b03909116908490839081106127f257fe5b60009182526020909120600590910201546001600160a01b03161415612863576005546001600160a01b0390811660009081526007602090815260408083208584528252808320938916835292905220600281015481546128589163ffffffff611ef816565b9450505050506117cb565b6001016127cd565b506000949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128ad575060009050600361294d565b8460ff16601b141580156128c557508460ff16601c14155b156128d6575060009050600461294d565b6000600187878787604051600081526020016040526040516128fb9493929190613735565b6020604051602081039080840390855afa15801561291d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129465750600091506001905061294d565b9150600090505b94509492505050565b600081600481111561296457fe5b141561296f57610acc565b600181600481111561297d57fe5b141561299b5760405162461bcd60e51b8152600401610584906137ad565b60028160048111156129a957fe5b14156129c75760405162461bcd60e51b8152600401610584906137cd565b60038160048111156129d557fe5b14156129f35760405162461bcd60e51b81526004016105849061382d565b6004816004811115612a0157fe5b1415610acc5760405162461bcd60e51b81526004016105849061384d565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061240b575050151592915050565b600081600160201b8410612a7f5760405162461bcd60e51b8152600401610584919061379c565b509192915050565b604080518082019091526000808252602082015290565b8035610f4281613a4c565b8051610f4281613a4c565b8051610f4281613a60565b8035610f4281613a69565b8035610f4281613a72565b8051610f4281613a69565b8035610f4281613a7b565b8035610f4281613a84565b600060208284031215612b0857600080fd5b600061240b8484612a9e565b600060208284031215612b2657600080fd5b600061240b8484612aa9565b60008060408385031215612b4557600080fd5b6000612b518585612a9e565b9250506020612b6285828601612a9e565b9150509250929050565b60008060408385031215612b7f57600080fd5b6000612b8b8585612a9e565b9250506020612b6285828601612abf565b600080600060608486031215612bb157600080fd5b6000612bbd8686612a9e565b9350506020612bce86828701612abf565b9250506040612bdf86828701612a9e565b9150509250925092565b600080600080600060a08688031215612c0157600080fd5b6000612c0d8888612a9e565b9550506020612c1e88828901612abf565b9450506040612c2f88828901612aca565b9350506060612c4088828901612abf565b9250506080612c5188828901612abf565b9150509295509295909350565b600080600060608486031215612c7357600080fd5b6000612c7f8686612a9e565b9350506020612c9086828701612abf565b9250506040612bdf86828701612abf565b60008060008060008060c08789031215612cba57600080fd5b6000612cc68989612a9e565b9650506020612cd789828a01612abf565b9550506040612ce889828a01612abf565b9450506060612cf989828a01612aeb565b9350506080612d0a89828a01612abf565b92505060a0612d1b89828a01612abf565b9150509295509295509295565b60008060408385031215612d3b57600080fd5b6000612d478585612a9e565b9250506020612b6285828601612ae0565b600060208284031215612d6a57600080fd5b600061240b8484612ab4565b600060208284031215612d8857600080fd5b600061240b8484612aca565b600060208284031215612da657600080fd5b600061240b8484612ad5565b6000612dbe8383613559565b505060400190565b612dcf81613a00565b82525050565b612dcf816139bb565b6000612de9826139ae565b612df381856139b2565b9350612dfe836139a8565b8060005b83811015612e2c578151612e168882612db2565b9750612e21836139a8565b925050600101612e02565b509495945050505050565b612dcf816139c6565b612dcf816139cb565b612dcf612e55826139cb565b6139cb565b6000612e65826139ae565b612e6f81856117cb565b9350612e7f818560208601613a16565b9290920192915050565b612dcf816139ce565b6000612e9d826139ae565b612ea781856139b2565b9350612eb7818560208601613a16565b612ec081613a42565b9093019392505050565b6000612ed76018836139b2565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000815260200192915050565b6000612f106013836139b2565b727661756c743a20706f6f6c206578697374733f60681b815260200192915050565b6000612f3f601f836139b2565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800815260200192915050565b6000612f786030836139b2565b7f5856535661756c743a3a6765745374616b65416d6f756e743a2078767320616481526f191c995cdcc81a5cc81b9bdd081cd95d60821b602082015260400192915050565b6000612fca602a836139b2565b7f5361666542455032303a204245503230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b602082015260400192915050565b6000613016602a836139b2565b7f5856535661756c743a3a64656c656761746542795369673a207369676e6174758152691c9948195e1c1a5c995960b21b602082015260400192915050565b60006130626026836139b2565b7f5856535661756c743a3a64656c656761746542795369673a20696e76616c6964815265206e6f6e636560d01b602082015260400192915050565b60006130aa6002836117cb565b61190160f01b815260020192915050565b60006130c8601b836139b2565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006131016022836139b2565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c815261756560f01b602082015260400192915050565b6000613145602b836139b2565b7f5856535661756c743a3a6765745072696f72566f7465733a206e6f742079657481526a0819195d195c9b5a5b995960aa1b602082015260400192915050565b60006131926022836139b2565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c815261756560f01b602082015260400192915050565b60006131d66043836117cb565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b6000613241601f836139b2565b7f72657175657374656420616d6f756e742063616e6e6f74206265207a65726f00815260200192915050565b600061327a6021836139b2565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f8152607760f81b602082015260400192915050565b60006132bd600a836139b2565b691c994b595b9d195c995960b21b815260200192915050565b60006132e36018836139b2565b7f4572726f7220706f6f6c20616c72656164792061646465640000000000000000815260200192915050565b600061331c600e836139b2565b6d37b7363c9030b236b4b71031b0b760911b815260200192915050565b6000613346601e836139b2565b7f53746f726520636f6e74726163742061646472657320697320656d7074790000815260200192915050565b600061337f6015836139b2565b7418da185b99d9481b9bdd08185d5d1a1bdc9a5e9959605a1b815260200192915050565b60006133b06013836139b2565b726e6f7468696e6720746f20776974686472617760681b815260200192915050565b60006133df601a836139b2565b7f496e76616c6964206e6577206c6f636b696e6720706572696f64000000000000815260200192915050565b60006134186020836139b2565b7f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815260200192915050565b6000613451603a836117cb565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b60006134b0601f836139b2565b7f5361666542455032303a2063616c6c20746f206e6f6e2d636f6e747261637400815260200192915050565b60006134e9601b836139b2565b7f72657175657374656420616d6f756e7420697320696e76616c69640000000000815260200192915050565b60006135226022836139b2565b7f6f6e6c792070726f78792061646d696e2063616e206368616e676520627261698152616e7360f01b602082015260400192915050565b8051604083019061356a8482612e40565b506020820151611f956020850182612e40565b612dcf816139e5565b612dcf816139ee565b612dcf81613a0b565b612dcf816139f4565b60006105548284612e5a565b60006135b88261309d565b91506135c48285612e49565b6020820191506135d48284612e49565b5060200192915050565b6000610f42826131c9565b6000610f4282613444565b60208101610f428284612dd5565b606081016136108286612dd5565b61361d6020830185612dc6565b61240b6040830184612e40565b608081016136388287612dd5565b6136456020830186612dd5565b6136526040830185612dd5565b61365f6060830184612dd5565b95945050505050565b606081016136768286612dd5565b61361d6020830185612dd5565b604081016136918285612dd5565b6105546020830184612e37565b604081016136ac8285612dd5565b6105546020830184612e40565b602080825281016105548184612dde565b60208101610f428284612e40565b608081016136e68287612e40565b6136f36020830186612dd5565b6137006040830185612e40565b61365f6060830184612e40565b6080810161371b8287612e40565b6137286020830186612e40565b6136526040830185612e40565b608081016137438287612e40565b6136f36020830186613586565b60a0810161375e8288612e89565b61376b6020830187612e40565b6137786040830186612e40565b6137856060830185612e40565b6137926080830184612e40565b9695505050505050565b602080825281016105548184612e92565b60208082528101610f4281612eca565b60208082528101610f4281612f03565b60208082528101610f4281612f32565b60208082528101610f4281612f6b565b60208082528101610f4281612fbd565b60208082528101610f4281613009565b60208082528101610f4281613055565b60208082528101610f42816130bb565b60208082528101610f42816130f4565b60208082528101610f4281613138565b60208082528101610f4281613185565b60208082528101610f4281613234565b60208082528101610f428161326d565b60208082528101610f42816132b0565b60208082528101610f42816132d6565b60208082528101610f428161330f565b60208082528101610f4281613339565b60208082528101610f4281613372565b60208082528101610f42816133a3565b60208082528101610f42816133d2565b60208082528101610f428161340b565b60208082528101610f42816134a3565b60208082528101610f42816134dc565b60208082528101610f4281613515565b604081016136ac8285612e40565b606081016139498286612e40565b61361d6020830185612e40565b60208101610f42828461357d565b60408101613972828561357d565b6105546020830184613598565b60208101610f428284613598565b6040810161399b828561358f565b610554602083018461358f565b60200190565b5190565b90815260200190565b6000610f42826139d9565b151590565b90565b6000610f42826139bb565b6001600160a01b031690565b63ffffffff1690565b60ff1690565b6001600160601b031690565b6000610f42826139ce565b6000610f42826139f4565b60005b83811015613a31578181015183820152602001613a19565b83811115611f955750506000910152565b601f01601f191690565b613a55816139bb565b8114610acc57600080fd5b613a55816139c6565b613a55816139cb565b613a55816139ce565b613a55816139e5565b613a55816139ee56fe5856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77735856535661756c743a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974735856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773a365627a7a723158203e968a71c7a65b69d853db4dc3c4e026ea31e6ba9cf4657029f83d882a6422b96c6578706572696d656e74616cf564736f6c63430005100040", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/subgraphs/venus-governance/config/local.json b/subgraphs/venus-governance/config/local.json index 95cc4063..e3ed3413 100644 --- a/subgraphs/venus-governance/config/local.json +++ b/subgraphs/venus-governance/config/local.json @@ -1,6 +1,6 @@ { "network": "hardhat", - "accessControlManagerAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "accessControlManagerAddress": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", "accessControlManagerStartBlock": "0", "governorAlphaAddress": "0x1c9fD50dF7a4f066884b58A05D91e4b55005876A", "governorAlphaStartBlock": "0", @@ -8,7 +8,7 @@ "governorAlpha2StartBlock": "0", "governorBravoDelegateAddress": "0x1c9fD50dF7a4f066884b58A05D91e4b55005876A", "governorBravoDelegateStartBlock": "0", - "xvsVaultAddress": "0xe1708FA6bb2844D5384613ef0846F9Bc1e8eC55E", + "xvsVaultAddress": "0x967AB65ef14c58bD4DcfFeaAA1ADb40a022140E5", "xvsVaultStartBlock": "0", "xvsVaultPid": "0" } diff --git a/subgraphs/venus-governance/package.json b/subgraphs/venus-governance/package.json index f0fa4300..09cf370a 100644 --- a/subgraphs/venus-governance/package.json +++ b/subgraphs/venus-governance/package.json @@ -27,7 +27,7 @@ "remove:local": "graph remove --node http://localhost:8020/ venusprotocol/venus-governance", "generate-subgraph-types": "yarn graphclient build --dir ./subgraph-client", "test": "graph test", - "test:integration": "NETWORK=mainnet PACKAGE=venus-governance hardhat test tests/integration/index.ts --network localhost" + "test:integration": "hardhat test tests/integration/index.ts --network localhost" }, "devDependencies": { "@graphprotocol/client-cli": "^3.0.0", diff --git a/subgraphs/venus-governance/schema.graphql b/subgraphs/venus-governance/schema.graphql index 56af7659..c8eb3bb2 100644 --- a/subgraphs/venus-governance/schema.graphql +++ b/subgraphs/venus-governance/schema.graphql @@ -20,7 +20,10 @@ type Delegate @entity { delegateCount: Int! "Accounts delegating to this voter" - delegates: [Delegate!]! + delegates: [Delegate!]! @derivedFrom(field: "delegate") + + "Id of account receiving this accounts delegation" + delegate: Delegate "Votes that a delegate has made in different proposals" votes: [Vote!]! @derivedFrom(field: "voter") diff --git a/subgraphs/venus-governance/src/mappings/xvsVault.ts b/subgraphs/venus-governance/src/mappings/xvsVault.ts index 6da5d1a8..bdd7cbf7 100644 --- a/subgraphs/venus-governance/src/mappings/xvsVault.ts +++ b/subgraphs/venus-governance/src/mappings/xvsVault.ts @@ -8,7 +8,7 @@ import { DelegateChangedV2, DelegateVotesChangedV2, Deposit, - ReqestedWithdrawal, + RequestedWithdrawal, } from '../../generated/XVSVault/XVSVault'; import { xvsVaultPid } from '../constants/config'; import { getOrCreateDelegate } from '../operations/getOrCreate'; @@ -40,7 +40,7 @@ export function handleDeposit(event: Deposit): void { } } -export function handleRequestedWithdrawal(event: ReqestedWithdrawal): void { +export function handleRequestedWithdrawal(event: RequestedWithdrawal): void { // Only care about XVS Vault if (event.params.pid.equals(BigInt.fromString(xvsVaultPid))) { const user = event.params.user; diff --git a/subgraphs/venus-governance/src/operations/getOrCreate.ts b/subgraphs/venus-governance/src/operations/getOrCreate.ts index b19cfcab..697005a2 100644 --- a/subgraphs/venus-governance/src/operations/getOrCreate.ts +++ b/subgraphs/venus-governance/src/operations/getOrCreate.ts @@ -16,7 +16,6 @@ export const getOrCreateDelegate = (id: string): GetOrCreateDelegateReturn => { delegate.stakedXvsMantissa = BIGINT_ZERO; delegate.totalVotesMantissa = BIGINT_ZERO; delegate.delegateCount = 0; - delegate.delegates = []; if (id != nullAddress.toHex()) { const governance = getGovernanceEntity(); diff --git a/subgraphs/venus-governance/src/operations/update.ts b/subgraphs/venus-governance/src/operations/update.ts index 0b4e1a3e..c5d8ccb4 100644 --- a/subgraphs/venus-governance/src/operations/update.ts +++ b/subgraphs/venus-governance/src/operations/update.ts @@ -1,4 +1,5 @@ import { BIGINT_ONE, BIGINT_ZERO, CANCELLED, EXECUTED, QUEUED } from '../constants'; +import { nullAddress } from '../constants/addresses'; import { getGovernanceEntity, getProposal } from './get'; import { getOrCreateDelegate } from './getOrCreate'; @@ -44,15 +45,28 @@ export function updateProposalExecuted(event: E): void { export function updateDelegateChanged(event: E): void { const params = event.params; - const oldDelegateResult = getOrCreateDelegate(params.fromDelegate.toHexString()); - const oldDelegate = oldDelegateResult.entity; - const newDelegateResult = getOrCreateDelegate(params.toDelegate.toHexString()); - const newDelegate = newDelegateResult.entity; - - oldDelegate.delegateCount = oldDelegate.delegateCount - 1; - oldDelegate.save(); - newDelegate.delegateCount = newDelegate.delegateCount + 1; - newDelegate.save(); + const fromDelegate = params.fromDelegate.toHexString(); + const toDelegate = params.toDelegate.toHexString(); + const delegator = params.delegator.toHexString(); + + const delegatorResult = getOrCreateDelegate(delegator); + const delegatorEntity = delegatorResult.entity; + delegatorEntity.delegate = toDelegate; + delegatorEntity.save(); + + if (fromDelegate != nullAddress.toHexString()) { + const oldDelegateResult = getOrCreateDelegate(fromDelegate); + const oldDelegate = oldDelegateResult.entity; + oldDelegate.delegateCount = oldDelegate.delegateCount - 1; + oldDelegate.save(); + } + + if (toDelegate != nullAddress.toHexString()) { + const newDelegateResult = getOrCreateDelegate(toDelegate); + const newDelegate = newDelegateResult.entity; + newDelegate.delegateCount = newDelegate.delegateCount + 1; + newDelegate.save(); + } } export function updateDelegateVoteChanged(event: E): void { @@ -68,12 +82,6 @@ export function updateDelegateVoteChanged(event: E): void { delegate.totalVotesMantissa = newBalance; delegate.save(); - if (previousBalance == BIGINT_ZERO && newBalance > BIGINT_ZERO) { - governance.totalDelegates = governance.totalDelegates.plus(BIGINT_ONE); - } - if (newBalance == BIGINT_ZERO) { - governance.totalDelegates = governance.totalDelegates.minus(BIGINT_ONE); - } governance.totalVotesMantissa = governance.totalVotesMantissa.plus(votesDifference); governance.save(); } diff --git a/subgraphs/venus-governance/subgraph-client/index.ts b/subgraphs/venus-governance/subgraph-client/index.ts index e2cdadab..ee2bb4d9 100644 --- a/subgraphs/venus-governance/subgraph-client/index.ts +++ b/subgraphs/venus-governance/subgraph-client/index.ts @@ -2,6 +2,7 @@ import { Client as UrqlClient, createClient } from 'urql/core'; import { DelegateByIdDocument, + DelegatesDocument, PermissionsDocument, ProposalByIdDocument, ProposalsDocument, @@ -27,6 +28,11 @@ class SubgraphClient { return result; } + async getDelegates() { + const result = await this.urqlClient.query(DelegatesDocument, {}).toPromise(); + return result; + } + async getProposals() { const result = await this.urqlClient.query(ProposalsDocument, {}).toPromise(); return result; diff --git a/subgraphs/venus-governance/template.yaml b/subgraphs/venus-governance/template.yaml index 2d3023df..854cdd2f 100644 --- a/subgraphs/venus-governance/template.yaml +++ b/subgraphs/venus-governance/template.yaml @@ -154,11 +154,13 @@ dataSources: - Delegate abis: - name: XVSVault - file: ../../packages/venus-governance-abis/XVSVault.json + file: ../../node_modules/@venusprotocol/venus-protocol/artifacts/contracts/XVSVault/XVSVault.sol/XVSVault.json + - name: GovernorBravoDelegate2 + file: ../../packages/venus-governance-abis/GovernorBravoDelegate2.json eventHandlers: - event: Deposit(indexed address,indexed address,indexed uint256,uint256) handler: handleDeposit - - event: ReqestedWithdrawal(indexed address,indexed address,indexed uint256,uint256) + - event: RequestedWithdrawal(indexed address,indexed address,indexed uint256,uint256) handler: handleRequestedWithdrawal - event: DelegateChangedV2(indexed address,indexed address,indexed address) handler: handleDelegateChanged diff --git a/subgraphs/venus-governance/tests/integration/index.ts b/subgraphs/venus-governance/tests/integration/index.ts index 62afed3f..0d5546e1 100644 --- a/subgraphs/venus-governance/tests/integration/index.ts +++ b/subgraphs/venus-governance/tests/integration/index.ts @@ -1,4 +1,6 @@ import './setup'; -import './alpha'; -import './accessControlManager'; +import './xvsVault'; +// import './alpha'; +// import './bravo'; +// import './accessControlManager'; diff --git a/subgraphs/venus-governance/tests/integration/queries/delegateByIdQuery.graphql b/subgraphs/venus-governance/tests/integration/queries/delegateByIdQuery.graphql index 3ba02acc..27a7cb99 100644 --- a/subgraphs/venus-governance/tests/integration/queries/delegateByIdQuery.graphql +++ b/subgraphs/venus-governance/tests/integration/queries/delegateByIdQuery.graphql @@ -4,6 +4,9 @@ query DelegateById($id: ID!) { stakedXvsMantissa totalVotesMantissa delegateCount + delegate { + id + } delegates { id } diff --git a/subgraphs/venus-governance/tests/integration/queries/delegatesQuery.graphql b/subgraphs/venus-governance/tests/integration/queries/delegatesQuery.graphql new file mode 100644 index 00000000..b7b578f8 --- /dev/null +++ b/subgraphs/venus-governance/tests/integration/queries/delegatesQuery.graphql @@ -0,0 +1,25 @@ +query Delegates { + delegates { + id + stakedXvsMantissa + totalVotesMantissa + delegateCount + delegate { + id + } + delegates { + id + } + votes { + id + support + votes + proposal { + id + } + } + proposals { + id + } + } +} diff --git a/subgraphs/venus-governance/tests/integration/setup.ts b/subgraphs/venus-governance/tests/integration/setup.ts index 0ac8a1c1..d1658cea 100644 --- a/subgraphs/venus-governance/tests/integration/setup.ts +++ b/subgraphs/venus-governance/tests/integration/setup.ts @@ -3,9 +3,7 @@ import { deploy } from 'venus-subgraph-utils'; import { SUBGRAPH_ACCOUNT, SUBGRAPH_NAME, SYNC_DELAY } from './utils/constants'; describe('Deploy Subgraph', function () { - before(async function () { - this.timeout(50000000); // sometimes it takes a long time - + it('should deploy subgraph', async function () { const root = `${__dirname}/../..`; await deploy({ diff --git a/subgraphs/venus-governance/tests/integration/xvsVault.ts b/subgraphs/venus-governance/tests/integration/xvsVault.ts new file mode 100644 index 00000000..9b1ca476 --- /dev/null +++ b/subgraphs/venus-governance/tests/integration/xvsVault.ts @@ -0,0 +1,212 @@ +import '@nomiclabs/hardhat-ethers'; +import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; +import { Contract } from 'ethers'; +import { ethers } from 'hardhat'; +import { scaleValue, waitForSubgraphToBeSynced } from 'venus-subgraph-utils'; + +import subgraphClient from '../../subgraph-client/index'; +import { SYNC_DELAY } from './utils/constants'; + +describe('XVS Vault and Delegation', function () { + let signers: SignerWithAddress[]; + let xvsVault: Contract; + let xvs: Contract; + + const amount = scaleValue(100000, 18); + + before(async function () { + this.timeout(50000000); // sometimes it takes a long time + signers = await ethers.getSigners(); + + xvs = await ethers.getContract('XVS'); + xvsVault = await ethers.getContract('XVSVault'); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + }); + + describe('XVS Delegation', function () { + it('should create Delegate record on deposit ', async function () { + const [_, user1, user2, user3] = signers; + + const amount = scaleValue(100000, 18); + await xvs.connect(user1).approve(xvsVault.address, amount.times(10).toFixed()); + await xvs.connect(user2).approve(xvsVault.address, amount.times(10).toFixed()); + await xvs.connect(user3).approve(xvsVault.address, amount.times(10).toFixed()); + + await xvs.transfer(user1.address, amount.times(10).toFixed()); + await xvs.transfer(user2.address, amount.times(10).toFixed()); + await xvs.transfer(user3.address, amount.times(10).toFixed()); + + await xvsVault.connect(user1).deposit(xvs.address, 0, amount.toFixed()); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + expect(delegate.stakedXvsMantissa).to.deep.equal(amount.toFixed()); + expect(delegate.totalVotesMantissa).to.deep.equal(0); + + await xvsVault.connect(user1).delegate(user1.address); + await waitForSubgraphToBeSynced(SYNC_DELAY); + const { + data: { delegate: delegated }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + expect(delegated.totalVotesMantissa).to.deep.equal(amount.toFixed()); + }); + + it('should update delegate and votes with delegation event', async function () { + const [_, user1, user2] = signers; + + await xvsVault.connect(user1).delegate(user2.address); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + + expect(delegate1.delegateCount).to.equal(0); + expect(delegate1.delegate.id).to.equal(user2.address.toLowerCase()); + expect(delegate1.delegates).to.deep.equal([]); + + expect(delegate1.stakedXvsMantissa).to.deep.equal(amount.toFixed()); + expect(delegate1.totalVotesMantissa).to.equal('0'); + + const { + data: { delegate: delegate2 }, + } = await subgraphClient.getDelegateById(user2.address.toLowerCase()); + + expect(delegate2.delegateCount).to.equal(1); + expect(delegate2.delegates).to.deep.equal([{ id: user1.address, __typename: 'Delegate' }]); + expect(delegate2.stakedXvsMantissa).to.equal('0'); + expect(delegate2.totalVotesMantissa).to.equal(amount.toFixed()); + }); + + it('should update delegatee when delegator deposits', async function () { + const [_, user1, user2] = signers; + + await xvsVault.connect(user1).deposit(xvs.address, 0, amount.toFixed()); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + expect(delegate1.stakedXvsMantissa).to.equal(amount.times(2).toFixed()); + expect(delegate1.totalVotesMantissa).to.equal('0'); + + const { + data: { delegate: delegate2 }, + } = await subgraphClient.getDelegateById(user2.address.toLowerCase()); + expect(delegate2.stakedXvsMantissa).to.equal('0'); + expect(delegate2.totalVotesMantissa).to.equal(amount.times(2).toFixed()); + }); + + it('should update votes when delegate is changed to new account', async function () { + const [_, user1, user2, user3] = signers; + + await xvsVault.connect(user3).deposit(xvs.address, 0, amount.toFixed()); + await xvsVault.connect(user1).delegate(user3.address); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + + expect(delegate1.stakedXvsMantissa).to.equal(amount.times(2).toFixed()); + expect(delegate1.totalVotesMantissa).to.equal('0'); + expect(delegate1.delegate.id).to.equal(user3.address.toLowerCase()); + + const { + data: { delegate: delegate2 }, + } = await subgraphClient.getDelegateById(user2.address.toLowerCase()); + + expect(delegate2.stakedXvsMantissa).to.equal('0'); + expect(delegate2.totalVotesMantissa).to.equal('0'); + expect(delegate2.delegateCount).to.equal(0); + expect(delegate2.delegates).to.deep.equal([]); + + const { + data: { delegate: delegate3 }, + } = await subgraphClient.getDelegateById(user3.address.toLowerCase()); + + expect(delegate3.delegateCount).to.equal(1); + expect(delegate3.delegates).to.deep.equal([ + { id: user1.address.toLowerCase(), __typename: 'Delegate' }, + ]); + expect(delegate3.stakedXvsMantissa).to.equal(amount.toFixed()); + expect(delegate3.totalVotesMantissa).to.equal(amount.times(2).toFixed()); + }); + + it('should update votes when delegate is moved back to self', async function () { + const [_, user1, _user2, user3] = signers; + await xvsVault.connect(user1).delegate(user1.address); + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + + expect(delegate1.delegateCount).to.equal(1); + expect(delegate1.delegates).to.deep.equal([ + { + id: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + __typename: 'Delegate', + }, + ]); + expect(delegate1.stakedXvsMantissa).to.equal(amount.times(2).toFixed()); + expect(delegate1.totalVotesMantissa).to.equal(amount.times(2).toFixed()); + + const { + data: { delegate: delegate3 }, + } = await subgraphClient.getDelegateById(user3.address.toLowerCase()); + expect(delegate3.stakedXvsMantissa).to.equal(amount.toFixed()); + expect(delegate3.totalVotesMantissa).to.equal('0'); + }); + + it('should update delegatee when delegator withdraws', async function () { + const [_, user1, user2] = signers; + await xvsVault.connect(user1).requestWithdrawal(xvs.address, 0, amount.toFixed()); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + + expect(delegate1.stakedXvsMantissa).to.equal(amount.toFixed()); + expect(delegate1.totalVotesMantissa).to.equal(amount.toFixed()); + + const { + data: { delegate: delegate2 }, + } = await subgraphClient.getDelegateById(user2.address.toLowerCase()); + + expect(delegate2.stakedXvsMantissa).to.equal('0'); + expect(delegate2.totalVotesMantissa).to.equal('0'); + }); + + it('should remove delegate when xvs is withdrawn', async function () { + const [_, user1, user2] = signers; + + await xvsVault.connect(user1).requestWithdrawal(xvs.address, 0, amount.toFixed()); + + await waitForSubgraphToBeSynced(SYNC_DELAY); + + const { + data: { delegate: delegate1 }, + } = await subgraphClient.getDelegateById(user1.address.toLowerCase()); + + expect(delegate1).to.equal(null); + + const { + data: { delegate: delegate2 }, + } = await subgraphClient.getDelegateById(user2.address.toLowerCase()); + + expect(delegate2.stakedXvsMantissa).to.equal('0'); + expect(delegate2.totalVotesMantissa).to.equal('0'); + }); + }); +}); diff --git a/subgraphs/venus-governance/tests/unit/Alpha/index.test.ts b/subgraphs/venus-governance/tests/unit/Alpha/index.test.ts index 576c06c2..6f8905ad 100644 --- a/subgraphs/venus-governance/tests/unit/Alpha/index.test.ts +++ b/subgraphs/venus-governance/tests/unit/Alpha/index.test.ts @@ -73,11 +73,11 @@ describe('Alpha', () => { const assertDelegateDocument = (key: string, value: string): void => { assert.fieldEquals('Delegate', user1.toHex(), key, value); }; + assertDelegateDocument('id', user1.toHexString()); assertDelegateDocument('totalVotesMantissa', '0'); assertDelegateDocument('delegateCount', '0'); assertDelegateDocument('proposals', '[1]'); - assertDelegateDocument('delegates', '[]'); // Proposal const assertProposalDocument = (key: string, value: string): void => { diff --git a/subgraphs/venus-governance/tests/unit/Bravo/index.test.ts b/subgraphs/venus-governance/tests/unit/Bravo/index.test.ts index 88c03f93..3b7f21e6 100644 --- a/subgraphs/venus-governance/tests/unit/Bravo/index.test.ts +++ b/subgraphs/venus-governance/tests/unit/Bravo/index.test.ts @@ -110,7 +110,6 @@ describe('Bravo', () => { assertDelegateDocument('totalVotesMantissa', '0'); assertDelegateDocument('delegateCount', '0'); assertDelegateDocument('proposals', '[1]'); - assertDelegateDocument('delegates', '[]'); // Proposal const assertProposalDocument = (key: string, value: string): void => { @@ -154,7 +153,6 @@ describe('Bravo', () => { assertDelegateDocument('totalVotesMantissa', '0'); assertDelegateDocument('delegateCount', '0'); assertDelegateDocument('proposals', '[1]'); - assertDelegateDocument('delegates', '[]'); // Proposal const assertProposalDocument = (key: string, value: string): void => { diff --git a/subgraphs/venus-governance/tests/XVSVault/events.ts b/subgraphs/venus-governance/tests/unit/XVSVault/events.ts similarity index 87% rename from subgraphs/venus-governance/tests/XVSVault/events.ts rename to subgraphs/venus-governance/tests/unit/XVSVault/events.ts index e050c6c6..f88e73e0 100644 --- a/subgraphs/venus-governance/tests/XVSVault/events.ts +++ b/subgraphs/venus-governance/tests/unit/XVSVault/events.ts @@ -1,8 +1,8 @@ import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts'; import { newMockEvent } from 'matchstick-as'; -import { Deposit, ReqestedWithdrawal } from '../../generated/XVSVault/XVSVault'; -import { mockXvsAddress } from '../common/constants'; +import { Deposit, RequestedWithdrawal } from '../../../generated/XVSVault/XVSVault'; +import { mockXvsAddress } from '../../common/constants'; export function createXvsDepositEvent(user: Address, amount: BigInt): Deposit { const event = changetype(newMockEvent()); @@ -28,8 +28,8 @@ export function createXvsDepositEvent(user: Address, amount: BigInt): Deposit { export function createXvsWithdrawlRequestedEvent( user: Address, amount: BigInt, -): ReqestedWithdrawal { - const event = changetype(newMockEvent()); +): RequestedWithdrawal { + const event = changetype(newMockEvent()); event.parameters = []; const userParam = new ethereum.EventParam('user', ethereum.Value.fromAddress(user)); diff --git a/subgraphs/venus-governance/tests/XVSVault/index.test.ts b/subgraphs/venus-governance/tests/unit/XVSVault/index.test.ts similarity index 87% rename from subgraphs/venus-governance/tests/XVSVault/index.test.ts rename to subgraphs/venus-governance/tests/unit/XVSVault/index.test.ts index 698a3709..52e6d689 100644 --- a/subgraphs/venus-governance/tests/XVSVault/index.test.ts +++ b/subgraphs/venus-governance/tests/unit/XVSVault/index.test.ts @@ -1,18 +1,18 @@ import { Address, BigInt } from '@graphprotocol/graph-ts'; import { assert, beforeAll, beforeEach, describe, test } from 'matchstick-as/assembly/index'; -import { ProposalCreated } from '../../generated/GovernorBravoDelegate/GovernorBravoDelegate'; -import { DelegateChangedV2 } from '../../generated/XVSVault/XVSVault'; -import { handleProposalCreated } from '../../src/mappings/bravo'; +import { ProposalCreated } from '../../../generated/GovernorBravoDelegate/GovernorBravoDelegate'; +import { DelegateChangedV2 } from '../../../generated/XVSVault/XVSVault'; +import { handleProposalCreated } from '../../../src/mappings/bravo'; import { handleDelegateChanged, handleDeposit, handleRequestedWithdrawal, -} from '../../src/mappings/xvsVault'; -import { getOrCreateDelegate } from '../../src/operations/getOrCreate'; -import { user1, user2, user3 } from '../common/constants'; -import { createDelegateChangedEvent, createProposalCreatedEvent } from '../common/events'; -import { createGovernorBravoMocks } from '../common/mocks'; +} from '../../../src/mappings/xvsVault'; +import { getOrCreateDelegate } from '../../../src/operations/getOrCreate'; +import { user1, user2, user3 } from '../../common/constants'; +import { createDelegateChangedEvent, createProposalCreatedEvent } from '../../common/events'; +import { createGovernorBravoMocks } from '../../common/mocks'; import { createXvsDepositEvent, createXvsWithdrawlRequestedEvent } from './events'; const startBlock = 4563820; diff --git a/yarn.lock b/yarn.lock index c9f9ab93..3c930174 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5055,17 +5055,10 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/governance-contracts@npm:^0.0.2": - version: 0.0.2 - resolution: "@venusprotocol/governance-contracts@npm:0.0.2" - checksum: 101ade6013fe3963968d37ff839a4c62aeaedd9f26d8c5ae47bdc413e6c61732b4048a1b026e4281ade5676fb1545a49ecac299f6b669a9f0c7e73723666d7e1 - languageName: node - linkType: hard - -"@venusprotocol/governance-contracts@npm:^1.1.0-dev.1": - version: 1.1.0-dev.1 - resolution: "@venusprotocol/governance-contracts@npm:1.1.0-dev.1" - checksum: 314335686f1073dfff01ecf761a79ef64e9ee0c7451780a55bc66866336f1295735f24eb1e9ac11da120a12f50d9a5d1c7f831f92231c9468db695818dc15a5b +"@venusprotocol/governance-contracts@npm:^1.3.0": + version: 1.3.0 + resolution: "@venusprotocol/governance-contracts@npm:1.3.0" + checksum: 9cbc44e5fffd2f33e273c96e3f77b2d9afe254b3f8c22533eecb96f79011715afafd72f2a716bab5509164fa4f3e0629b94450f16619bba221d8d5a9e632b610 languageName: node linkType: hard @@ -5084,23 +5077,23 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/oracle@npm:^1.7.2": - version: 1.7.2 - resolution: "@venusprotocol/oracle@npm:1.7.2" +"@venusprotocol/oracle@npm:^1.7.3-dev.1": + version: 1.7.3-dev.1 + resolution: "@venusprotocol/oracle@npm:1.7.3-dev.1" dependencies: "@chainlink/contracts": ^0.5.1 "@defi-wonderland/smock": ^2.3.4 "@nomicfoundation/hardhat-network-helpers": ^1.0.8 "@openzeppelin/contracts": ^4.6.0 "@openzeppelin/contracts-upgradeable": ^4.7.3 - "@venusprotocol/governance-contracts": ^0.0.2 + "@venusprotocol/governance-contracts": ^1.3.0 "@venusprotocol/venus-protocol": 0.7.0 ethers: ^5.6.8 hardhat: ^2.16.1 hardhat-deploy: ^0.11.14 module-alias: ^2.2.2 solidity-docgen: ^0.6.0-beta.29 - checksum: 71dc7faf761e110cda526dabbe2ac7bdda40849cccb6473647cf80edd6940e1cbe02528c270f83e9d14c7815cdfaf736a1acef3c8896cf04926f72a8c53ff9df + checksum: ae803c39e8fddeccff6d14c79d4a0974b6c910d45f16302870bfbb1d4374f56e19295d17ffb83eacb6fd3a1e4941f0200592ca729e493b2df691eb4ba4b0c34b languageName: node linkType: hard @@ -15769,9 +15762,9 @@ __metadata: "@types/mustache": ^4.2.1 "@typescript-eslint/eslint-plugin": ^5.40.1 "@typescript-eslint/parser": ^5.40.1 - "@venusprotocol/governance-contracts": ^1.1.0-dev.1 + "@venusprotocol/governance-contracts": ^1.3.0 "@venusprotocol/isolated-pools": 2.1.0-dev.2 - "@venusprotocol/oracle": ^1.7.2 + "@venusprotocol/oracle": ^1.7.3-dev.1 "@venusprotocol/venus-protocol": 3.1.0 assemblyscript: 0.19.23 chai: ^4.3.6