From 21b0ed448779e17450bc3a204c5f86d5ff3b80d4 Mon Sep 17 00:00:00 2001 From: wangjj9219 <183318287@qq.com> Date: Wed, 10 Jul 2024 00:28:54 +0800 Subject: [PATCH] impl earning predeploy contract --- contracts/docs/earning/Earning.md | 265 +++++++++++++++++++++++++++++ contracts/docs/earning/IEarning.md | 265 +++++++++++++++++++++++++++++ contracts/earning/Earning.sol | 135 +++++++++++++++ contracts/earning/IEarning.sol | 89 ++++++++++ contracts/utils/Predeploy.d.ts | 1 + contracts/utils/Predeploy.js | 2 + contracts/utils/Predeploy.sol | 1 + generate/generate.js | 5 + resources/bytecodes.json | 5 + resources/deployedBytecodes.json | 5 + 10 files changed, 773 insertions(+) create mode 100644 contracts/docs/earning/Earning.md create mode 100644 contracts/docs/earning/IEarning.md create mode 100644 contracts/earning/Earning.sol create mode 100644 contracts/earning/IEarning.sol diff --git a/contracts/docs/earning/Earning.md b/contracts/docs/earning/Earning.md new file mode 100644 index 0000000..869eec1 --- /dev/null +++ b/contracts/docs/earning/Earning.md @@ -0,0 +1,265 @@ +# Earning + +*Acala Developers* + +> Earning Predeploy Contract + +You can use this predeploy contract to call earning pallet + +*This contracts will interact with earning pallet* + +## Methods + +### bond + +```solidity +function bond(uint256 bondAmount) external nonpayable returns (bool) +``` + +Bond. + +*It'll emit an {Bonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| bondAmount | uint256 | The amount of native currency used to bond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### getBondingLedger + +```solidity +function getBondingLedger(address who) external view returns (struct IEarning.BondingLedger) +``` + +Get bonding ledger of `who`. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| who | address | undefined | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | IEarning.BondingLedger | returns (BondingLedger). | + +### getInstantUnstakeFee + +```solidity +function getInstantUnstakeFee() external view returns (uint256, uint256) +``` + +Get instant unstake fee ratio. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (percent, accuracy), the ratio is percent/accuracy | +| _1 | uint256 | undefined | + +### getMaxUnbondingChunks + +```solidity +function getMaxUnbondingChunks() external view returns (uint256) +``` + +Get the maximum unlocking chunk amount. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (maximum_chunks). | + +### getMinBond + +```solidity +function getMinBond() external view returns (uint256) +``` + +Get the minimum bond amount. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (min_bond). | + +### getUnbondingPeriod + +```solidity +function getUnbondingPeriod() external view returns (uint256) +``` + +Get unlocking block. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (unlock_block_number). | + +### rebond + +```solidity +function rebond(uint256 rebondAmount) external nonpayable returns (bool) +``` + +Rebond. + +*It'll emit an {Bonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| rebondAmount | uint256 | The amount of native currency used to rebond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### unbond + +```solidity +function unbond(uint256 unbondAmount) external nonpayable returns (bool) +``` + +Unbond. + +*It'll emit an {Unbonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| unbondAmount | uint256 | The amount of native currency used to unbond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### unbondInstant + +```solidity +function unbondInstant(uint256 unbondAmount) external nonpayable returns (bool) +``` + +Unbond instant. + +*It'll emit an {Unbonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| unbondAmount | uint256 | The amount of native currency used to unbond instant. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### withdrawUnbonded + +```solidity +function withdrawUnbonded() external nonpayable returns (bool) +``` + +Withdraw unbonded. + +*It'll emit an {Withdrawn} event.* + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + + + +## Events + +### Bonded + +```solidity +event Bonded(address indexed sender, uint256 amount) +``` + +Bonded event. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The bond amount. | + +### Unbonded + +```solidity +event Unbonded(address indexed sender, uint256 amount) +``` + +Unbonded event. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The unbond amount. | + +### Withdrawn + +```solidity +event Withdrawn(address indexed sender, uint256 amount) +``` + +Withdraw unbonded. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The withdrawn unbonded amount. | + + + diff --git a/contracts/docs/earning/IEarning.md b/contracts/docs/earning/IEarning.md new file mode 100644 index 0000000..d807fa4 --- /dev/null +++ b/contracts/docs/earning/IEarning.md @@ -0,0 +1,265 @@ +# IEarning + +*Acala Developers* + +> Earning Predeploy Contract Interface + +You can use this predeploy contract to call earning pallet + +*The interface through which solidity contracts will interact with earning pallet* + +## Methods + +### bond + +```solidity +function bond(uint256 bondAmount) external nonpayable returns (bool) +``` + +Bond. + +*It'll emit an {Bonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| bondAmount | uint256 | The amount of native currency used to bond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### getBondingLedger + +```solidity +function getBondingLedger(address who) external view returns (struct IEarning.BondingLedger) +``` + +Get bonding ledger of `who`. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| who | address | undefined | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | IEarning.BondingLedger | returns (BondingLedger). | + +### getInstantUnstakeFee + +```solidity +function getInstantUnstakeFee() external view returns (uint256, uint256) +``` + +Get instant unstake fee ratio. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (percent, accuracy), the ratio is percent/accuracy | +| _1 | uint256 | undefined | + +### getMaxUnbondingChunks + +```solidity +function getMaxUnbondingChunks() external view returns (uint256) +``` + +Get the maximum unlocking chunk amount. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (maximum_chunks). | + +### getMinBond + +```solidity +function getMinBond() external view returns (uint256) +``` + +Get the minimum bond amount. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (min_bond). | + +### getUnbondingPeriod + +```solidity +function getUnbondingPeriod() external view returns (uint256) +``` + +Get unlocking block. + + + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | uint256 | returns (unlock_block_number). | + +### rebond + +```solidity +function rebond(uint256 rebondAmount) external nonpayable returns (bool) +``` + +Rebond. + +*It'll emit an {Bonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| rebondAmount | uint256 | The amount of native currency used to rebond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### unbond + +```solidity +function unbond(uint256 unbondAmount) external nonpayable returns (bool) +``` + +Unbond. + +*It'll emit an {Unbonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| unbondAmount | uint256 | The amount of native currency used to unbond. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### unbondInstant + +```solidity +function unbondInstant(uint256 unbondAmount) external nonpayable returns (bool) +``` + +Unbond instant. + +*It'll emit an {Unbonded} event.* + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| unbondAmount | uint256 | The amount of native currency used to unbond instant. | + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + +### withdrawUnbonded + +```solidity +function withdrawUnbonded() external nonpayable returns (bool) +``` + +Withdraw unbonded. + +*It'll emit an {Withdrawn} event.* + + +#### Returns + +| Name | Type | Description | +|---|---|---| +| _0 | bool | Returns a boolean value indicating whether the operation succeeded. | + + + +## Events + +### Bonded + +```solidity +event Bonded(address indexed sender, uint256 amount) +``` + +Bonded event. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The bond amount. | + +### Unbonded + +```solidity +event Unbonded(address indexed sender, uint256 amount) +``` + +Unbonded event. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The unbond amount. | + +### Withdrawn + +```solidity +event Withdrawn(address indexed sender, uint256 amount) +``` + +Withdraw unbonded. + + + +#### Parameters + +| Name | Type | Description | +|---|---|---| +| sender `indexed` | address | The sender of the transaction. | +| amount | uint256 | The withdrawn unbonded amount. | + + + diff --git a/contracts/earning/Earning.sol b/contracts/earning/Earning.sol new file mode 100644 index 0000000..51797c9 --- /dev/null +++ b/contracts/earning/Earning.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +pragma solidity ^0.8.0; + +import {IEarning} from "./IEarning.sol"; + +/// @title Earning Predeploy Contract +/// @author Acala Developers +/// @notice You can use this predeploy contract to call earning pallet +/// @dev This contracts will interact with earning pallet +contract Earning is IEarning { + /// @dev The Earning precompile address. + address private constant PRECOMPILE = address(0x000000000000000000000000000000000000040d); + + /// @inheritdoc IEarning + function bond(uint256 bondAmount) public override returns (bool) { + require(bondAmount != 0, "Earning: bondAmount is zero"); + + (bool success, bytes memory returnData) = + PRECOMPILE.call(abi.encodeWithSignature("bond(address,uint256)", msg.sender, bondAmount)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + emit Bonded(msg.sender, abi.decode(returnData, (uint256))); + return true; + } + + /// @inheritdoc IEarning + function unbond(uint256 unbondAmount) public override returns (bool) { + require(unbondAmount != 0, "Earning: unbondAmount is zero"); + + (bool success, bytes memory returnData) = + PRECOMPILE.call(abi.encodeWithSignature("unbond(address,uint256)", msg.sender, unbondAmount)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + emit Unbonded(msg.sender, abi.decode(returnData, (uint256))); + return true; + } + + /// @inheritdoc IEarning + function unbondInstant(uint256 unbondAmount) public override returns (bool) { + require(unbondAmount != 0, "Earning: unbondAmount is zero"); + + (bool success, bytes memory returnData) = + PRECOMPILE.call(abi.encodeWithSignature("unbondInstant(address,uint256)", msg.sender, unbondAmount)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + emit Unbonded(msg.sender, abi.decode(returnData, (uint256))); + return true; + } + + /// @inheritdoc IEarning + function rebond(uint256 rebondAmount) public override returns (bool) { + require(rebondAmount != 0, "Earning: rebondAmount is zero"); + + (bool success, bytes memory returnData) = + PRECOMPILE.call(abi.encodeWithSignature("rebond(address,uint256)", msg.sender, rebondAmount)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + emit Bonded(msg.sender, abi.decode(returnData, (uint256))); + return true; + } + + /// @inheritdoc IEarning + function withdrawUnbonded() public override returns (bool) { + (bool success, bytes memory returnData) = + PRECOMPILE.call(abi.encodeWithSignature("withdrawUnbonded(address)", msg.sender)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + emit Withdrawn(msg.sender, abi.decode(returnData, (uint256))); + return true; + } + + /// @inheritdoc IEarning + function getBondingLedger(address who) public view override returns (BondingLedger memory) { + (bool success, bytes memory returnData) = + PRECOMPILE.staticcall(abi.encodeWithSignature("getBondingLedger(address)", who)); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + return abi.decode(returnData, (BondingLedger)); + } + + /// @inheritdoc IEarning + function getInstantUnstakeFee() public view override returns (uint256, uint256) { + (bool success, bytes memory returnData) = + PRECOMPILE.staticcall(abi.encodeWithSignature("getInstantUnstakeFee()")); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + return abi.decode(returnData, (uint256, uint256)); + } + + /// @inheritdoc IEarning + function getMinBond() public view override returns (uint256) { + (bool success, bytes memory returnData) = PRECOMPILE.staticcall(abi.encodeWithSignature("getMinBond()")); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + return abi.decode(returnData, (uint256)); + } + + /// @inheritdoc IEarning + function getUnbondingPeriod() public view override returns (uint256) { + (bool success, bytes memory returnData) = PRECOMPILE.staticcall(abi.encodeWithSignature("getUnbondingPeriod()")); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + return abi.decode(returnData, (uint256)); + } + + /// @inheritdoc IEarning + function getMaxUnbondingChunks() public view override returns (uint256) { + (bool success, bytes memory returnData) = + PRECOMPILE.staticcall(abi.encodeWithSignature("getMaxUnbondingChunks()")); + assembly { + if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } + } + + return abi.decode(returnData, (uint256)); + } +} diff --git a/contracts/earning/IEarning.sol b/contracts/earning/IEarning.sol new file mode 100644 index 0000000..87e1179 --- /dev/null +++ b/contracts/earning/IEarning.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +pragma solidity ^0.8.0; + +/// @title Earning Predeploy Contract Interface +/// @author Acala Developers +/// @notice You can use this predeploy contract to call earning pallet +/// @dev The interface through which solidity contracts will interact with earning pallet +interface IEarning { + struct BondingLedger { + // Total amount of ledger + uint256 total; + // Bonded amount + uint256 active; + // Unbonding + UnlockChunk[] unlocking; + } + + struct UnlockChunk { + // Unbonding value + uint256 value; + // Expired block for unbonding + uint256 unlockAt; + } + + /// @notice Bonded event. + /// @param sender The sender of the transaction. + /// @param amount The bond amount. + event Bonded(address indexed sender, uint256 amount); + + /// @notice Unbonded event. + /// @param sender The sender of the transaction. + /// @param amount The unbond amount. + event Unbonded(address indexed sender, uint256 amount); + + /// @notice Withdraw unbonded. + /// @param sender The sender of the transaction. + /// @param amount The withdrawn unbonded amount. + event Withdrawn(address indexed sender, uint256 amount); + + /// @notice Bond. + /// @dev It'll emit an {Bonded} event. + /// @param bondAmount The amount of native currency used to bond. + /// @return Returns a boolean value indicating whether the operation succeeded. + function bond(uint256 bondAmount) external returns (bool); + + /// @notice Unbond. + /// @dev It'll emit an {Unbonded} event. + /// @param unbondAmount The amount of native currency used to unbond. + /// @return Returns a boolean value indicating whether the operation succeeded. + function unbond(uint256 unbondAmount) external returns (bool); + + /// @notice Unbond instant. + /// @dev It'll emit an {Unbonded} event. + /// @param unbondAmount The amount of native currency used to unbond instant. + /// @return Returns a boolean value indicating whether the operation succeeded. + function unbondInstant(uint256 unbondAmount) external returns (bool); + + /// @notice Rebond. + /// @dev It'll emit an {Bonded} event. + /// @param rebondAmount The amount of native currency used to rebond. + /// @return Returns a boolean value indicating whether the operation succeeded. + function rebond(uint256 rebondAmount) external returns (bool); + + /// @notice Withdraw unbonded. + /// @dev It'll emit an {Withdrawn} event. + /// @return Returns a boolean value indicating whether the operation succeeded. + function withdrawUnbonded() external returns (bool); + + /// @notice Get bonding ledger of `who`. + /// @return returns (BondingLedger). + function getBondingLedger(address who) external view returns (BondingLedger memory); + + /// @notice Get instant unstake fee ratio. + /// @return returns (percent, accuracy), the ratio is percent/accuracy + function getInstantUnstakeFee() external view returns (uint256, uint256); + + /// @notice Get the minimum bond amount. + /// @return returns (min_bond). + function getMinBond() external view returns (uint256); + + /// @notice Get unlocking block. + /// @return returns (unlock_block_number). + function getUnbondingPeriod() external view returns (uint256); + + /// @notice Get the maximum unlocking chunk amount. + /// @return returns (maximum_chunks). + function getMaxUnbondingChunks() external view returns (uint256); +} diff --git a/contracts/utils/Predeploy.d.ts b/contracts/utils/Predeploy.d.ts index 62e686d..8fba0ad 100644 --- a/contracts/utils/Predeploy.d.ts +++ b/contracts/utils/Predeploy.d.ts @@ -9,3 +9,4 @@ export const HONZON: "0x0000000000000000000000000000000000000807"; export const INCENTIVES: "0x0000000000000000000000000000000000000808"; export const XTOKENS: "0x0000000000000000000000000000000000000809"; export const LIQUID_CROWDLOAN: "0x000000000000000000000000000000000000080a"; +export const EARNING: "0x000000000000000000000000000000000000080b"; diff --git a/contracts/utils/Predeploy.js b/contracts/utils/Predeploy.js index 03ddc0c..9423f9a 100644 --- a/contracts/utils/Predeploy.js +++ b/contracts/utils/Predeploy.js @@ -9,6 +9,7 @@ const HONZON = '0x0000000000000000000000000000000000000807'; const INCENTIVES = '0x0000000000000000000000000000000000000808'; const XTOKENS = '0x0000000000000000000000000000000000000809'; const LIQUID_CROWDLOAN = '0x000000000000000000000000000000000000080a'; +const EARNING = '0x000000000000000000000000000000000000080b'; module.exports = { EVM, @@ -22,4 +23,5 @@ module.exports = { INCENTIVES, XTOKENS, LIQUID_CROWDLOAN, + EARNING, } diff --git a/contracts/utils/Predeploy.sol b/contracts/utils/Predeploy.sol index 7269174..ba465d3 100644 --- a/contracts/utils/Predeploy.sol +++ b/contracts/utils/Predeploy.sol @@ -13,3 +13,4 @@ address constant HONZON = 0x0000000000000000000000000000000000000807; address constant INCENTIVES = 0x0000000000000000000000000000000000000808; address constant XTOKENS = 0x0000000000000000000000000000000000000809; address constant LIQUID_CROWDLOAN = 0x000000000000000000000000000000000000080a; +address constant EARNING = 0x000000000000000000000000000000000000080b; diff --git a/generate/generate.js b/generate/generate.js index 5ad646d..d07a46e 100644 --- a/generate/generate.js +++ b/generate/generate.js @@ -104,6 +104,11 @@ const generate = async () => { bytecodes.push(['LIQUID_CROWDLOAN', ethers.utils.getAddress('0x000000000000000000000000000000000000080a'), liquidCrowdloan]); deployedBytecodes.push(['LIQUID_CROWDLOAN', ethers.utils.getAddress('0x000000000000000000000000000000000000080a'), liquidCrowdloanDeployedBytecode]); + // add Earning bytecodes + const { bytecode: earning, deployedBytecode: earningDeployedBytecode } = await hre.artifacts.readArtifact("Earning"); + bytecodes.push(['EARNING', ethers.utils.getAddress('0x000000000000000000000000000000000000080b'), earning]); + deployedBytecodes.push(['EARNING', ethers.utils.getAddress('0x000000000000000000000000000000000000080b'), earningDeployedBytecode]); + // Maybe each nft will deploy a contract, like the mirrored token. // add NFT bytecodes // const { bytecode: nft } = require(`../build/contracts/NFT.json`); diff --git a/resources/bytecodes.json b/resources/bytecodes.json index 2d4ed21..56dbcf9 100644 --- a/resources/bytecodes.json +++ b/resources/bytecodes.json @@ -438,5 +438,10 @@ "LIQUID_CROWDLOAN", "0x000000000000000000000000000000000000080a", "0x608060405234801561001057600080fd5b506103f9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063785ad4c31461003b578063db006a751461006d575b600080fd5b61004361008e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61008061007b366004610325565b610168565b604051908152602001610064565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f785ad4c30000000000000000000000000000000000000000000000000000000017905290516000918291829161040c916100fb919061033e565b600060405180830381855afa9150503d8060008114610136576040519150601f19603f3d011682016040523d82523d6000602084013e61013b565b606091505b5090925090508161014d573d60208201fd5b80806020019051810190610161919061036d565b9250505090565b6000816000036101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c697175696443726f77646c6f616e3a20616d6f756e74206973207a65726f00604482015260640160405180910390fd5b60405133602482015260448101839052600090819061040c90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1e9a69500000000000000000000000000000000000000000000000000000000017905251610275919061033e565b6000604051808303816000865af19150503d80600081146102b2576040519150601f19603f3d011682016040523d82523d6000602084013e6102b7565b606091505b509092509050816102c9573d60208201fd5b6000818060200190518101906102df91906103aa565b604080518781526020810183905291925033917ff3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262910160405180910390a2949350505050565b60006020828403121561033757600080fd5b5035919050565b6000825160005b8181101561035f5760208186018101518583015201610345565b506000920191825250919050565b60006020828403121561037f57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146103a357600080fd5b9392505050565b6000602082840312156103bc57600080fd5b505191905056fea2646970667358221220636c37478c7ef95cc2ac370e5faf1678853c55aac8381b7f6775de734075e8eb64736f6c63430008120033" + ], + [ + "EARNING", + "0x000000000000000000000000000000000000080b", + "0x608060405234801561001057600080fd5b50610f74806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80636fd2c80b116100765780639940686e1161005b5780639940686e1461014c578063c3e07c041461015f578063eaffb3f91461017c57600080fd5b80636fd2c80b146101315780637384977d1461013957600080fd5b8063361592d7116100a7578063361592d7146101015780635990dc2b146101215780636e373bef1461012957600080fd5b806309bfc8a1146100c357806327de9e32146100de575b600080fd5b6100cb61018f565b6040519081526020015b60405180910390f35b6100f16100ec366004610c35565b610269565b60405190151581526020016100d5565b61011461010f366004610c4e565b610432565b6040516100d59190610c8b565b6100cb610570565b6100f16105dd565b6100cb61072f565b6100f1610147366004610c35565b61079c565b6100f161015a366004610c35565b6108a5565b610167610a4e565b604080519283526020830191909152016100d5565b6100f161018a366004610c35565b610b2c565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f09bfc8a10000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b600060405180830381855afa9150503d8060008114610237576040519150601f19603f3d011682016040523d82523d6000602084013e61023c565b606091505b5090925090508161024e573d60208201fd5b808060200190518101906102629190610d2a565b9250505090565b6000816000036102da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a20756e626f6e64416d6f756e74206973207a65726f00000060448201526064015b60405180910390fd5b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa5d059ca00000000000000000000000000000000000000000000000000000000179052516103779190610cfb565b6000604051808303816000865af19150503d80600081146103b4576040519150601f19603f3d011682016040523d82523d6000602084013e6103b9565b606091505b509092509050816103cb573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd24dbf5e9299ce53c3aa9f7227ff1cc8441c2faae04509aa370ca3703385d6b4828060200190518101906104179190610d2a565b60405190815260200160405180910390a25060019392505050565b61045660405180606001604052806000815260200160008152602001606081525090565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152600090819061040d90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f361592d700000000000000000000000000000000000000000000000000000000179052516105029190610cfb565b600060405180830381855afa9150503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b50909250905081610554573d60208201fd5b808060200190518101906105689190610e0d565b949350505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f5990dc2b0000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b6040513360248201526000908190819061040d90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167faeffaa4700000000000000000000000000000000000000000000000000000000179052516106759190610cfb565b6000604051808303816000865af19150503d80600081146106b2576040519150601f19603f3d011682016040523d82523d6000602084013e6106b7565b606091505b509092509050816106c9573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5828060200190518101906107159190610d2a565b60405190815260200160405180910390a260019250505090565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f6fd2c80b0000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b600081600003610808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a20756e626f6e64416d6f756e74206973207a65726f00000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd15a4d6000000000000000000000000000000000000000000000000000000000179052516103779190610cfb565b600081600003610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4561726e696e673a20626f6e64416d6f756e74206973207a65726f000000000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa515366a00000000000000000000000000000000000000000000000000000000179052516109ae9190610cfb565b6000604051808303816000865af19150503d80600081146109eb576040519150601f19603f3d011682016040523d82523d6000602084013e6109f0565b606091505b50909250905081610a02573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd0a009034e24a39106653c4903cf28b1947b8a9964d03206648e0f0a5de74a46828060200190518101906104179190610d2a565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc3e07c0400000000000000000000000000000000000000000000000000000000179052905160009182918291829161040d91610abc91610cfb565b600060405180830381855afa9150503d8060008114610af7576040519150601f19603f3d011682016040523d82523d6000602084013e610afc565b606091505b50909250905081610b0e573d60208201fd5b80806020019051810190610b229190610f1a565b9350935050509091565b600081600003610b98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a207265626f6e64416d6f756e74206973207a65726f00000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f92d1b78400000000000000000000000000000000000000000000000000000000179052516109ae9190610cfb565b600060208284031215610c4757600080fd5b5035919050565b600060208284031215610c6057600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610c8457600080fd5b9392505050565b602080825282518282015282810151604080840191909152808401516060808501528051608085018190526000939291830191849160a08701905b80841015610cef5784518051835286015186830152938501936001939093019290820190610cc6565b50979650505050505050565b6000825160005b81811015610d1c5760208186018101518583015201610d02565b506000920191825250919050565b600060208284031215610d3c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610d9557610d95610d43565b60405290565b6040805190810167ffffffffffffffff81118282101715610d9557610d95610d43565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610e0557610e05610d43565b604052919050565b60006020808385031215610e2057600080fd5b825167ffffffffffffffff80821115610e3857600080fd5b9084019060608287031215610e4c57600080fd5b610e54610d72565b82518152838301518482015260408084015183811115610e7357600080fd5b80850194505087601f850112610e8857600080fd5b835183811115610e9a57610e9a610d43565b610ea8868260051b01610dbe565b818152868101945060069190911b850186019089821115610ec857600080fd5b948601945b81861015610f085782868b031215610ee55760008081fd5b610eed610d9b565b86518152878701518882015285529482019493860193610ecd565b91830191909152509695505050505050565b60008060408385031215610f2d57600080fd5b50508051602090910151909290915056fea26469706673582212209371e369556f69cfb94940414b0ab778e684e0014179ae10992d36644970755464736f6c63430008120033" ] ] \ No newline at end of file diff --git a/resources/deployedBytecodes.json b/resources/deployedBytecodes.json index 5072f00..dc4f0de 100644 --- a/resources/deployedBytecodes.json +++ b/resources/deployedBytecodes.json @@ -438,5 +438,10 @@ "LIQUID_CROWDLOAN", "0x000000000000000000000000000000000000080a", "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063785ad4c31461003b578063db006a751461006d575b600080fd5b61004361008e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61008061007b366004610325565b610168565b604051908152602001610064565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f785ad4c30000000000000000000000000000000000000000000000000000000017905290516000918291829161040c916100fb919061033e565b600060405180830381855afa9150503d8060008114610136576040519150601f19603f3d011682016040523d82523d6000602084013e61013b565b606091505b5090925090508161014d573d60208201fd5b80806020019051810190610161919061036d565b9250505090565b6000816000036101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c697175696443726f77646c6f616e3a20616d6f756e74206973207a65726f00604482015260640160405180910390fd5b60405133602482015260448101839052600090819061040c90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1e9a69500000000000000000000000000000000000000000000000000000000017905251610275919061033e565b6000604051808303816000865af19150503d80600081146102b2576040519150601f19603f3d011682016040523d82523d6000602084013e6102b7565b606091505b509092509050816102c9573d60208201fd5b6000818060200190518101906102df91906103aa565b604080518781526020810183905291925033917ff3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262910160405180910390a2949350505050565b60006020828403121561033757600080fd5b5035919050565b6000825160005b8181101561035f5760208186018101518583015201610345565b506000920191825250919050565b60006020828403121561037f57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146103a357600080fd5b9392505050565b6000602082840312156103bc57600080fd5b505191905056fea2646970667358221220636c37478c7ef95cc2ac370e5faf1678853c55aac8381b7f6775de734075e8eb64736f6c63430008120033" + ], + [ + "EARNING", + "0x000000000000000000000000000000000000080b", + "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c80636fd2c80b116100765780639940686e1161005b5780639940686e1461014c578063c3e07c041461015f578063eaffb3f91461017c57600080fd5b80636fd2c80b146101315780637384977d1461013957600080fd5b8063361592d7116100a7578063361592d7146101015780635990dc2b146101215780636e373bef1461012957600080fd5b806309bfc8a1146100c357806327de9e32146100de575b600080fd5b6100cb61018f565b6040519081526020015b60405180910390f35b6100f16100ec366004610c35565b610269565b60405190151581526020016100d5565b61011461010f366004610c4e565b610432565b6040516100d59190610c8b565b6100cb610570565b6100f16105dd565b6100cb61072f565b6100f1610147366004610c35565b61079c565b6100f161015a366004610c35565b6108a5565b610167610a4e565b604080519283526020830191909152016100d5565b6100f161018a366004610c35565b610b2c565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f09bfc8a10000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b600060405180830381855afa9150503d8060008114610237576040519150601f19603f3d011682016040523d82523d6000602084013e61023c565b606091505b5090925090508161024e573d60208201fd5b808060200190518101906102629190610d2a565b9250505090565b6000816000036102da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a20756e626f6e64416d6f756e74206973207a65726f00000060448201526064015b60405180910390fd5b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa5d059ca00000000000000000000000000000000000000000000000000000000179052516103779190610cfb565b6000604051808303816000865af19150503d80600081146103b4576040519150601f19603f3d011682016040523d82523d6000602084013e6103b9565b606091505b509092509050816103cb573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd24dbf5e9299ce53c3aa9f7227ff1cc8441c2faae04509aa370ca3703385d6b4828060200190518101906104179190610d2a565b60405190815260200160405180910390a25060019392505050565b61045660405180606001604052806000815260200160008152602001606081525090565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152600090819061040d90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f361592d700000000000000000000000000000000000000000000000000000000179052516105029190610cfb565b600060405180830381855afa9150503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b50909250905081610554573d60208201fd5b808060200190518101906105689190610e0d565b949350505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f5990dc2b0000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b6040513360248201526000908190819061040d90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167faeffaa4700000000000000000000000000000000000000000000000000000000179052516106759190610cfb565b6000604051808303816000865af19150503d80600081146106b2576040519150601f19603f3d011682016040523d82523d6000602084013e6106b7565b606091505b509092509050816106c9573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5828060200190518101906107159190610d2a565b60405190815260200160405180910390a260019250505090565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f6fd2c80b0000000000000000000000000000000000000000000000000000000017905290516000918291829161040d916101fc9190610cfb565b600081600003610808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a20756e626f6e64416d6f756e74206973207a65726f00000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd15a4d6000000000000000000000000000000000000000000000000000000000179052516103779190610cfb565b600081600003610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4561726e696e673a20626f6e64416d6f756e74206973207a65726f000000000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa515366a00000000000000000000000000000000000000000000000000000000179052516109ae9190610cfb565b6000604051808303816000865af19150503d80600081146109eb576040519150601f19603f3d011682016040523d82523d6000602084013e6109f0565b606091505b50909250905081610a02573d60208201fd5b3373ffffffffffffffffffffffffffffffffffffffff167fd0a009034e24a39106653c4903cf28b1947b8a9964d03206648e0f0a5de74a46828060200190518101906104179190610d2a565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc3e07c0400000000000000000000000000000000000000000000000000000000179052905160009182918291829161040d91610abc91610cfb565b600060405180830381855afa9150503d8060008114610af7576040519150601f19603f3d011682016040523d82523d6000602084013e610afc565b606091505b50909250905081610b0e573d60208201fd5b80806020019051810190610b229190610f1a565b9350935050509091565b600081600003610b98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4561726e696e673a207265626f6e64416d6f756e74206973207a65726f00000060448201526064016102d1565b60405133602482015260448101839052600090819061040d90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f92d1b78400000000000000000000000000000000000000000000000000000000179052516109ae9190610cfb565b600060208284031215610c4757600080fd5b5035919050565b600060208284031215610c6057600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610c8457600080fd5b9392505050565b602080825282518282015282810151604080840191909152808401516060808501528051608085018190526000939291830191849160a08701905b80841015610cef5784518051835286015186830152938501936001939093019290820190610cc6565b50979650505050505050565b6000825160005b81811015610d1c5760208186018101518583015201610d02565b506000920191825250919050565b600060208284031215610d3c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610d9557610d95610d43565b60405290565b6040805190810167ffffffffffffffff81118282101715610d9557610d95610d43565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610e0557610e05610d43565b604052919050565b60006020808385031215610e2057600080fd5b825167ffffffffffffffff80821115610e3857600080fd5b9084019060608287031215610e4c57600080fd5b610e54610d72565b82518152838301518482015260408084015183811115610e7357600080fd5b80850194505087601f850112610e8857600080fd5b835183811115610e9a57610e9a610d43565b610ea8868260051b01610dbe565b818152868101945060069190911b850186019089821115610ec857600080fd5b948601945b81861015610f085782868b031215610ee55760008081fd5b610eed610d9b565b86518152878701518882015285529482019493860193610ecd565b91830191909152509695505050505050565b60008060408385031215610f2d57600080fd5b50508051602090910151909290915056fea26469706673582212209371e369556f69cfb94940414b0ab778e684e0014179ae10992d36644970755464736f6c63430008120033" ] ] \ No newline at end of file