Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x942DaEbb...4EBf88FA4 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
EstateSaleWithAuth
Compiler Version
v0.6.5+commit.f956cc89
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* solhint-disable not-rely-on-time, func-order */ pragma solidity 0.6.5; import "../common/Libraries/SafeMathWithRequire.sol"; import "./LandToken.sol"; import "../common/Interfaces/ERC1155.sol"; import "../common/Interfaces/ERC20.sol"; import "../common/BaseWithStorage/MetaTransactionReceiver.sol"; import "../ReferralValidator/ReferralValidator.sol"; import "./AuthValidator.sol"; /// @title Estate Sale contract with referral /// @notice This contract manages the sale of our lands as Estates contract EstateSaleWithAuth is MetaTransactionReceiver, ReferralValidator { using SafeMathWithRequire for uint256; event LandQuadPurchased( address indexed buyer, address indexed to, uint256 indexed topCornerId, uint256 size, uint256 price, address token, uint256 amountPaid ); /// @notice set the wallet receiving the proceeds /// @param newWallet address of the new receiving wallet function setReceivingWallet(address payable newWallet) external { require(newWallet != address(0), "ZERO_ADDRESS"); require(msg.sender == _admin, "NOT_AUTHORIZED"); _wallet = newWallet; } /// @notice buy Land with SAND using the merkle proof associated with it /// @param buyer address that perform the payment /// @param to address that will own the purchased Land /// @param reserved the reserved address (if any) /// @param info [X_INDEX=0] x coordinate of the Land [Y_INDEX=1] y coordinate of the Land [SIZE_INDEX=2] size of the pack of Land to purchase [PRICE_INDEX=3] price in SAND to purchase that Land /// @param proof merkleProof for that particular Land function buyLandWithSand( address buyer, address to, address reserved, uint256[] calldata info, bytes32 salt, uint256[] calldata assetIds, bytes32[] calldata proof, bytes calldata referral, bytes calldata signature ) external { _checkAddressesAndExpiryTime(buyer, reserved); _checkAuthAndProofValidity(to, reserved, info, salt, assetIds, proof, signature); _handleFeeAndReferral(buyer, info[PRICE_INDEX], referral); _mint(buyer, to, info); _sendAssets(to, assetIds); } /// @notice Gets the expiry time for the current sale /// @return The expiry time, as a unix epoch function getExpiryTime() external view returns (uint256) { return _expiryTime; } /// @notice Gets the Merkle root associated with the current sale /// @return The Merkle root, as a bytes32 hash function getMerkleRoot() external view returns (bytes32) { return _merkleRoot; } /// @notice enable Admin to withdraw remaining assets from EstateSaleWithFee contract /// @param to intended recipient of the asset tokens /// @param assetIds the assetIds to be transferred /// @param values the quantities of the assetIds to be transferred function withdrawAssets( address to, uint256[] calldata assetIds, uint256[] calldata values ) external { require(msg.sender == _admin, "NOT_AUTHORIZED"); // require(block.timestamp > _expiryTime, "SALE_NOT_OVER"); // removed to recover in case of misconfigured sales _asset.safeBatchTransferFrom(address(this), to, assetIds, values, ""); } function onERC1155Received( address, /*operator*/ address, /*from*/ uint256, /*id*/ uint256, /*value*/ bytes calldata /*data*/ ) external pure returns (bytes4) { return 0xf23a6e61; } function onERC1155BatchReceived( address, /*operator*/ address, /*from*/ uint256[] calldata, /*ids*/ uint256[] calldata, /*values*/ bytes calldata /*data*/ ) external pure returns (bytes4) { return 0xbc197c81; } function _sendAssets(address to, uint256[] memory assetIds) internal { uint256[] memory values = new uint256[](assetIds.length); for (uint256 i = 0; i < assetIds.length; i++) { values[i] = 1; } _asset.safeBatchTransferFrom(address(this), to, assetIds, values, ""); } // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue function _checkAddressesAndExpiryTime(address buyer, address reserved) internal view { /* solium-disable-next-line security/no-block-members */ require(block.timestamp < _expiryTime, "SALE_IS_OVER"); require(buyer == msg.sender || _metaTransactionContracts[msg.sender], "NOT_AUTHORIZED"); require(reserved == address(0) || reserved == buyer, "RESERVED_LAND"); } // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue function _checkAuthAndProofValidity( address to, address reserved, uint256[] memory info, bytes32 salt, uint256[] memory assetIds, bytes32[] memory proof, bytes memory signature ) internal view { bytes32 hashedData = keccak256( abi.encodePacked( to, reserved, info[X_INDEX], info[Y_INDEX], info[SIZE_INDEX], info[PRICE_INDEX], salt, keccak256(abi.encodePacked(assetIds)), keccak256(abi.encodePacked(proof)) ) ); require(_authValidator.isAuthValid(signature, hashedData), "INVALID_AUTH"); bytes32 leaf = _generateLandHash( info[X_INDEX], info[Y_INDEX], info[SIZE_INDEX], info[PRICE_INDEX], reserved, salt, assetIds ); require(_verify(proof, leaf), "INVALID_LAND"); } function _mint( address buyer, address to, uint256[] memory info ) internal { if (info[SIZE_INDEX] == 1 || _estate == address(0)) { _land.mintQuad(to, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], ""); } else { _land.mintQuad(_estate, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], abi.encode(to)); } emit LandQuadPurchased( buyer, to, info[X_INDEX] + (info[Y_INDEX] * GRID_SIZE), info[SIZE_INDEX], info[PRICE_INDEX], address(_sand), info[PRICE_INDEX] ); } function _generateLandHash( uint256 x, uint256 y, uint256 size, uint256 price, address reserved, bytes32 salt, uint256[] memory assetIds ) internal pure returns (bytes32) { return keccak256(abi.encodePacked(x, y, size, price, reserved, salt, assetIds)); } function _verify(bytes32[] memory proof, bytes32 leaf) internal view returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash < proofElement) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash == _merkleRoot; } function _handleFeeAndReferral( address buyer, uint256 priceInSand, bytes memory referral ) internal { // send 5% fee to a specially configured instance of FeeDistributor.sol uint256 remainingAmountInSand = _handleSandFee(buyer, priceInSand); // calculate referral based on 95% of original priceInSand handleReferralWithERC20(buyer, remainingAmountInSand, referral, _wallet, address(_sand)); } function _handleSandFee(address buyer, uint256 priceInSand) internal returns (uint256) { uint256 feeAmountInSand = priceInSand.mul(FEE).div(100); require(_sand.transferFrom(buyer, address(_feeDistributor), feeAmountInSand), "FEE_TRANSFER_FAILED"); return priceInSand.sub(feeAmountInSand); } uint256 internal constant GRID_SIZE = 408; // 408 is the size of the Land ERC1155 internal immutable _asset; LandToken internal immutable _land; ERC20 internal immutable _sand; address internal immutable _estate; address internal immutable _feeDistributor; address payable internal _wallet; AuthValidator internal _authValidator; uint256 internal immutable _expiryTime; bytes32 internal immutable _merkleRoot; uint256 private constant FEE = 5; // percentage of land sale price to be diverted to a specially configured instance of FeeDistributor, shown as an integer // buyLandWithSand info indexes uint256 private constant X_INDEX = 0; uint256 private constant Y_INDEX = 1; uint256 private constant SIZE_INDEX = 2; uint256 private constant PRICE_INDEX = 3; constructor( address landAddress, address sandContractAddress, address initialMetaTx, address admin, address payable initialWalletAddress, bytes32 merkleRoot, uint256 expiryTime, address initialSigningWallet, uint256 initialMaxCommissionRate, address estate, address asset, address feeDistributor, address authValidator ) public ReferralValidator(initialSigningWallet, initialMaxCommissionRate) { _land = LandToken(landAddress); _sand = ERC20(sandContractAddress); _setMetaTransactionProcessor(initialMetaTx, true); _wallet = initialWalletAddress; _merkleRoot = merkleRoot; _expiryTime = expiryTime; _admin = admin; _estate = estate; _asset = ERC1155(asset); _feeDistributor = feeDistributor; _authValidator = AuthValidator(authValidator); } }
pragma solidity 0.6.5; /** * @title SafeMath * @dev Math operations with safety checks that revert */ library SafeMathWithRequire { using SafeMathWithRequire for uint256; uint256 constant DECIMALS_18 = 1000000000000000000; uint256 constant DECIMALS_12 = 1000000000000; uint256 constant DECIMALS_9 = 1000000000; uint256 constant DECIMALS_6 = 1000000; /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; require(c / a == b, "overflow"); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "divbyzero"); // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "undeflow"); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a, "overflow"); return c; } function sqrt6(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_12); uint256 tmp = a.add(1) / 2; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; tmp = ((a / tmp) + tmp) / 2; } } function sqrt3(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_6); uint256 tmp = a.add(1) / 2; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; tmp = ((a / tmp) + tmp) / 2; } } function cbrt6(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_18); uint256 tmp = a.add(2) / 3; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; uint256 tmpSquare = tmp**2; require(tmpSquare > tmp, "overflow"); tmp = ((a / tmpSquare) + (tmp * 2)) / 3; } return c; } function cbrt3(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_9); uint256 tmp = a.add(2) / 3; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; uint256 tmpSquare = tmp**2; require(tmpSquare > tmp, "overflow"); tmp = ((a / tmpSquare) + (tmp * 2)) / 3; } return c; } // TODO test function rt6_3(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_18); uint256 tmp = a.add(5) / 6; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; uint256 tmpFive = tmp**5; require(tmpFive > tmp, "overflow"); tmp = ((a / tmpFive) + (tmp * 5)) / 6; } } }
pragma solidity 0.6.5; interface LandToken { function mintQuad( address to, uint256 size, uint256 x, uint256 y, bytes calldata data ) external; }
pragma solidity 0.6.5; /** @title ERC-1155 Multi Token Standard @dev See https://eips.ethereum.org/EIPS/eip-1155 Note: The ERC-165 identifier for this interface is 0xd9b67a26. */ interface ERC1155 { event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); event URI(string value, uint256 indexed id); /** @notice Transfers `value` amount of an `id` from `from` to `to` (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see "Approval" section of the standard). MUST revert if `to` is the zero address. MUST revert if balance of holder for token `id` is lower than the `value` sent. MUST revert on any other error. MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). After the above conditions are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param from Source address @param to Target address @param id ID of the token type @param value Transfer amount @param data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `to` */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes calldata data ) external; /** @notice Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see "Approval" section of the standard). MUST revert if `to` is the zero address. MUST revert if length of `ids` is not the same as length of `values`. MUST revert if any of the balance(s) of the holder(s) for token(s) in `ids` is lower than the respective amount(s) in `values` sent to the recipient. MUST revert on any other error. MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). After the above conditions for the transfer(s) in the batch are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param from Source address @param to Target address @param ids IDs of each token type (order and length must match _values array) @param values Transfer amounts per token type (order and length must match _ids array) @param data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `to` */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external; /** @notice Get the balance of an account's tokens. @param owner The address of the token holder @param id ID of the token @return The _owner's balance of the token type requested */ function balanceOf(address owner, uint256 id) external view returns (uint256); /** @notice Get the balance of multiple account/token pairs @param owners The addresses of the token holders @param ids ID of the tokens @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair) */ function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view returns (uint256[] memory); /** @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param operator Address to add to the set of authorized operators @param approved True if the operator is approved, false to revoke approval */ function setApprovalForAll(address operator, bool approved) external; /** @notice Queries the approval status of an operator for a given owner. @param owner The owner of the tokens @param operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
pragma solidity 0.6.5; /// @dev see https://eips.ethereum.org/EIPS/eip-20 interface ERC20 { /// @notice emitted when tokens are transfered from one address to another. /// @param from address from which the token are transfered from (zero means tokens are minted). /// @param to destination address which the token are transfered to (zero means tokens are burnt). /// @param value amount of tokens transferred. event Transfer(address indexed from, address indexed to, uint256 value); /// @notice emitted when owner grant transfer rights to another address /// @param owner address allowing its token to be transferred. /// @param spender address allowed to spend on behalf of `owner` /// @param value amount of tokens allowed. event Approval(address indexed owner, address indexed spender, uint256 value); /// @notice return the current total amount of tokens owned by all holders. /// @return supply total number of tokens held. function totalSupply() external view returns (uint256 supply); /// @notice return the number of tokens held by a particular address. /// @param who address being queried. /// @return balance number of token held by that address. function balanceOf(address who) external view returns (uint256 balance); /// @notice transfer tokens to a specific address. /// @param to destination address receiving the tokens. /// @param value number of tokens to transfer. /// @return success whether the transfer succeeded. function transfer(address to, uint256 value) external returns (bool success); /// @notice transfer tokens from one address to another. /// @param from address tokens will be sent from. /// @param to destination address receiving the tokens. /// @param value number of tokens to transfer. /// @return success whether the transfer succeeded. function transferFrom( address from, address to, uint256 value ) external returns (bool success); /// @notice approve an address to spend on your behalf. /// @param spender address entitled to transfer on your behalf. /// @param value amount allowed to be transfered. /// @param success whether the approval succeeded. function approve(address spender, uint256 value) external returns (bool success); /// @notice return the current allowance for a particular owner/spender pair. /// @param owner address allowing spender. /// @param spender address allowed to spend. /// @return amount number of tokens `spender` can spend on behalf of `owner`. function allowance(address owner, address spender) external view returns (uint256 amount); }
pragma solidity 0.6.5; import "./Admin.sol"; contract MetaTransactionReceiver is Admin { mapping(address => bool) internal _metaTransactionContracts; /// @dev emiited when a meta transaction processor is enabled/disabled /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights. /// @param enabled set whether the metaTransactionProcessor is enabled or disabled. event MetaTransactionProcessor(address metaTransactionProcessor, bool enabled); /// @dev Enable or disable the ability of `metaTransactionProcessor` to perform meta-tx (metaTransactionProcessor rights). /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights. /// @param enabled set whether the metaTransactionProcessor is enabled or disabled. function setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) public { require(msg.sender == _admin, "only admin can setup metaTransactionProcessors"); _setMetaTransactionProcessor(metaTransactionProcessor, enabled); } function _setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) internal { _metaTransactionContracts[metaTransactionProcessor] = enabled; emit MetaTransactionProcessor(metaTransactionProcessor, enabled); } /// @dev check whether address `who` is given meta-transaction execution rights. /// @param who The address to query. /// @return whether the address has meta-transaction execution rights. function isMetaTransactionProcessor(address who) external view returns (bool) { return _metaTransactionContracts[who]; } }
/* solhint-disable not-rely-on-time, func-order */ pragma solidity 0.6.5; import "../common/Libraries/SigUtil.sol"; import "../common/Libraries/SafeMathWithRequire.sol"; import "../common/Interfaces/ERC20.sol"; import "../common/BaseWithStorage/Admin.sol"; /// @dev This contract verifies if a referral is valid contract ReferralValidator is Admin { address private _signingWallet; uint256 private _maxCommissionRate; mapping(address => uint256) private _previousSigningWallets; uint256 private _previousSigningDelay = 60 * 60 * 24 * 10; event ReferralUsed( address indexed referrer, address indexed referee, address indexed token, uint256 amount, uint256 commission, uint256 commissionRate ); constructor(address initialSigningWallet, uint256 initialMaxCommissionRate) public { _signingWallet = initialSigningWallet; _maxCommissionRate = initialMaxCommissionRate; } /** * @dev Update the signing wallet * @param newSigningWallet The new address of the signing wallet */ function updateSigningWallet(address newSigningWallet) external { require(_admin == msg.sender, "Sender not admin"); _previousSigningWallets[_signingWallet] = now + _previousSigningDelay; _signingWallet = newSigningWallet; } /** * @dev signing wallet authorized for referral * @return the address of the signing wallet */ function getSigningWallet() external view returns (address) { return _signingWallet; } /** * @notice the max commision rate * @return the maximum commision rate that a referral can give */ function getMaxCommisionRate() external view returns (uint256) { return _maxCommissionRate; } /** * @dev Update the maximum commission rate * @param newMaxCommissionRate The new maximum commission rate */ function updateMaxCommissionRate(uint256 newMaxCommissionRate) external { require(_admin == msg.sender, "Sender not admin"); _maxCommissionRate = newMaxCommissionRate; } function handleReferralWithETH( uint256 amount, bytes memory referral, address payable destination ) internal { uint256 amountForDestination = amount; if (referral.length > 0) { (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral); uint256 commission = 0; if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) { commission = SafeMathWithRequire.div(SafeMathWithRequire.mul(amount, commissionRate), 10000); emit ReferralUsed(referrer, referee, address(0), amount, commission, commissionRate); amountForDestination = SafeMathWithRequire.sub(amountForDestination, commission); } if (commission > 0) { payable(referrer).transfer(commission); } } destination.transfer(amountForDestination); } function handleReferralWithERC20( address buyer, uint256 amount, bytes memory referral, address payable destination, address tokenAddress ) internal { ERC20 token = ERC20(tokenAddress); uint256 amountForDestination = amount; if (referral.length > 0) { (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral); uint256 commission = 0; if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) { commission = SafeMathWithRequire.div(SafeMathWithRequire.mul(amount, commissionRate), 10000); emit ReferralUsed(referrer, referee, tokenAddress, amount, commission, commissionRate); amountForDestination = SafeMathWithRequire.sub(amountForDestination, commission); } if (commission > 0) { require(token.transferFrom(buyer, referrer, commission), "commision transfer failed"); } } require(token.transferFrom(buyer, destination, amountForDestination), "payment transfer failed"); } /** * @notice Check if a referral is valid * @param signature The signature to check (signed referral) * @param referrer The address of the referrer * @param referee The address of the referee * @param expiryTime The expiry time of the referral * @param commissionRate The commissionRate of the referral * @return True if the referral is valid */ function isReferralValid( bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate ) public view returns (bool) { if (commissionRate > _maxCommissionRate || referrer == referee || now > expiryTime) { return false; } bytes32 hashedData = keccak256(abi.encodePacked(referrer, referee, expiryTime, commissionRate)); address signer = SigUtil.recover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hashedData)), signature); if (_previousSigningWallets[signer] >= now) { return true; } return _signingWallet == signer; } function decodeReferral(bytes memory referral) public pure returns ( bytes memory, address, address, uint256, uint256 ) { (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = abi.decode( referral, (bytes, address, address, uint256, uint256) ); return (signature, referrer, referee, expiryTime, commissionRate); } }
//SPDX-License-Identifier: MIT pragma solidity 0.6.5; // TODO: update once upgrade is complete import "../common/Libraries/SigUtil.sol"; import "../common/Libraries/SafeMathWithRequire.sol"; import "../common/BaseWithStorage/Admin.sol"; contract AuthValidator is Admin { address public _signingAuthWallet; event SigningWallet(address indexed signingWallet); constructor(address adminWallet, address initialSigningWallet) public { _admin = adminWallet; _updateSigningAuthWallet(initialSigningWallet); } function updateSigningAuthWallet(address newSigningWallet) external onlyAdmin { _updateSigningAuthWallet(newSigningWallet); } function _updateSigningAuthWallet(address newSigningWallet) internal { require(newSigningWallet != address(0), "INVALID_SIGNING_WALLET"); _signingAuthWallet = newSigningWallet; emit SigningWallet(newSigningWallet); } function isAuthValid(bytes memory signature, bytes32 hashedData) public view returns (bool) { address signer = SigUtil.recover(keccak256(SigUtil.prefixed(hashedData)), signature); return signer == _signingAuthWallet; } }
pragma solidity 0.6.5; contract Admin { address internal _admin; /// @dev emitted when the contract administrator is changed. /// @param oldAdmin address of the previous administrator. /// @param newAdmin address of the new administrator. event AdminChanged(address oldAdmin, address newAdmin); /// @dev gives the current administrator of this contract. /// @return the current administrator of this contract. function getAdmin() external view returns (address) { return _admin; } /// @dev change the administrator to be `newAdmin`. /// @param newAdmin address of the new administrator. function changeAdmin(address newAdmin) external { require(msg.sender == _admin, "only admin can change admin"); emit AdminChanged(_admin, newAdmin); _admin = newAdmin; } modifier onlyAdmin() { require(msg.sender == _admin, "only admin allowed"); _; } }
pragma solidity 0.6.5; library SigUtil { function recover(bytes32 hash, bytes memory sig) internal pure returns (address recovered) { require(sig.length == 65); bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) v := byte(0, mload(add(sig, 96))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible versions if (v < 27) { v += 27; } require(v == 27 || v == 28); recovered = ecrecover(hash, v, r, s); require(recovered != address(0)); } function recoverWithZeroOnFailure(bytes32 hash, bytes memory sig) internal pure returns (address) { if (sig.length != 65) { return (address(0)); } bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) v := byte(0, mload(add(sig, 96))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible versions if (v < 27) { v += 27; } if (v != 27 && v != 28) { return (address(0)); } else { return ecrecover(hash, v, r, s); } } // Builds a prefixed hash to mimic the behavior of eth_sign. function prefixed(bytes32 hash) internal pure returns (bytes memory) { return abi.encodePacked("\x19Ethereum Signed Message:\n32", hash); } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"landAddress","type":"address"},{"internalType":"address","name":"sandContractAddress","type":"address"},{"internalType":"address","name":"initialMetaTx","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address payable","name":"initialWalletAddress","type":"address"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"initialSigningWallet","type":"address"},{"internalType":"uint256","name":"initialMaxCommissionRate","type":"uint256"},{"internalType":"address","name":"estate","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"feeDistributor","type":"address"},{"internalType":"address","name":"authValidator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"topCornerId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"}],"name":"LandQuadPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"metaTransactionProcessor","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"MetaTransactionProcessor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":true,"internalType":"address","name":"referee","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"commission","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"commissionRate","type":"uint256"}],"name":"ReferralUsed","type":"event"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"reserved","type":"address"},{"internalType":"uint256[]","name":"info","type":"uint256[]"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"assetIds","type":"uint256[]"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes","name":"referral","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buyLandWithSand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"referral","type":"bytes"}],"name":"decodeReferral","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpiryTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxCommisionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSigningWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"isMetaTransactionProcessor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"referee","type":"address"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"uint256","name":"commissionRate","type":"uint256"}],"name":"isReferralValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"metaTransactionProcessor","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMetaTransactionProcessor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newWallet","type":"address"}],"name":"setReceivingWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxCommissionRate","type":"uint256"}],"name":"updateMaxCommissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningWallet","type":"address"}],"name":"updateSigningWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"assetIds","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"withdrawAssets","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061011b5760003560e01c80638f283970116100b2578063c10a420811610081578063dc5074af11610066578063dc5074af1461085f578063e56f8a9e14610885578063f23a6e61146108a25761011b565b8063c10a420814610780578063caed3500146108575761011b565b80638f28397014610500578063984d625214610526578063b522ecff146105f8578063bc197c811461061e5761011b565b806365194ce7116100ee57806365194ce7146103485780636e9960c3146104a657806377f1c3ac146104ca5780638a04af6a146104d25761011b565b80631187fd3c1461012057806325cb5bc014610300578063495906571461031a57806358bc294414610322575b600080fd5b6102fe600480360361012081101561013757600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460208302840111640100000000831117156101a757600080fd5b919390928235926040810190602001356401000000008111156101c957600080fd5b8201836020820111156101db57600080fd5b803590602001918460208302840111640100000000831117156101fd57600080fd5b91939092909160208101903564010000000081111561021b57600080fd5b82018360208201111561022d57600080fd5b8035906020019184602083028401116401000000008311171561024f57600080fd5b91939092909160208101903564010000000081111561026d57600080fd5b82018360208201111561027f57600080fd5b803590602001918460018302840111640100000000831117156102a157600080fd5b9193909290916020810190356401000000008111156102bf57600080fd5b8201836020820111156102d157600080fd5b803590602001918460018302840111640100000000831117156102f357600080fd5b509092509050610937565b005b610308610b17565b60408051918252519081900360200190f35b610308610b3b565b6102fe6004803603602081101561033857600080fd5b50356001600160a01b0316610b5f565b6103ee6004803603602081101561035e57600080fd5b81019060208101813564010000000081111561037957600080fd5b82018360208201111561038b57600080fd5b803590602001918460018302840111640100000000831117156103ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c0a945050505050565b6040518080602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001848152602001838152602001828103825287818151815260200191508051906020019080838360005b8381101561046757818101518382015260200161044f565b50505050905090810190601f1680156104945780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b6104ae610d0f565b604080516001600160a01b039092168252519081900360200190f35b610308610d1e565b6102fe600480360360408110156104e857600080fd5b506001600160a01b0381351690602001351515610d24565b6102fe6004803603602081101561051657600080fd5b50356001600160a01b0316610d7b565b6102fe6004803603606081101561053c57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561056757600080fd5b82018360208201111561057957600080fd5b8035906020019184602083028401116401000000008311171561059b57600080fd5b9193909290916020810190356401000000008111156105b957600080fd5b8201836020820111156105cb57600080fd5b803590602001918460208302840111640100000000831117156105ed57600080fd5b509092509050610e51565b6102fe6004803603602081101561060e57600080fd5b50356001600160a01b0316610fdc565b61074b600480360360a081101561063457600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561066857600080fd5b82018360208201111561067a57600080fd5b8035906020019184602083028401116401000000008311171561069c57600080fd5b9193909290916020810190356401000000008111156106ba57600080fd5b8201836020820111156106cc57600080fd5b803590602001918460208302840111640100000000831117156106ee57600080fd5b91939092909160208101903564010000000081111561070c57600080fd5b82018360208201111561071e57600080fd5b8035906020019184600183028401116401000000008311171561074057600080fd5b5090925090506110c5565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b610843600480360360a081101561079657600080fd5b8101906020810181356401000000008111156107b157600080fd5b8201836020820111156107c357600080fd5b803590602001918460018302840111640100000000831117156107e557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b0383358116945060208401351692604081013592506060013590506110f2565b604080519115158252519081900360200190f35b6104ae61122e565b6108436004803603602081101561087557600080fd5b50356001600160a01b031661123d565b6102fe6004803603602081101561089b57600080fd5b503561125b565b61074b600480360360a08110156108b857600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156108f857600080fd5b82018360208201111561090a57600080fd5b8035906020019184600183028401116401000000008311171561092c57600080fd5b5090925090506112bf565b6109418e8d6112ea565b610a388d8d8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c8c80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508b8b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a908190840183828082843760009201919091525061144d92505050565b610a8c8e8c8c6003818110610a4957fe5b9050602002013586868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117d092505050565b610aca8e8e8d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061182192505050565b610b078d898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611c1292505050565b5050505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000006155b4d090565b7ffbf7882dc23b4294c568eb694e44ef098bb0728674f83775767a005858b353a090565b6000546001600160a01b03163314610bbe576040805162461bcd60e51b815260206004820152601060248201527f53656e646572206e6f742061646d696e00000000000000000000000000000000604482015290519081900360640190fd5b600554600280546001600160a01b03908116600090815260046020526040902042909301909255805473ffffffffffffffffffffffffffffffffffffffff191692909116919091179055565b606060008060008060606000806000808a80602001905160a0811015610c2f57600080fd5b8101908080516040519392919084640100000000821115610c4f57600080fd5b908301906020820185811115610c6457600080fd5b8251640100000000811182820188101715610c7e57600080fd5b82525081516020918201929091019080838360005b83811015610cab578181015183820152602001610c93565b50505050905090810190601f168015610cd85780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608090930151959f50909d509b5099509197505050505050505091939590929450565b6000546001600160a01b031690565b60035490565b6000546001600160a01b03163314610d6d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806125a3602e913960400191505060405180910390fd5b610d778282611dd6565b5050565b6000546001600160a01b03163314610dda576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c792061646d696e2063616e206368616e67652061646d696e0000000000604482015290519081900360640190fd5b600054604080516001600160a01b039283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a16000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610eb0576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b7f000000000000000000000000a342f5d851e866e18ff98f351f2c6637f4478db56001600160a01b0316632eb2c2d63087878787876040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b031681526020018060200180602001806020018481038452888882818152602001925060200280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600081526020016020019950505050505050505050600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b505050505050505050565b6001600160a01b038116611037576040805162461bcd60e51b815260206004820152600c60248201527f5a45524f5f414444524553530000000000000000000000000000000000000000604482015290519081900360640190fd5b6000546001600160a01b03163314611096576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b60006003548211806111155750836001600160a01b0316856001600160a01b0316145b8061111f57508242115b1561112c57506000611225565b60408051606087811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020808501919091529188901b166034830152604882018690526068808301869052835180840390910181526088830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060a884015260c48084018290528451808503909101815260e490930190935281519101206000906111e39089611e58565b6001600160a01b038116600090815260046020526040902054909150421161121057600192505050611225565b6002546001600160a01b039081169116149150505b95945050505050565b6002546001600160a01b031690565b6001600160a01b031660009081526001602052604090205460ff1690565b6000546001600160a01b031633146112ba576040805162461bcd60e51b815260206004820152601060248201527f53656e646572206e6f742061646d696e00000000000000000000000000000000604482015290519081900360640190fd5b600355565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b7f000000000000000000000000000000000000000000000000000000006155b4d0421061135e576040805162461bcd60e51b815260206004820152600c60248201527f53414c455f49535f4f5645520000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821633148061138457503360009081526001602052604090205460ff165b6113d5576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811615806113fc5750816001600160a01b0316816001600160a01b0316145b610d77576040805162461bcd60e51b815260206004820152600d60248201527f52455345525645445f4c414e4400000000000000000000000000000000000000604482015290519081900360640190fd5b600087878760008151811061145e57fe5b60200260200101518860018151811061147357fe5b60200260200101518960028151811061148857fe5b60200260200101518a60038151811061149d57fe5b60200260200101518a8a60405160200180828051906020019060200280838360005b838110156114d75781810151838201526020016114bf565b50505050905001915050604051602081830303815290604052805190602001208a60405160200180828051906020019060200280838360005b83811015611528578181015183820152602001611510565b5050505090500191505060405160208183030381529060405280519060200120604051602001808a6001600160a01b03166001600160a01b031660601b8152601401896001600160a01b03166001600160a01b031660601b81526014018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050600760009054906101000a90046001600160a01b03166001600160a01b031663012847ed83836040518363ffffffff1660e01b81526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561164a578181015183820152602001611632565b50505050905090810190601f1680156116775780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561169557600080fd5b505afa1580156116a9573d6000803e3d6000fd5b505050506040513d60208110156116bf57600080fd5b5051611712576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f415554480000000000000000000000000000000000000000604482015290519081900360640190fd5b60006117738760008151811061172457fe5b60200260200101518860018151811061173957fe5b60200260200101518960028151811061174e57fe5b60200260200101518a60038151811061176357fe5b60200260200101518c8b8b611f25565b905061177f8482611fca565b610fd1576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f4c414e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60006117dc8484612095565b60065490915061181b908590839085906001600160a01b03167f0000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d06121ee565b50505050565b8060028151811061182e57fe5b60200260200101516001148061186b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316155b1561196d577f00000000000000000000000050f5474724e0ee42d9a4e711ccfb275809fd6d4a6001600160a01b0316636e1e3bbf83836002815181106118ad57fe5b6020026020010151846000815181106118c257fe5b6020026020010151856001815181106118d757fe5b60200260200101516040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b15801561195057600080fd5b505af1158015611964573d6000803e3d6000fd5b50505050611b0d565b7f00000000000000000000000050f5474724e0ee42d9a4e711ccfb275809fd6d4a6001600160a01b0316636e1e3bbf7f0000000000000000000000000000000000000000000000000000000000000000836002815181106119ca57fe5b6020026020010151846000815181106119df57fe5b6020026020010151856001815181106119f457fe5b60200260200101518760405160200180826001600160a01b03166001600160a01b031681526020019150506040516020818303038152906040526040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611aa4578181015183820152602001611a8c565b50505050905090810190601f168015611ad15780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b158015611af457600080fd5b505af1158015611b08573d6000803e3d6000fd5b505050505b61019881600181518110611b1d57fe5b60200260200101510281600081518110611b3357fe5b602002602001015101826001600160a01b0316846001600160a01b03167fe4dfa6ac11314892f3029b34a25b1a887da3b1cab2bbf8506d87128ba6e3ac0284600281518110611b7e57fe5b602002602001015185600381518110611b9357fe5b60200260200101517f0000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d087600381518110611bc957fe5b602002602001015160405180858152602001848152602001836001600160a01b03166001600160a01b0316815260200182815260200194505050505060405180910390a4505050565b6060815167ffffffffffffffff81118015611c2c57600080fd5b50604051908082528060200260200182016040528015611c56578160200160208202803683370190505b50905060005b8251811015611c86576001828281518110611c7357fe5b6020908102919091010152600101611c5c565b507f000000000000000000000000a342f5d851e866e18ff98f351f2c6637f4478db56001600160a01b0316632eb2c2d6308585856040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001806020018060200180602001848103845286818151815260200191508051906020019060200280838360005b83811015611d41578181015183820152602001611d29565b50505050905001848103835285818151815260200191508051906020019060200280838360005b83811015611d80578181015183820152602001611d68565b50505050905001848103825260008152602001602001975050505050505050600060405180830381600087803b158015611db957600080fd5b505af1158015611dcd573d6000803e3d6000fd5b50505050505050565b6001600160a01b03821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915582519384529083015280517fb21eb88b4e33b3f1281830a7178d74d8aa73220416215726b68ae23d539515cb9281900390910190a15050565b60008151604114611e6857600080fd5b60208201516040830151606084015160001a601b811015611e8757601b015b8060ff16601b1480611e9c57508060ff16601c145b611ea557600080fd5b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa158015611efc573d6000803e3d6000fd5b5050604051601f1901519450506001600160a01b038416611f1c57600080fd5b50505092915050565b60008787878787878760405160200180888152602001878152602001868152602001858152602001846001600160a01b03166001600160a01b031660601b8152601401838152602001828051906020019060200280838360005b83811015611f97578181015183820152602001611f7f565b50505050905001975050505050505050604051602081830303815290604052805190602001209050979650505050505050565b600081815b8451811015612069576000858281518110611fe657fe5b602002602001015190508083101561202e5782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250612060565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101611fcf565b507ffbf7882dc23b4294c568eb694e44ef098bb0728674f83775767a005858b353a01490505b92915050565b6000806120ba60646120ae85600563ffffffff61247016565b9063ffffffff6124e016565b604080516323b872dd60e01b81526001600160a01b0387811660048301527f0000000000000000000000000eb04462d69b1d267d269377e34f60b9de1c8510811660248301526044820184905291519293507f0000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0909116916323b872dd916064808201926020929091908290030181600087803b15801561215957600080fd5b505af115801561216d573d6000803e3d6000fd5b505050506040513d602081101561218357600080fd5b50516121d6576040805162461bcd60e51b815260206004820152601360248201527f4645455f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b6121e6838263ffffffff61254516565b949350505050565b8251819085901561239857606060008060008061220a8a610c0a565b939850919650945092509050600061222586868686866110f2565b156122b35761223f6122378d84612470565b6127106124e0565b9050886001600160a01b0316846001600160a01b0316866001600160a01b03167fac7a699eb95c3c6d390ec4626de17ef9a67b35891efdb197beba7c7fdd45fac48f858760405180848152602001838152602001828152602001935050505060405180910390a46122b08782612545565b96505b801561239157604080516323b872dd60e01b81526001600160a01b038f811660048301528781166024830152604482018490529151918a16916323b872dd916064808201926020929091908290030181600087803b15801561231457600080fd5b505af1158015612328573d6000803e3d6000fd5b505050506040513d602081101561233e57600080fd5b5051612391576040805162461bcd60e51b815260206004820152601960248201527f636f6d6d6973696f6e207472616e73666572206661696c656400000000000000604482015290519081900360640190fd5b5050505050505b604080516323b872dd60e01b81526001600160a01b0389811660048301528681166024830152604482018490529151918416916323b872dd916064808201926020929091908290030181600087803b1580156123f357600080fd5b505af1158015612407573d6000803e3d6000fd5b505050506040513d602081101561241d57600080fd5b5051611dcd576040805162461bcd60e51b815260206004820152601760248201527f7061796d656e74207472616e73666572206661696c6564000000000000000000604482015290519081900360640190fd5b60008261247f5750600061208f565b508181028183828161248d57fe5b041461208f576040805162461bcd60e51b815260206004820152600860248201527f6f766572666c6f77000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600081612534576040805162461bcd60e51b815260206004820152600960248201527f64697662797a65726f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b81838161253d57fe5b049392505050565b60008282111561259c576040805162461bcd60e51b815260206004820152600860248201527f756e6465666c6f77000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b5090039056fe6f6e6c792061646d696e2063616e207365747570206d6574615472616e73616374696f6e50726f636573736f7273a2646970667358221220fc9205bafc138c1de206481f144dc3e7818922fbe1a20d2a71392e5e2e413c1a64736f6c63430006050033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.