Source Code
Overview
S Balance
0 S
More Info
ContractCreator
Loading...
Loading
Contract Name:
ReferralStorage
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at testnet.sonicscan.org on 2024-12-15 */ pragma solidity 0.6.12; contract Governable { address public gov; constructor() public { gov = msg.sender; } modifier onlyGov() { require(msg.sender == gov, "Governable: forbidden"); _; } function setGov(address _gov) external onlyGov { gov = _gov; } } // File contracts/peripherals/interfaces/ITimelock.sol // pragma solidity 0.6.12; interface ITimelock { function setAdmin(address _admin) external; function enableLeverage(address _vault) external; function disableLeverage(address _vault) external; function setIsLeverageEnabled(address _vault, bool _isLeverageEnabled) external; function signalSetGov(address _target, address _gov) external; } // File contracts/libraries/math/SafeMath.sol // pragma solidity 0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File contracts/referrals/interfaces/IReferralStorage.sol // pragma solidity 0.6.12; interface IReferralStorage { function codeOwners(bytes32 _code) external view returns (address); function traderReferralCodes(address _account) external view returns (bytes32); function referrerDiscountShares(address _account) external view returns (uint256); function referrerTiers(address _account) external view returns (uint256); function getTraderReferralInfo(address _account) external view returns (bytes32, address); function setTraderReferralCode(address _account, bytes32 _code) external; function setTier(uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external; function setReferrerTier(address _referrer, uint256 _tierId) external; function govSetCodeOwner(bytes32 _code, address _newAccount) external; } // File contracts/referrals/ReferralStorage.sol // pragma solidity ^0.6.0; contract ReferralStorage is Governable, IReferralStorage { using SafeMath for uint256; struct Tier { uint256 totalRebate; // e.g. 2400 for 24% uint256 discountShare; // 5000 for 50%/50%, 7000 for 30% rebates/70% discount } uint256 public constant BASIS_POINTS = 10000; mapping (address => uint256) public override referrerDiscountShares; // to override default value in tier mapping (address => uint256) public override referrerTiers; // link between user <> tier mapping (uint256 => Tier) public tiers; mapping (address => bool) public isHandler; mapping (bytes32 => address) public override codeOwners; mapping (address => bytes32) public override traderReferralCodes; event SetHandler(address handler, bool isActive); event SetTraderReferralCode(address account, bytes32 code); event SetTier(uint256 tierId, uint256 totalRebate, uint256 discountShare); event SetReferrerTier(address referrer, uint256 tierId); event SetReferrerDiscountShare(address referrer, uint256 discountShare); event RegisterCode(address account, bytes32 code); event SetCodeOwner(address account, address newAccount, bytes32 code); event GovSetCodeOwner(bytes32 code, address newAccount); modifier onlyHandler() { require(isHandler[msg.sender], "ReferralStorage: forbidden"); _; } function setHandler(address _handler, bool _isActive) external onlyGov { isHandler[_handler] = _isActive; emit SetHandler(_handler, _isActive); } function setTier(uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external override onlyGov { require(_totalRebate <= BASIS_POINTS, "ReferralStorage: invalid totalRebate"); require(_discountShare <= BASIS_POINTS, "ReferralStorage: invalid discountShare"); Tier memory tier = tiers[_tierId]; tier.totalRebate = _totalRebate; tier.discountShare = _discountShare; tiers[_tierId] = tier; emit SetTier(_tierId, _totalRebate, _discountShare); } function setReferrerTier(address _referrer, uint256 _tierId) external override onlyGov { referrerTiers[_referrer] = _tierId; emit SetReferrerTier(_referrer, _tierId); } function setReferrerDiscountShare(uint256 _discountShare) external { require(_discountShare <= BASIS_POINTS, "ReferralStorage: invalid discountShare"); referrerDiscountShares[msg.sender] = _discountShare; emit SetReferrerDiscountShare(msg.sender, _discountShare); } function setTraderReferralCode(address _account, bytes32 _code) external override onlyHandler { _setTraderReferralCode(_account, _code); } function setTraderReferralCodeByUser(bytes32 _code) external { _setTraderReferralCode(msg.sender, _code); } function registerCode(bytes32 _code) external { require(_code != bytes32(0), "ReferralStorage: invalid _code"); require(codeOwners[_code] == address(0), "ReferralStorage: code already exists"); codeOwners[_code] = msg.sender; emit RegisterCode(msg.sender, _code); } function setCodeOwner(bytes32 _code, address _newAccount) external { require(_code != bytes32(0), "ReferralStorage: invalid _code"); address account = codeOwners[_code]; require(msg.sender == account, "ReferralStorage: forbidden"); codeOwners[_code] = _newAccount; emit SetCodeOwner(msg.sender, _newAccount, _code); } function govSetCodeOwner(bytes32 _code, address _newAccount) external override onlyGov { require(_code != bytes32(0), "ReferralStorage: invalid _code"); codeOwners[_code] = _newAccount; emit GovSetCodeOwner(_code, _newAccount); } function getTraderReferralInfo(address _account) external override view returns (bytes32, address) { bytes32 code = traderReferralCodes[_account]; address referrer; if (code != bytes32(0)) { referrer = codeOwners[code]; } return (code, referrer); } function _setTraderReferralCode(address _account, bytes32 _code) private { traderReferralCodes[_account] = _code; emit SetTraderReferralCode(_account, _code); } }
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"},{"indexed":false,"internalType":"address","name":"newAccount","type":"address"}],"name":"GovSetCodeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"RegisterCode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"newAccount","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"SetCodeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"SetHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"discountShare","type":"uint256"}],"name":"SetReferrerDiscountShare","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"tierId","type":"uint256"}],"name":"SetReferrerTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tierId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalRebate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"discountShare","type":"uint256"}],"name":"SetTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"code","type":"bytes32"}],"name":"SetTraderReferralCode","type":"event"},{"inputs":[],"name":"BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"codeOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getTraderReferralInfo","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"},{"internalType":"address","name":"_newAccount","type":"address"}],"name":"govSetCodeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrerDiscountShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referrerTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"registerCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"},{"internalType":"address","name":"_newAccount","type":"address"}],"name":"setCodeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountShare","type":"uint256"}],"name":"setReferrerDiscountShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_tierId","type":"uint256"}],"name":"setReferrerTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tierId","type":"uint256"},{"internalType":"uint256","name":"_totalRebate","type":"uint256"},{"internalType":"uint256","name":"_discountShare","type":"uint256"}],"name":"setTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"setTraderReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_code","type":"bytes32"}],"name":"setTraderReferralCodeByUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"totalRebate","type":"uint256"},{"internalType":"uint256","name":"discountShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"traderReferralCodes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610d59806100326000396000f3fe608060405234801561001057600080fd5b50600436106100f15760003560e01c8063039af9eb146100f657806312d43a511461012c5780631582a0181461015057806336def2c8146101885780633fb8b323146101a757806346ea87af146101d3578063534ef8831461020d57806356b4b2ad1461025457806371a6a79014610280578063836a0187146102a657806385725b58146102cf5780639c8e2de9146102f55780639cb7de4b14610312578063c8b3c46014610340578063cfad57a21461035d578063dfcfa25014610383578063e1e01bf3146103af578063e1f1c4a7146103cc578063ed843134146103d4575b600080fd5b6101136004803603602081101561010c57600080fd5b5035610400565b6040805192835260208301919091528051918290030190f35b610134610419565b604080516001600160a01b039092168252519081900360200190f35b6101766004803603602081101561016657600080fd5b50356001600160a01b0316610428565b60408051918252519081900360200190f35b6101a56004803603602081101561019e57600080fd5b503561043a565b005b6101a5600480360360408110156101bd57600080fd5b506001600160a01b03813516906020013561052e565b6101f9600480360360208110156101e957600080fd5b50356001600160a01b03166105d4565b604080519115158252519081900360200190f35b6102336004803603602081101561022357600080fd5b50356001600160a01b03166105e9565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101a56004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561062f565b6101766004803603602081101561029657600080fd5b50356001600160a01b031661069e565b6101a5600480360360608110156102bc57600080fd5b50803590602081013590604001356106b0565b610176600480360360208110156102e557600080fd5b50356001600160a01b0316610805565b6101a56004803603602081101561030b57600080fd5b5035610817565b6101a56004803603604081101561032857600080fd5b506001600160a01b03813516906020013515156108a7565b6101346004803603602081101561035657600080fd5b5035610958565b6101a56004803603602081101561037357600080fd5b50356001600160a01b0316610973565b6101a56004803603604081101561039957600080fd5b50803590602001356001600160a01b03166109e2565b6101a5600480360360208110156103c557600080fd5b5035610ad7565b610176610ae4565b6101a5600480360360408110156103ea57600080fd5b50803590602001356001600160a01b0316610aea565b6003602052600090815260409020805460019091015482565b6000546001600160a01b031681565b60026020526000908152604090205481565b8061047a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b0316156104ce5760405162461bcd60e51b8152600401808060200182810382526024815260200180610cda6024913960400191505060405180910390fd5b60008181526005602090815260409182902080546001600160a01b03191633908117909155825190815290810183905281517f04f82286a2a3b2ee5c8555de8304dfe2ea70991613213184b73a9e408d2d8029929181900390910190a150565b6000546001600160a01b0316331461057b576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152600260209081526040918290208490558151928352820183905280517f7696855cdbb94bb5a44cb0a95caff6f29173aa1cbfba193834b12b90827ce2bc9281900390910190a15050565b60046020526000908152604090205460ff1681565b6001600160a01b038116600090815260066020526040812054819081811561062557506000818152600560205260409020546001600160a01b03165b9092509050915091565b3360009081526004602052604090205460ff16610690576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b61069a8282610c02565b5050565b60016020526000908152604090205481565b6000546001600160a01b031633146106fd576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b61271082111561073e5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c966024913960400191505060405180910390fd5b61271081111561077f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b610787610c5b565b50600083815260036020818152604080842081518083018352878152808401878152958990529383528351815593516001909401939093558251868152908101859052808301849052915190917f4ebd23a492b2bd79586cb57cae40d7793408265f20320f68b478b971e696f4c7919081900360600190a150505050565b60066020526000908152604090205481565b6127108111156108585760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b336000818152600160209081526040918290208490558151928352820183905280517fbd224f3917462b0fa80805fe3ec29be3a37f664955aad6224e5ece036224c4299281900390910190a150565b6000546001600160a01b031633146108f4576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517fd373464a39404e5f98fdb4b152b8ba9a094561e97e5c4b4ea11eb18cd9e6695e9281900390910190a15050565b6005602052600090815260409020546001600160a01b031681565b6000546001600160a01b031633146109c0576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a2f576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b81610a6f576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b60008281526005602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518581529182015281517f6431f88c655dd0e2b8d09b6405c007c515c66d67f2998e69c902873a8c8f3e97929181900390910190a15050565b610ae13382610c02565b50565b61271081565b81610b2a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000828152600560205260409020546001600160a01b0316338114610b93576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b60008381526005602090815260409182902080546001600160a01b0386166001600160a01b0319909116811790915582513381529182015280820185905290517f5640856798d41ce9ca0a109b54c20a06eb99ba9c36ab4547115dafb8473cf3979181900360600190a1505050565b6001600160a01b0382166000818152600660209081526040918290208490558151928352820183905280517f43825f14567dda057e821be2e51a5aa79aa51f3907a647e3ed2bd486a01050f19281900390910190a15050565b60405180604001604052806000815260200160008152509056fe476f7665726e61626c653a20666f7262696464656e0000000000000000000000526566657272616c53746f726167653a20696e76616c696420746f74616c526562617465526566657272616c53746f726167653a20696e76616c6964205f636f64650000526566657272616c53746f726167653a20636f646520616c726561647920657869737473526566657272616c53746f726167653a20696e76616c696420646973636f756e745368617265a2646970667358221220b74ba51f2a146367ef1ddbdaeb50803563477d766638213f4352614ebdec35ab64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f15760003560e01c8063039af9eb146100f657806312d43a511461012c5780631582a0181461015057806336def2c8146101885780633fb8b323146101a757806346ea87af146101d3578063534ef8831461020d57806356b4b2ad1461025457806371a6a79014610280578063836a0187146102a657806385725b58146102cf5780639c8e2de9146102f55780639cb7de4b14610312578063c8b3c46014610340578063cfad57a21461035d578063dfcfa25014610383578063e1e01bf3146103af578063e1f1c4a7146103cc578063ed843134146103d4575b600080fd5b6101136004803603602081101561010c57600080fd5b5035610400565b6040805192835260208301919091528051918290030190f35b610134610419565b604080516001600160a01b039092168252519081900360200190f35b6101766004803603602081101561016657600080fd5b50356001600160a01b0316610428565b60408051918252519081900360200190f35b6101a56004803603602081101561019e57600080fd5b503561043a565b005b6101a5600480360360408110156101bd57600080fd5b506001600160a01b03813516906020013561052e565b6101f9600480360360208110156101e957600080fd5b50356001600160a01b03166105d4565b604080519115158252519081900360200190f35b6102336004803603602081101561022357600080fd5b50356001600160a01b03166105e9565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101a56004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561062f565b6101766004803603602081101561029657600080fd5b50356001600160a01b031661069e565b6101a5600480360360608110156102bc57600080fd5b50803590602081013590604001356106b0565b610176600480360360208110156102e557600080fd5b50356001600160a01b0316610805565b6101a56004803603602081101561030b57600080fd5b5035610817565b6101a56004803603604081101561032857600080fd5b506001600160a01b03813516906020013515156108a7565b6101346004803603602081101561035657600080fd5b5035610958565b6101a56004803603602081101561037357600080fd5b50356001600160a01b0316610973565b6101a56004803603604081101561039957600080fd5b50803590602001356001600160a01b03166109e2565b6101a5600480360360208110156103c557600080fd5b5035610ad7565b610176610ae4565b6101a5600480360360408110156103ea57600080fd5b50803590602001356001600160a01b0316610aea565b6003602052600090815260409020805460019091015482565b6000546001600160a01b031681565b60026020526000908152604090205481565b8061047a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b0316156104ce5760405162461bcd60e51b8152600401808060200182810382526024815260200180610cda6024913960400191505060405180910390fd5b60008181526005602090815260409182902080546001600160a01b03191633908117909155825190815290810183905281517f04f82286a2a3b2ee5c8555de8304dfe2ea70991613213184b73a9e408d2d8029929181900390910190a150565b6000546001600160a01b0316331461057b576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152600260209081526040918290208490558151928352820183905280517f7696855cdbb94bb5a44cb0a95caff6f29173aa1cbfba193834b12b90827ce2bc9281900390910190a15050565b60046020526000908152604090205460ff1681565b6001600160a01b038116600090815260066020526040812054819081811561062557506000818152600560205260409020546001600160a01b03165b9092509050915091565b3360009081526004602052604090205460ff16610690576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b61069a8282610c02565b5050565b60016020526000908152604090205481565b6000546001600160a01b031633146106fd576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b61271082111561073e5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c966024913960400191505060405180910390fd5b61271081111561077f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b610787610c5b565b50600083815260036020818152604080842081518083018352878152808401878152958990529383528351815593516001909401939093558251868152908101859052808301849052915190917f4ebd23a492b2bd79586cb57cae40d7793408265f20320f68b478b971e696f4c7919081900360600190a150505050565b60066020526000908152604090205481565b6127108111156108585760405162461bcd60e51b8152600401808060200182810382526026815260200180610cfe6026913960400191505060405180910390fd5b336000818152600160209081526040918290208490558151928352820183905280517fbd224f3917462b0fa80805fe3ec29be3a37f664955aad6224e5ece036224c4299281900390910190a150565b6000546001600160a01b031633146108f4576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915582519384529083015280517fd373464a39404e5f98fdb4b152b8ba9a094561e97e5c4b4ea11eb18cd9e6695e9281900390910190a15050565b6005602052600090815260409020546001600160a01b031681565b6000546001600160a01b031633146109c0576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a2f576040805162461bcd60e51b81526020600482015260156024820152600080516020610c76833981519152604482015290519081900360640190fd5b81610a6f576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b60008281526005602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518581529182015281517f6431f88c655dd0e2b8d09b6405c007c515c66d67f2998e69c902873a8c8f3e97929181900390910190a15050565b610ae13382610c02565b50565b61271081565b81610b2a576040805162461bcd60e51b815260206004820152601e6024820152600080516020610cba833981519152604482015290519081900360640190fd5b6000828152600560205260409020546001600160a01b0316338114610b93576040805162461bcd60e51b815260206004820152601a6024820152792932b332b93930b629ba37b930b3b29d103337b93134b23232b760311b604482015290519081900360640190fd5b60008381526005602090815260409182902080546001600160a01b0386166001600160a01b0319909116811790915582513381529182015280820185905290517f5640856798d41ce9ca0a109b54c20a06eb99ba9c36ab4547115dafb8473cf3979181900360600190a1505050565b6001600160a01b0382166000818152600660209081526040918290208490558151928352820183905280517f43825f14567dda057e821be2e51a5aa79aa51f3907a647e3ed2bd486a01050f19281900390910190a15050565b60405180604001604052806000815260200160008152509056fe476f7665726e61626c653a20666f7262696464656e0000000000000000000000526566657272616c53746f726167653a20696e76616c696420746f74616c526562617465526566657272616c53746f726167653a20696e76616c6964205f636f64650000526566657272616c53746f726167653a20636f646520616c726561647920657869737473526566657272616c53746f726167653a20696e76616c696420646973636f756e745368617265a2646970667358221220b74ba51f2a146367ef1ddbdaeb50803563477d766638213f4352614ebdec35ab64736f6c634300060c0033
Deployed Bytecode Sourcemap
7128:4386:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7651:38;;;;;;;;;;;;;;;;-1:-1:-1;7651:38:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;54:18;;;:::i;:::-;;;;-1:-1:-1;;;;;54:18:0;;;;;;;;;;;;;;7557:58;;;;;;;;;;;;;;;;-1:-1:-1;7557:58:0;-1:-1:-1;;;;;7557:58:0;;:::i;:::-;;;;;;;;;;;;;;;;10043:308;;;;;;;;;;;;;;;;-1:-1:-1;10043:308:0;;:::i;:::-;;9248:191;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9248:191:0;;;;;;;;:::i;7698:42::-;;;;;;;;;;;;;;;;-1:-1:-1;7698:42:0;-1:-1:-1;;;;;7698:42:0;;:::i;:::-;;;;;;;;;;;;;;;;;;11009:311;;;;;;;;;;;;;;;;-1:-1:-1;11009:311:0;-1:-1:-1;;;;;11009:311:0;;:::i;:::-;;;;;;;-1:-1:-1;;;;;11009:311:0;;;;;;;;;;;;;;;;9754:152;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9754:152:0;;;;;;;;:::i;7446:67::-;;;;;;;;;;;;;;;;-1:-1:-1;7446:67:0;-1:-1:-1;;;;;7446:67:0;;:::i;8718:522::-;;;;;;;;;;;;;;;;-1:-1:-1;8718:522:0;;;;;;;;;;;;:::i;7811:64::-;;;;;;;;;;;;;;;;-1:-1:-1;7811:64:0;-1:-1:-1;;;;;7811:64:0;;:::i;9447:299::-;;;;;;;;;;;;;;;;-1:-1:-1;9447:299:0;;:::i;8542:168::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8542:168:0;;;;;;;;;;:::i;7749:55::-;;;;;;;;;;;;;;;;-1:-1:-1;7749:55:0;;:::i;254:76::-;;;;;;;;;;;;;;;;-1:-1:-1;254:76:0;-1:-1:-1;;;;;254:76:0;;:::i;10738:263::-;;;;;;;;;;;;;;;;-1:-1:-1;10738:263:0;;;;;;-1:-1:-1;;;;;10738:263:0;;:::i;9914:121::-;;;;;;;;;;;;;;;;-1:-1:-1;9914:121:0;;:::i;7393:44::-;;;:::i;10359:371::-;;;;;;;;;;;;;;;;-1:-1:-1;10359:371:0;;;;;;-1:-1:-1;;;;;10359:371:0;;:::i;7651:38::-;;;;;;;;;;;;;;;;;;;:::o;54:18::-;;;-1:-1:-1;;;;;54:18:0;;:::o;7557:58::-;;;;;;;;;;;;;:::o;10043:308::-;10108:19;10100:62;;;;;-1:-1:-1;;;10100:62:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;10100:62:0;;;;;;;;;;;;;;;10210:1;10181:17;;;:10;:17;;;;;;-1:-1:-1;;;;;10181:17:0;:31;10173:80;;;;-1:-1:-1;;;10173:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10266:17;;;;:10;:17;;;;;;;;;:30;;-1:-1:-1;;;;;;10266:30:0;10286:10;10266:30;;;;;;10312:31;;;;;;;;;;;;;;;;;;;;;;;;10043:308;:::o;9248:191::-;197:3;;-1:-1:-1;;;;;197:3:0;183:10;:17;175:51;;;;;-1:-1:-1;;;175:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;175:51:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;9346:24:0;::::1;;::::0;;;:13:::1;:24;::::0;;;;;;;;:34;;;9396:35;;;;;;::::1;::::0;;;;;::::1;::::0;;;;;;;;::::1;9248:191:::0;;:::o;7698:42::-;;;;;;;;;;;;;;;:::o;11009:311::-;-1:-1:-1;;;;;11134:29:0;;11090:7;11134:29;;;:19;:29;;;;;;11090:7;;;11205:18;;11201:78;;-1:-1:-1;11251:16:0;;;;:10;:16;;;;;;-1:-1:-1;;;;;11251:16:0;11201:78;11297:4;;-1:-1:-1;11303:8:0;-1:-1:-1;11009:311:0;;;:::o;9754:152::-;8472:10;8462:21;;;;:9;:21;;;;;;;;8454:60;;;;;-1:-1:-1;;;8454:60:0;;;;;;;;;;;;-1:-1:-1;;;8454:60:0;;;;;;;;;;;;;;;9859:39:::1;9882:8;9892:5;9859:22;:39::i;:::-;9754:152:::0;;:::o;7446:67::-;;;;;;;;;;;;;:::o;8718:522::-;197:3;;-1:-1:-1;;;;;197:3:0;183:10;:17;175:51;;;;;-1:-1:-1;;;175:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;175:51:0;;;;;;;;;;;;;;;7432:5:::1;8843:12;:28;;8835:77;;;;-1:-1:-1::0;;;8835:77:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7432:5;8931:14;:30;;8923:81;;;;-1:-1:-1::0;;;8923:81:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9017:16;;:::i;:::-;-1:-1:-1::0;9036:14:0::1;::::0;;;:5:::1;:14;::::0;;;;;;;9017:33;;;;::::1;::::0;;9061:31;;;9017:33;;::::1;9103:35:::0;;;9149:14;;;;;;;:21;;;;;;9017:33:::1;::::0;;::::1;9149:21:::0;;;;9186:46;;;;;;;::::1;::::0;;;;;;;;;;;9017:33;;9186:46:::1;::::0;;;;;;;;::::1;237:1;8718:522:::0;;;:::o;7811:64::-;;;;;;;;;;;;;:::o;9447:299::-;7432:5;9533:14;:30;;9525:81;;;;-1:-1:-1;;;9525:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9642:10;9619:34;;;;:22;:34;;;;;;;;;:51;;;9686:52;;;;;;;;;;;;;;;;;;;;;;9447:299;:::o;8542:168::-;197:3;;-1:-1:-1;;;;;197:3:0;183:10;:17;175:51;;;;;-1:-1:-1;;;175:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;175:51:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;8624:19:0;::::1;;::::0;;;:9:::1;:19;::::0;;;;;;;;:31;;-1:-1:-1;;8624:31:0::1;::::0;::::1;;::::0;;::::1;::::0;;;8671;;;;;;;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;8542:168:::0;;:::o;7749:55::-;;;;;;;;;;;;-1:-1:-1;;;;;7749:55:0;;:::o;254:76::-;197:3;;-1:-1:-1;;;;;197:3:0;183:10;:17;175:51;;;;;-1:-1:-1;;;175:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;175:51:0;;;;;;;;;;;;;;;312:3:::1;:10:::0;;-1:-1:-1;;;;;;312:10:0::1;-1:-1:-1::0;;;;;312:10:0;;;::::1;::::0;;;::::1;::::0;;254:76::o;10738:263::-;197:3;;-1:-1:-1;;;;;197:3:0;183:10;:17;175:51;;;;;-1:-1:-1;;;175:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;175:51:0;;;;;;;;;;;;;;;10844:19;10836:62:::1;;;::::0;;-1:-1:-1;;;10836:62:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;10836:62:0;;;;;;;;;;;;;::::1;;10911:17;::::0;;;:10:::1;:17;::::0;;;;;;;;:31;;-1:-1:-1;;;;;;10911:31:0::1;-1:-1:-1::0;;;;;10911:31:0;::::1;::::0;;::::1;::::0;;;10958:35;;;;;;;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;10738:263:::0;;:::o;9914:121::-;9986:41;10009:10;10021:5;9986:22;:41::i;:::-;9914:121;:::o;7393:44::-;7432:5;7393:44;:::o;10359:371::-;10445:19;10437:62;;;;;-1:-1:-1;;;10437:62:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;10437:62:0;;;;;;;;;;;;;;;10512:15;10530:17;;;:10;:17;;;;;;-1:-1:-1;;;;;10530:17:0;10566:10;:21;;10558:60;;;;;-1:-1:-1;;;10558:60:0;;;;;;;;;;;;-1:-1:-1;;;10558:60:0;;;;;;;;;;;;;;;10631:17;;;;:10;:17;;;;;;;;;:31;;-1:-1:-1;;;;;10631:31:0;;-1:-1:-1;;;;;;10631:31:0;;;;;;;;10678:44;;10691:10;10678:44;;;;;;;;;;;;;;;;;;;;;;;10359:371;;;:::o;11328:183::-;-1:-1:-1;;;;;11412:29:0;;;;;;:19;:29;;;;;;;;;:37;;;11465:38;;;;;;;;;;;;;;;;;;;;;;11328:183;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
ipfs://b74ba51f2a146367ef1ddbdaeb50803563477d766638213f4352614ebdec35ab
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.