Source Code
Overview
POL Balance
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Disburse Det... | 16683055 | 30 days ago | IN | 0 POL | 0.00130795 |
Loading...
Loading
Contract Name:
TransactionLedger
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interface/IEventEmitter.sol"; import './interface/IOrchestrator.sol'; import "./interface/ITransactionLedger.sol"; import './interface/ICIC.sol'; /** * @title TransactionLedger * @dev Contract for managing transaction ledgers, updating ledgers, adding rules, and disbursing payments. * Inherits Ownable, ITransactionLedger, and ReentrancyGuard. */ contract TransactionLedger is Initializable, ITransactionLedger, ReentrancyGuard { address internal constant ZERO_ADDRESS = address(0); mapping(uint256 => string) public ledgerKeys; mapping(string => Ledger) public ledgerData; mapping(uint256 => Rule) public rulesData; DisburseDetails public disburseDetails; DisburseData public disburseData; IEventEmitter public iEventEmitter; IOrchestrator internal iOrchestrator; IERC20 public chainItCoin; uint256 internal ledgerCounter; uint256 public rulesCounter; bool public paymentDisbursed; bool public isInitialized; bool public isRuleAdded; bool public ledgerLock; ICIC public CIC; /** * @dev Constructor to initialize the contract. Also gives the listing functionality */ constructor() { _disableInitializers(); } /** * @dev Initializes the ledger with provided keys and values. * @param eventEmitter THe event emitter contract address. * @param CICAddress The CIC contract address. * @param ledgerKeysParam Array of ledger keys. * @param ledgerValuesParam Array of ledger values. * @param uniqueSecret Unique secret for verification. * @param signature Signature for authorization. */ function initLedger( address eventEmitter, address CICAddress, address iOrchestratorAddress, string[] memory ledgerKeysParam, string[] memory ledgerValuesParam, uint256 uniqueSecret, bytes memory signature ) public override nonReentrant initializer{ require(eventEmitter != ZERO_ADDRESS, 'TransactionLedger: Address cannot be zero'); require(CICAddress != ZERO_ADDRESS, 'TransactionLedger: Address cannot be zero'); uint256 length = ledgerKeysParam.length; require(length > 0, 'TransactionLedger: values can not be empty'); require(length == ledgerValuesParam.length, 'TransactionLedger: invalid data'); for (uint256 index = 0; index < length; index++) { ledgerKeys[index] = ledgerKeysParam[index]; ledgerData[ledgerKeys[index]] = Ledger(ledgerValuesParam[index], true); } ledgerCounter = length - 1; paymentDisbursed = false; isRuleAdded = false; ledgerLock = false; isInitialized = true; iEventEmitter = IEventEmitter(eventEmitter); CIC = ICIC(CICAddress); iOrchestrator = IOrchestrator(iOrchestratorAddress); iEventEmitter.emitInitLedgerEvent(ledgerKeysParam, ledgerValuesParam, uniqueSecret, signature); } /** * @dev Updates the ledger with new values and payment details. * @param ledgerKeysParam Array of ledger keys. * @param ledgerValuesParam Array of ledger values. * @param uniqueSecret Unique secret for verification. * @param signature Signature for authorization. */ function updateLedger( string[] memory ledgerKeysParam, string[] memory ledgerValuesParam, uint256 uniqueSecret, bytes memory signature ) external override nonReentrant onlyAdmin { uint256 keysLength = ledgerKeysParam.length; require(!ledgerLock, 'TransactionLedger: Ledger is locked'); require(isInitialized, 'TransactionLedger: Ledger not initialized'); require(keysLength > 0, 'TransactionLedger: values can not be empty'); require(keysLength == ledgerValuesParam.length, 'TransactionLedger: invalid data'); for (uint256 index = 0; index < keysLength; index++) { require(ledgerData[ledgerKeysParam[index]].isExist, 'TransactionLedger: Invalid ledger key'); ledgerData[ledgerKeysParam[index]] = Ledger(ledgerValuesParam[index], true); } iEventEmitter.emitUpdateLedgerEvent(ledgerKeysParam, ledgerValuesParam, uniqueSecret, signature); } /** * @dev Adds new rules to the system. * @param rules Array of Rule structures defining the new rules. * @param uniqueSecret Unique secret for verification. * @param signature Signature for authorization. */ function addNewRules( Rule[] calldata rules, uint256 uniqueSecret, bytes memory signature ) external override nonReentrant onlyAdmin { uint256 keysLength = rules.length; require(isInitialized, 'TransactionLedger: Ledger not initialized'); require(!isRuleAdded, 'TransactionLedger: Rules already added'); require(!ledgerLock, 'TransactionLedger: Ledger is locked'); require(keysLength > 0, 'TransactionLedger: rules can not be empty'); for (uint256 index = 0; index < rules.length; index++) { rulesData[rulesCounter] = rules[index]; } rulesCounter = keysLength - 1; isRuleAdded = true; iEventEmitter.emitNewRuleAddedEvent(rules, uniqueSecret, signature); } /** * @dev Add details of a disbursement. * @param disbursementDetail A struct containing the details of the disbursement address. * @param disbursementData A struct containing the details of the disbursement amount. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function addDisburseDetails( DisburseDetails memory disbursementDetail, DisburseData memory disbursementData, uint256 uniqueSecret, bytes memory signature ) external override nonReentrant onlyAdmin { require(disbursementDetail.sellerWallet != address(0), "TransactionLedger: Invalid seller address"); require(disbursementData.seller > 0, "TransactionLedger: Invalid seller amount"); require(disburseDetails.sellerWallet == address(0), "TransactionLedger: Disburse details already exists"); disburseDetails = disbursementDetail; disburseData = disbursementData; iEventEmitter.emitDisburseDetailsAddedEvent(disburseDetails, uniqueSecret, signature); } /** * @dev Disburses payment according to the specified rule. * @param ruleId Identifier of the rule for payment disbursement. * @param uniqueSecret Unique secret for verification. * @param signature Signature for authorization. */ function disbursePayment( uint256 ruleId, uint256 uniqueSecret, bytes memory signature ) external override nonReentrant onlyAdmin { require(isInitialized, 'TransactionLedger: Ledger not initialized'); require(!paymentDisbursed, 'TransactionLedger: Payment already disbursed'); require(!ledgerLock, 'TransactionLedger: Ledger is lock'); require(disburseDetails.sellerWallet != address(0), "TransactionLedger: Disburse details not exists"); uint256 totalAmount = 0; if (ruleId == 0) { paymentDisbursed = true; totalAmount = disburseData.royalty + disburseData.affiliate + disburseData.seller + disburseData.CIP + disburseData.shipping + disburseData.tax; require(CIC.balanceOf(address(this)) >= totalAmount, "TransactionLedger: Insufficient CIC"); transferIfNotZero(disburseDetails.royaltyWallet, disburseData.royalty); transferIfNotZero(disburseDetails.affiliateWallet, disburseData.affiliate); transferIfNotZero(disburseDetails.sellerWallet, disburseData.seller); transferIfNotZero(disburseDetails.CIPWallet, disburseData.CIP); transferIfNotZero(disburseDetails.shippingWallet, disburseData.shipping); transferIfNotZero(disburseDetails.taxWallet, disburseData.tax); transferIfNotZero(disburseDetails.BITWallet, disburseData.BIT); transferIfNotZero(disburseDetails.ChainITWallet, disburseData.ChainIT); transferIfNotZero(disburseDetails.rewardWallet, disburseData.reward); iEventEmitter.emitFullPaymentDisbursedEvent(ledgerData['ledgerId'].value, uniqueSecret, signature); lockLedger(uniqueSecret, signature); if (compareStrings(ledgerData['tokenType'].value, 'ERC1155')) { IERC1155(disburseDetails.vdtContract).safeTransferFrom( address(this), disburseDetails.buyerWallet, disburseData.assetId, disburseData.quantity, '' ); } else { IERC721(disburseDetails.vdtContract).safeTransferFrom( address(this), disburseDetails.buyerWallet, disburseData.assetId ); } } else { Rule storage rule = rulesData[ruleId]; require(!rule.isDisbursed, 'TransactionLedger: Rule already disbursed'); rule.isDisbursed = true; rulesData[ruleId] = rule; uint256 toWalletLength = rule.toWallet.length; for (uint256 index = 0; index < toWalletLength; index++) { totalAmount += rule.disburseValue[index]; } // Check if the contract has sufficient CIC balance require(CIC.balanceOf(address(this)) >= totalAmount, "TransactionLedger: Insufficient CIC"); // Transfer CIC to each recipient for (uint256 index = 0; index < toWalletLength; index++) { transferIfNotZero(rule.toWallet[index], rule.disburseValue[index]); } } } /** * @dev Delist the product. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function delist(uint256 uniqueSecret, bytes memory signature) external override nonReentrant onlyAdmin { require(isInitialized, 'TransactionLedger: Ledger not initialized'); require(!paymentDisbursed, 'TransactionLedger: Payment already disbursed'); require(!ledgerLock, 'TransactionLedger: Ledger is lock'); string[] memory tempKey = new string[](1); string[] memory tempValue = new string[](1); tempKey[0] = 'transactionStatus'; tempValue[0] = 'ORDER_DELISTED'; require(compareStrings(ledgerData[tempKey[0]].value, 'ORDER_DELISTED'), 'TransactionLedger: Already delisted'); ledgerData[tempKey[0]] = Ledger(tempValue[0], true); lockLedger(uniqueSecret, signature); iEventEmitter.emitUpdateLedgerEvent(tempKey, tempValue, uniqueSecret, signature); iEventEmitter.emitDelistedEvent(ledgerData['listingId'].value, uniqueSecret, signature); IERC721(disburseDetails.vdtContract).safeTransferFrom( address(this), disburseDetails.sellerWallet, disburseData.assetId ); } /** * @dev Locks the ledger to prevent further modifications. * @param uniqueSecret Unique secret for verification. * @param signature Signature for authorization. */ function lockLedger(uint256 uniqueSecret, bytes memory signature) public onlyAdmin { require(!ledgerLock, 'TransactionLedger: Ledger is already lock'); ledgerLock = true; iEventEmitter.emitLedgerLockEvent(ledgerLock, uniqueSecret, signature); } /** * @dev Retrieve the ledger data as a JSON string. * @return A JSON string representing the ledger data. */ function getLedger() external view returns (string memory) { if (ledgerCounter <= 0) { return '{}'; } bytes memory jsonData = abi.encodePacked('{'); for (uint256 index = 0; index <= ledgerCounter; index++) { string memory key = ledgerKeys[index]; string memory value = ledgerData[key].value; jsonData = abi.encodePacked(jsonData, '"', key, '":"', value, '"'); if ((index + 1) <= ledgerCounter) { jsonData = abi.encodePacked(jsonData, ','); } } jsonData = abi.encodePacked(jsonData, '}'); return string(jsonData); } function compareStrings(string memory a, string memory b) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } function transferIfNotZero(address to, uint256 amount) internal { if(to != ZERO_ADDRESS) CIC.transferFrom(address(this), to, amount); } modifier onlyAdmin() { require(iOrchestrator.isAdminAddress(msg.sender), "TransactionLedger: Only admin can call this function"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./IBase.sol"; import "./IBaseOrchestrator.sol"; interface IEventEmitter is IBase, IBaseOrchestrator { /** * @notice Emits the InitLedger event with the provided keys, values, unique secret and signature.. * @param keys An array of string keys to be logged in the event. * @param values An array of string values corresponding to the keys to be logged in the event. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature used to validate the caller. */ function emitInitLedgerEvent(string[] memory keys, string[] memory values, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the UpdateLedger event event with the provided keys, values, unique secret, and signature.. * @param keys An array of string keys to be logged in the event. * @param values An array of string values corresponding to the keys to be logged in the event. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature used to validate the caller. */ function emitUpdateLedgerEvent(string[] memory keys, string[] memory values, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the LockLedger event with the provided lock status, unique secret and signature.. * @param isLocked A boolean indicating whether the ledger is locked or not. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature used to validate the caller. */ function emitLedgerLockEvent(bool isLocked, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the NewRuleAdded event with the provided rule keys, values, unique secret, signature.. * @param rule The rules which is newly added. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature used to validate the caller. */ function emitNewRuleAddedEvent(Rule[] memory rule, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the FullPaymentDisbursed event for the given listing ID. * @param listingId The unique identifier for the listing for which the event is emitted. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature to validate the caller. */ function emitFullPaymentDisbursedEvent(string memory listingId, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the Delisted event for the given listing ID. * @param listingId The unique identifier for the listing that is being delisted. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature to validate the caller. */ function emitDelistedEvent(string memory listingId, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the RuleDisbursed event for the given rule ID. * @param ruleId The unique identifier for the rule for which the event is emitted. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature to validate the caller. */ function emitRulePaymentDisbursedEvent(uint256 ruleId, uint256 uniqueSecret, bytes memory signature) external; /** * @notice Emits the VDTMinted event with the VDT details. * @param vdtContractAddress The address of the VDT contract * @param businessRecipient The address to the business recipient * @param consumerRecipient The address to the consumer recipient * @param nftTokenURI The URI of the NFT metadata * @param tokenId The token ID of the minted NFT */ function emitVDTMintedEvent(address vdtContractAddress, address businessRecipient, address consumerRecipient, string memory nftTokenURI, uint256 tokenId) external; /** * @notice Emits the VDTMinted event with the VDT details. * @param vdtContractAddress The address of the VDT contract * @param businessRecipient The address to the business recipient * @param sellerRecipient The address to the seller recipient * @param consumerRecipient The address to the consumer recipient * @param nftTokenURI The URI of the NFT metadata * @param tokenId The token ID of the minted NFT */ function emitServiceVDTMintedEvent(address vdtContractAddress, address businessRecipient, address sellerRecipient, address consumerRecipient, string memory nftTokenURI, uint256 tokenId) external; /** * @notice Emits the TokenURIUpdated event with the new tokenURI details. * @param vdtContractAddress The address of the VDT contract * @param tokenId The ID of the token to update * @param nftTokenURI The new URI of the NFT metadata */ function emitTokenURIUpdatedEvent(address vdtContractAddress, string memory nftTokenURI, uint256 tokenId) external; /** * @notice Emits the VDTCreated event with the VDT details. * @param VDTTokenDetails The details of the VDTs created. */ function emitMultiVDTCreated(VDTTokenDetail[] memory VDTTokenDetails) external; /** * @notice Emits the VDTTransfer event with the VDT details. * @param vdtContractAddress The address of the VDT contract * @param from The address of the sender * @param to The address of the recipient * @param tokenId The token Id of the token transferred */ function emitVDTTransferEvent(address vdtContractAddress, address from, address to, uint256 tokenId) external; /** * @notice Emits the ListVDT event with the provided data. * @param vdtName The name of the VDT to be logged in the event. * @param vdtAddress The address of the VDT to be logged in the event. * @param listingId The unique identifier for the listing for which the event is emitted. * @param from The address from which the VDT is being transferred. * @param to The address to which the VDT is being transferred. * @param tokenId The unique identifier of the token being transferred. */ function emitListVDT(string memory vdtName, address vdtAddress, string memory listingId, address from, address to, uint256 tokenId) external; /** * @notice Emits the DisburseDetailsAdded event with the provided disbursement details. * @param disburseDetail A struct containing the details of the disbursement to be logged in the event. * @param uniqueSecret The unique secret used to validate the signature. * @param signature A cryptographic signature used to validate the caller. */ function emitDisburseDetailsAddedEvent(DisburseDetails memory disburseDetail, uint256 uniqueSecret, bytes memory signature) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import './IBase.sol'; interface ITransactionLedger is IBase { /** * @dev Structure to store ledger details. * @param value The value associated with the ledger entry. * @param isExist A boolean indicating if the ledger entry exists. */ struct Ledger { string value; bool isExist; } /** * @dev Initializes the ledger with provided keys and values. * @param eventEmitter THe event emitter contract address. * @param CICAddress The CIC contract address. * @param ledgerKeysParam An array of strings representing ledger keys. * @param ledgerValuesParam An array of strings representing ledger values. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function initLedger( address eventEmitter, address CICAddress, address iOrchestratorAddress, string[] memory ledgerKeysParam, string[] memory ledgerValuesParam, uint256 uniqueSecret, bytes memory signature ) external; /** * @dev Updates the ledger with new values and payment details. * @param ledgerKeysParam An array of strings representing ledger keys. * @param ledgerValuesParam An array of strings representing ledger values. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function updateLedger( string[] memory ledgerKeysParam, string[] memory ledgerValuesParam, uint256 uniqueSecret, bytes memory signature ) external; /** * @dev Adds new rules to the system. * @param rules An array of Rule structures defining the new rules. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function addNewRules(Rule[] calldata rules, uint256 uniqueSecret, bytes memory signature) external; /** * @dev Disburses payment according to the specified rule. * @param ruleId The identifier of the rule for payment disbursement. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function disbursePayment(uint256 ruleId, uint256 uniqueSecret, bytes memory signature) external; /** * @dev Delist the product. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function delist(uint256 uniqueSecret, bytes memory signature) external; /** * @dev Add details of a disbursement. * @param disburseDetails A struct containing the details of the disbursement. * @param uniqueSecret A unique secret used for verification. * @param signature A cryptographic signature for authorization. */ function addDisburseDetails( DisburseDetails memory disburseDetails, DisburseData memory disburseData, uint256 uniqueSecret, bytes memory signature ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; interface ICIC is IERC20 { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IOrchestrator { function isAdminAddress(address wallet) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /** * @title IBase * @dev Interface defining structures and enumerations for payment disbursement * and transaction rules involving ERC721 and ERC1155 tokens. */ interface IBase { /** * @dev Enumeration specifying the type of rule value. * PERCENT - Represents a percentage-based value. * FIX - Represents a fixed value. */ enum RuleValueType { PERCENT, FIX } /** * @dev Struct defining the details for disbursing payments in a transaction. * @param royaltyWallet Address where royalty payments are sent. * @param affiliateWallet Address where affiliate payments are sent. * @param sellerWallet Address of the seller who will receive payment. * @param buyerWallet Address of the buyer involved in the transaction. * @param bitWallet Address used for platform fees or additional charges. * @param vdtContract Address of a contract, possibly involved in managing disbursement. * @param royalty Amount allocated for royalties. * @param affiliate Amount allocated for affiliate commission. * @param seller Amount allocated for the seller. * @param bit Amount allocated for platform or additional fees. * @param assetId Identifier for the asset being transacted. * @param quantity Number of tokens or assets being transferred. */ struct DisburseDetails { address royaltyWallet; address affiliateWallet; address sellerWallet; address buyerWallet; address CIPWallet; address ChainITWallet; address BITWallet; address shippingWallet; address taxWallet; address rewardWallet; address vdtContract; } struct DisburseData { uint256 royalty; uint256 affiliate; uint256 seller; uint256 CIP; uint256 shipping; uint256 tax; uint256 assetId; uint256 quantity; uint256 ChainIT; uint256 BIT; uint256 reward; } /** * @dev Struct defining a rule for payment disbursement. * @param ruleId Unique identifier for the rule. * @param ruleValue Array of values associated with the rule (e.g., thresholds, limits). * @param disburseValue Array of values determining how much to disburse according to the rule. * @param toWallet Array of wallet addresses where the payments will be sent. * @param valueType Array indicating if each disbursement is a percentage or fixed amount. * @param isDisbursed Flag indicating if the disbursement has already been completed. */ struct Rule { string ruleId; uint256[] ruleValue; uint256[] disburseValue; address[] toWallet; RuleValueType[] valueType; bool isDisbursed; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IBaseOrchestrator { struct VDTTokenDetail { address user; address vdtContract; uint256 vdtId; string vdtName; string metadataURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"inputs":[],"name":"CIC","outputs":[{"internalType":"contract ICIC","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"royaltyWallet","type":"address"},{"internalType":"address","name":"affiliateWallet","type":"address"},{"internalType":"address","name":"sellerWallet","type":"address"},{"internalType":"address","name":"buyerWallet","type":"address"},{"internalType":"address","name":"CIPWallet","type":"address"},{"internalType":"address","name":"ChainITWallet","type":"address"},{"internalType":"address","name":"BITWallet","type":"address"},{"internalType":"address","name":"shippingWallet","type":"address"},{"internalType":"address","name":"taxWallet","type":"address"},{"internalType":"address","name":"rewardWallet","type":"address"},{"internalType":"address","name":"vdtContract","type":"address"}],"internalType":"struct IBase.DisburseDetails","name":"disbursementDetail","type":"tuple"},{"components":[{"internalType":"uint256","name":"royalty","type":"uint256"},{"internalType":"uint256","name":"affiliate","type":"uint256"},{"internalType":"uint256","name":"seller","type":"uint256"},{"internalType":"uint256","name":"CIP","type":"uint256"},{"internalType":"uint256","name":"shipping","type":"uint256"},{"internalType":"uint256","name":"tax","type":"uint256"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"ChainIT","type":"uint256"},{"internalType":"uint256","name":"BIT","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"}],"internalType":"struct IBase.DisburseData","name":"disbursementData","type":"tuple"},{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"addDisburseDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"ruleId","type":"string"},{"internalType":"uint256[]","name":"ruleValue","type":"uint256[]"},{"internalType":"uint256[]","name":"disburseValue","type":"uint256[]"},{"internalType":"address[]","name":"toWallet","type":"address[]"},{"internalType":"enum IBase.RuleValueType[]","name":"valueType","type":"uint8[]"},{"internalType":"bool","name":"isDisbursed","type":"bool"}],"internalType":"struct IBase.Rule[]","name":"rules","type":"tuple[]"},{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"addNewRules","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chainItCoin","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"delist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disburseData","outputs":[{"internalType":"uint256","name":"royalty","type":"uint256"},{"internalType":"uint256","name":"affiliate","type":"uint256"},{"internalType":"uint256","name":"seller","type":"uint256"},{"internalType":"uint256","name":"CIP","type":"uint256"},{"internalType":"uint256","name":"shipping","type":"uint256"},{"internalType":"uint256","name":"tax","type":"uint256"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"ChainIT","type":"uint256"},{"internalType":"uint256","name":"BIT","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disburseDetails","outputs":[{"internalType":"address","name":"royaltyWallet","type":"address"},{"internalType":"address","name":"affiliateWallet","type":"address"},{"internalType":"address","name":"sellerWallet","type":"address"},{"internalType":"address","name":"buyerWallet","type":"address"},{"internalType":"address","name":"CIPWallet","type":"address"},{"internalType":"address","name":"ChainITWallet","type":"address"},{"internalType":"address","name":"BITWallet","type":"address"},{"internalType":"address","name":"shippingWallet","type":"address"},{"internalType":"address","name":"taxWallet","type":"address"},{"internalType":"address","name":"rewardWallet","type":"address"},{"internalType":"address","name":"vdtContract","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ruleId","type":"uint256"},{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"disbursePayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getLedger","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"iEventEmitter","outputs":[{"internalType":"contract IEventEmitter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"eventEmitter","type":"address"},{"internalType":"address","name":"CICAddress","type":"address"},{"internalType":"address","name":"iOrchestratorAddress","type":"address"},{"internalType":"string[]","name":"ledgerKeysParam","type":"string[]"},{"internalType":"string[]","name":"ledgerValuesParam","type":"string[]"},{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"initLedger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRuleAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"ledgerData","outputs":[{"internalType":"string","name":"value","type":"string"},{"internalType":"bool","name":"isExist","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ledgerKeys","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ledgerLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"lockLedger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paymentDisbursed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rulesCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rulesData","outputs":[{"internalType":"string","name":"ruleId","type":"string"},{"internalType":"bool","name":"isDisbursed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"ledgerKeysParam","type":"string[]"},{"internalType":"string[]","name":"ledgerValuesParam","type":"string[]"},{"internalType":"uint256","name":"uniqueSecret","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"updateLedger","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50600180556200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b613dfd80620000f86000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806382d13d6d116100b8578063d578dddd1161007c578063d578dddd146103b2578063d615d1c0146103d3578063def51dc2146103e6578063e683b7f214610401578063f36f235d1461040e578063f945fed01461041657600080fd5b806382d13d6d1461034f57806387b209b714610362578063885bff7b14610379578063c54cdb011461038c578063c74111911461039f57600080fd5b80633bd5b669116100ff5780633bd5b669146102e3578063402c2ecc146102f657806349bd604e14610309578063737733e31461031c5780637fdd66941461033c57600080fd5b80631ecd33d71461013c5780632d11ee141461015157806332f516b9146101db578063381a0ee014610206578063392e53cd146102c1575b600080fd5b61014f61014a3660046127c4565b61042a565b005b601054601154601254601354601454601554601654601754601854601954601a546101839a999897969594939291908b565b604080519b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152610120830152610140820152610160015b60405180910390f35b601d546101ee906001600160a01b031681565b6040516001600160a01b0390911681526020016101d2565b600554600654600754600854600954600a54600b54600c54600d54600e54600f546102569a6001600160a01b039081169a811699811698811697811696811695811694811693811692811691168b565b604080516001600160a01b039c8d1681529a8c1660208c0152988b16988a01989098529589166060890152938816608088015291871660a0870152861660c0860152851660e085015284166101008401528316610120830152909116610140820152610160016101d2565b6020546102d390610100900460ff1681565b60405190151581526020016101d2565b61014f6102f13660046127c4565b610994565b61014f6103043660046128c3565b610b0d565b61014f610317366004612a99565b610fb6565b61032f61032a366004612b60565b61134b565b6040516101d29190612bc9565b61014f61034a366004612be3565b6113e5565b61014f61035d366004612c68565b611714565b61036b601f5481565b6040519081526020016101d2565b6020546102d39062010000900460ff1681565b601b546101ee906001600160a01b031681565b61014f6103ad366004612cb7565b611f30565b6103c56103c0366004612b60565b6121b1565b6040516101d2929190612d3e565b6103c56103e1366004612d62565b612258565b6020546101ee9064010000000090046001600160a01b031681565b6020546102d39060ff1681565b61032f61230a565b6020546102d3906301000000900460ff1681565b6002600154036104555760405162461bcd60e51b815260040161044c90612d9e565b60405180910390fd5b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612de3565b6104e25760405162461bcd60e51b815260040161044c90612e00565b602054610100900460ff166105095760405162461bcd60e51b815260040161044c90612e54565b60205460ff161561052c5760405162461bcd60e51b815260040161044c90612e9d565b6020546301000000900460ff16156105565760405162461bcd60e51b815260040161044c90612ee9565b604080516001808252818301909252600091816020015b606081526020019060019003908161056d57505060408051600180825281830190925291925060009190602082015b606081526020019060019003908161059c579050509050604051806040016040528060118152602001707472616e73616374696f6e53746174757360781b815250826000815181106105f0576105f0612f2a565b60200260200101819052506040518060400160405280600e81526020016d13d491115497d111531254d5115160921b8152508160008151811061063557610635612f2a565b602002602001018190525061073160038360008151811061065857610658612f2a565b602002602001015160405161066d9190612f40565b908152604051908190036020019020805461068790612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546106b390612f5c565b80156107005780601f106106d557610100808354040283529160200191610700565b820191906000526020600020905b8154815290600101906020018083116106e357829003601f168201915b50505050506040518060400160405280600e81526020016d13d491115497d111531254d5115160921b81525061253f565b6107895760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e4c65646765723a20416c72656164792064656c69736044820152621d195960ea1b606482015260840161044c565b6040518060400160405280826000815181106107a7576107a7612f2a565b60200260200101518152602001600115158152506003836000815181106107d0576107d0612f2a565b60200260200101516040516107e59190612f40565b908152604051908190036020019020815181906108029082613000565b50602091909101516001909101805460ff19169115159190911790556108288484610994565b601b5460405163098c667960e21b81526001600160a01b039091169063263199e49061085e90859085908990899060040161310e565b600060405180830381600087803b15801561087857600080fd5b505af115801561088c573d6000803e3d6000fd5b5050601b5460408051681b1a5cdd1a5b99d25960ba1b8152600360098201529051908190036029018120635b862f0560e11b82526001600160a01b03909216935063b70c5e0a92506108e5919088908890600401613158565b600060405180830381600087803b1580156108ff57600080fd5b505af1158015610913573d6000803e3d6000fd5b5050600f54600754601654604051632142170760e11b81523060048201526001600160a01b0392831660248201526044810191909152911692506342842e0e91506064015b600060405180830381600087803b15801561097257600080fd5b505af1158015610986573d6000803e3d6000fd5b505060018055505050505050565b601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa1580156109dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a009190612de3565b610a1c5760405162461bcd60e51b815260040161044c90612e00565b6020546301000000900460ff1615610a885760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a204c656467657220697320616c7260448201526865616479206c6f636b60b81b606482015260840161044c565b6020805463ff0000001916630100000090811791829055601b5460405163fc7050eb60e01b81526001600160a01b039091169263fc7050eb92610ad792910460ff1690869086906004016131fe565b600060405180830381600087803b158015610af157600080fd5b505af1158015610b05573d6000803e3d6000fd5b505050505050565b600260015403610b2f5760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba09190612de3565b610bbc5760405162461bcd60e51b815260040161044c90612e00565b60408401516001600160a01b0316610c285760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a20496e76616c69642073656c6c6560448201526872206164647265737360b81b606482015260840161044c565b6000836040015111610c8d5760405162461bcd60e51b815260206004820152602860248201527f5472616e73616374696f6e4c65646765723a20496e76616c69642073656c6c656044820152671c88185b5bdd5b9d60c21b606482015260840161044c565b6007546001600160a01b031615610d015760405162461bcd60e51b815260206004820152603260248201527f5472616e73616374696f6e4c65646765723a2044697362757273652064657461604482015271696c7320616c72656164792065786973747360701b606482015260840161044c565b83600560008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160080160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101208201518160090160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061014082015181600a0160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050826010600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a0155905050601b60009054906101000a90046001600160a01b03166001600160a01b03166398810eda600584846040518463ffffffff1660e01b815260040161095893929190613228565b600260015403610fd85760405162461bcd60e51b815260040161044c90612d9e565b6002600155600054610100900460ff1615808015610ffd5750600054600160ff909116105b806110175750303b158015611017575060005460ff166001145b61107a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161044c565b6000805460ff19166001179055801561109d576000805461ff0019166101001790555b6001600160a01b0388166110c35760405162461bcd60e51b815260040161044c906132ee565b6001600160a01b0387166110e95760405162461bcd60e51b815260040161044c906132ee565b8451806111085760405162461bcd60e51b815260040161044c90613337565b845181146111585760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e4c65646765723a20696e76616c6964206461746100604482015260640161044c565b60005b8181101561123b5786818151811061117557611175612f2a565b602002602001015160026000838152602001908152602001600020908161119c9190613000565b5060405180604001604052808783815181106111ba576111ba612f2a565b60200260200101518152602001600115158152506003600260008481526020019081526020016000206040516111f09190613381565b9081526040519081900360200190208151819061120d9082613000565b50602091909101516001909101805460ff1916911515919091179055806112338161340d565b91505061115b565b50611247600182613426565b601e5560208054601b80546001600160a01b03199081166001600160a01b038e81169182179093556101006001600160c01b03199094166401000000008e8516021793909317909355601c8054909316908a161790915560405163225f921960e21b815263897e4864906112c590899089908990899060040161310e565b600060405180830381600087803b1580156112df57600080fd5b505af11580156112f3573d6000803e3d6000fd5b50505050508015610986576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505060018055505050505050565b6002602052600090815260409020805461136490612f5c565b80601f016020809104026020016040519081016040528092919081815260200182805461139090612f5c565b80156113dd5780601f106113b2576101008083540402835291602001916113dd565b820191906000526020600020905b8154815290600101906020018083116113c057829003601f168201915b505050505081565b6002600154036114075760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114789190612de3565b6114945760405162461bcd60e51b815260040161044c90612e00565b83516020546301000000900460ff16156114c05760405162461bcd60e51b815260040161044c90613439565b602054610100900460ff166114e75760405162461bcd60e51b815260040161044c90612e54565b600081116115075760405162461bcd60e51b815260040161044c90613337565b835181146115575760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e4c65646765723a20696e76616c6964206461746100604482015260640161044c565b60005b818110156116a057600386828151811061157657611576612f2a565b602002602001015160405161158b9190612f40565b9081526040519081900360200190206001015460ff166115fb5760405162461bcd60e51b815260206004820152602560248201527f5472616e73616374696f6e4c65646765723a20496e76616c6964206c6564676560448201526472206b657960d81b606482015260840161044c565b604051806040016040528086838151811061161857611618612f2a565b6020026020010151815260200160011515815250600387838151811061164057611640612f2a565b60200260200101516040516116559190612f40565b908152604051908190036020019020815181906116729082613000565b50602091909101516001909101805460ff1916911515919091179055806116988161340d565b91505061155a565b50601b5460405163098c667960e21b81526001600160a01b039091169063263199e4906116d790889088908890889060040161310e565b600060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b50506001805550505050505050565b6002600154036117365760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a79190612de3565b6117c35760405162461bcd60e51b815260040161044c90612e00565b602054610100900460ff166117ea5760405162461bcd60e51b815260040161044c90612e54565b60205460ff161561180d5760405162461bcd60e51b815260040161044c90612e9d565b6020546301000000900460ff16156118375760405162461bcd60e51b815260040161044c90612ee9565b6007546001600160a01b03166118a65760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e4c65646765723a204469736275727365206465746160448201526d696c73206e6f742065786973747360901b606482015260840161044c565b600083600003611cbe576020805460ff191660011790556015546014546013546012546011546010546118d9919061347c565b6118e3919061347c565b6118ed919061347c565b6118f7919061347c565b611901919061347c565b6020546040516370a0823160e01b815230600482015291925082916401000000009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611955573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611979919061348f565b10156119975760405162461bcd60e51b815260040161044c906134a8565b6005546010546119b0916001600160a01b031690612599565b6006546011546119c9916001600160a01b031690612599565b6007546012546119e2916001600160a01b031690612599565b6009546013546119fb916001600160a01b031690612599565b600c54601454611a14916001600160a01b031690612599565b600d54601554611a2d916001600160a01b031690612599565b600b54601954611a46916001600160a01b031690612599565b600a54601854611a5f916001600160a01b031690612599565b600e54601a54611a78916001600160a01b031690612599565b601b5460408051671b195919d95c925960c21b8152600360088201529051908190036028018120635f61f3a360e11b82526001600160a01b039092169163bec3e74691611acc919087908790600401613158565b600060405180830381600087803b158015611ae657600080fd5b505af1158015611afa573d6000803e3d6000fd5b50505050611b088383610994565b611be66003604051611b299068746f6b656e5479706560b81b815260090190565b9081526040519081900360200190208054611b4390612f5c565b80601f0160208091040260200160405190810160405280929190818152602001828054611b6f90612f5c565b8015611bbc5780601f10611b9157610100808354040283529160200191611bbc565b820191906000526020600020905b815481529060010190602001808311611b9f57829003601f168201915b5050505050604051806040016040528060078152602001664552433131353560c81b81525061253f565b15611c7957600f54600854601654601754604051637921219560e11b81523060048201526001600160a01b0393841660248201526044810192909252606482015260a06084820152600060a482015291169063f242432a9060c4015b600060405180830381600087803b158015611c5c57600080fd5b505af1158015611c70573d6000803e3d6000fd5b50505050611f26565b600f54600854601654604051632142170760e11b81523060048201526001600160a01b03928316602482015260448101919091529116906342842e0e90606401611c42565b6000848152600460205260409020600581015460ff1615611d335760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a2052756c6520616c726561647920604482015268191a5cd89d5c9cd95960ba1b606482015260840161044c565b60058101805460ff191660011790556000858152600460205260409020819080611d5d83826134eb565b5060018281018054611d729284019190612634565b5060028281018054611d879284019190612634565b5060038281018054611d9c9284019190612634565b5060048281018054611db19284019190612684565b506005918201549101805460ff191660ff9092161515919091179055600381015460005b81811015611e1c57826002018181548110611df257611df2612f2a565b906000526020600020015484611e08919061347c565b935080611e148161340d565b915050611dd5565b506020546040516370a0823160e01b8152306004820152849164010000000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015611e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e91919061348f565b1015611eaf5760405162461bcd60e51b815260040161044c906134a8565b60005b81811015611f2257611f10836003018281548110611ed257611ed2612f2a565b6000918252602090912001546002850180546001600160a01b039092169184908110611f0057611f00612f2a565b9060005260206000200154612599565b80611f1a8161340d565b915050611eb2565b5050505b5050600180555050565b600260015403611f525760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc39190612de3565b611fdf5760405162461bcd60e51b815260040161044c90612e00565b6020548390610100900460ff166120085760405162461bcd60e51b815260040161044c90612e54565b60205462010000900460ff16156120705760405162461bcd60e51b815260206004820152602660248201527f5472616e73616374696f6e4c65646765723a2052756c657320616c726561647960448201526508185919195960d21b606482015260840161044c565b6020546301000000900460ff161561209a5760405162461bcd60e51b815260040161044c90613439565b600081116120fc5760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a2072756c65732063616e206e6f7460448201526820626520656d70747960b81b606482015260840161044c565b60005b8481101561215b5785858281811061211957612119612f2a565b905060200281019061212b91906135b7565b601f546000908152600460205260409020612146828261394e565b508190506121538161340d565b9150506120ff565b50612167600182613426565b601f556020805462ff0000191662010000179055601b546040516332644bf360e11b81526001600160a01b03909116906364c897e6906116d7908890889088908890600401613b8d565b6004602052600090815260409020805481906121cc90612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546121f890612f5c565b80156122455780601f1061221a57610100808354040283529160200191612245565b820191906000526020600020905b81548152906001019060200180831161222857829003601f168201915b5050506005909301549192505060ff1682565b805160208183018101805160038252928201919093012091528054819061227e90612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546122aa90612f5c565b80156122f75780601f106122cc576101008083540402835291602001916122f7565b820191906000526020600020905b8154815290600101906020018083116122da57829003601f168201915b5050506001909301549192505060ff1682565b60606000601e541161233357506040805180820190915260028152617b7d60f01b602082015290565b60408051607b60f81b602082015281516001818303018152602190910190915260005b601e548111612517576000818152600260205260408120805461237890612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546123a490612f5c565b80156123f15780601f106123c6576101008083540402835291602001916123f1565b820191906000526020600020905b8154815290600101906020018083116123d457829003601f168201915b50505050509050600060038260405161240a9190612f40565b908152604051908190036020019020805461242490612f5c565b80601f016020809104026020016040519081016040528092919081815260200182805461245090612f5c565b801561249d5780601f106124725761010080835404028352916020019161249d565b820191906000526020600020905b81548152906001019060200180831161248057829003601f168201915b505050505090508382826040516020016124b993929190613d12565b6040516020818303038152906040529350601e548360016124da919061347c565b1161250257836040516020016124f09190613d7d565b60405160208183030381529060405293505b5050808061250f9061340d565b915050612356565b50806040516020016125299190613da2565b60408051601f1981840301815291905292915050565b6000816040516020016125529190612f40565b60405160208183030381529060405280519060200120836040516020016125799190612f40565b604051602081830303815290604052805190602001201490505b92915050565b6001600160a01b03821615612630576020546040516323b872dd60e01b81523060048201526001600160a01b03848116602483015260448201849052640100000000909204909116906323b872dd906064016020604051808303816000875af115801561260a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262e9190612de3565b505b5050565b8280548282559060005260206000209081019282156126745760005260206000209182015b82811115612674578254825591600101919060010190612659565b506126809291506126d1565b5090565b82805482825590600052602060002090601f0160209004810192821561267457600052602060002091601f0160209004820182811115612674578254825591600101919060010190612659565b5b8082111561268057600081556001016126d2565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561271f5761271f6126e6565b60405290565b604051601f8201601f191681016001600160401b038111828210171561274d5761274d6126e6565b604052919050565b600082601f83011261276657600080fd5b81356001600160401b0381111561277f5761277f6126e6565b612792601f8201601f1916602001612725565b8181528460208386010111156127a757600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156127d757600080fd5b8235915060208301356001600160401b038111156127f457600080fd5b61280085828601612755565b9150509250929050565b6001600160a01b038116811461281f57600080fd5b50565b803561282d8161280a565b919050565b6000610160828403121561284557600080fd5b61284d6126fc565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e082015261010080830135818301525061012080830135818301525061014080830135818301525092915050565b6000806000808486036103008112156128db57600080fd5b610160808212156128eb57600080fd5b6128f36126fc565b91506128fe87612822565b825261290c60208801612822565b602083015261291d60408801612822565b604083015261292e60608801612822565b606083015261293f60808801612822565b608083015261295060a08801612822565b60a083015261296160c08801612822565b60c083015261297260e08801612822565b60e0830152610100612985818901612822565b90830152610120612997888201612822565b908301526101406129a9888201612822565b81840152508195506129bd88828901612832565b945050506102c085013591506102e08501356001600160401b038111156129e357600080fd5b6129ef87828801612755565b91505092959194509250565b600082601f830112612a0c57600080fd5b813560206001600160401b0380831115612a2857612a286126e6565b8260051b612a37838201612725565b9384528581018301938381019088861115612a5157600080fd5b84880192505b85831015612a8d57823584811115612a6f5760008081fd5b612a7d8a87838c0101612755565b8352509184019190840190612a57565b98975050505050505050565b600080600080600080600060e0888a031215612ab457600080fd5b8735612abf8161280a565b96506020880135612acf8161280a565b9550612add60408901612822565b945060608801356001600160401b0380821115612af957600080fd5b612b058b838c016129fb565b955060808a0135915080821115612b1b57600080fd5b612b278b838c016129fb565b945060a08a0135935060c08a0135915080821115612b4457600080fd5b50612b518a828b01612755565b91505092959891949750929550565b600060208284031215612b7257600080fd5b5035919050565b60005b83811015612b94578181015183820152602001612b7c565b50506000910152565b60008151808452612bb5816020860160208601612b79565b601f01601f19169290920160200192915050565b602081526000612bdc6020830184612b9d565b9392505050565b60008060008060808587031215612bf957600080fd5b84356001600160401b0380821115612c1057600080fd5b612c1c888389016129fb565b95506020870135915080821115612c3257600080fd5b612c3e888389016129fb565b9450604087013593506060870135915080821115612c5b57600080fd5b506129ef87828801612755565b600080600060608486031215612c7d57600080fd5b833592506020840135915060408401356001600160401b03811115612ca157600080fd5b612cad86828701612755565b9150509250925092565b60008060008060608587031215612ccd57600080fd5b84356001600160401b0380821115612ce457600080fd5b818701915087601f830112612cf857600080fd5b813581811115612d0757600080fd5b8860208260051b8501011115612d1c57600080fd5b60209283019650945090860135925060408601359080821115612c5b57600080fd5b604081526000612d516040830185612b9d565b905082151560208301529392505050565b600060208284031215612d7457600080fd5b81356001600160401b03811115612d8a57600080fd5b612d9684828501612755565b949350505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b801515811461281f57600080fd5b600060208284031215612df557600080fd5b8151612bdc81612dd5565b60208082526034908201527f5472616e73616374696f6e4c65646765723a204f6e6c792061646d696e206361604082015273371031b0b636103a3434b990333ab731ba34b7b760611b606082015260800190565b60208082526029908201527f5472616e73616374696f6e4c65646765723a204c6564676572206e6f7420696e6040820152681a5d1a585b1a5e995960ba1b606082015260800190565b6020808252602c908201527f5472616e73616374696f6e4c65646765723a205061796d656e7420616c72656160408201526b191e48191a5cd89d5c9cd95960a21b606082015260800190565b60208082526021908201527f5472616e73616374696f6e4c65646765723a204c6564676572206973206c6f636040820152606b60f81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008251612f52818460208701612b79565b9190910192915050565b600181811c90821680612f7057607f821691505b602082108103612f9057634e487b7160e01b600052602260045260246000fd5b50919050565b5b818110156126305760008155600101612f97565b601f82111561262e57806000526020600020601f840160051c81016020851015612fd25750805b612fe4601f850160051c830182612f96565b5050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b03811115613019576130196126e6565b61302d816130278454612f5c565b84612fab565b602080601f83116001811461305c576000841561304a5750858301515b6130548582612feb565b865550610b05565b600085815260208120601f198616915b8281101561308b5788860151825594840194600190910190840161306c565b50858210156130a95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081518084526020808501808196508360051b8101915082860160005b858110156131015782840389526130ef848351612b9d565b988501989350908401906001016130d7565b5091979650505050505050565b60808152600061312160808301876130b9565b828103602084015261313381876130b9565b9050846040840152828103606084015261314d8185612b9d565b979650505050505050565b60608152600080855461316a81612f5c565b806060860152608060018084166000811461318c57600181146131a6576131d7565b60ff1985168884015283151560051b8801830195506131d7565b8a60005260208060002060005b868110156131ce5781548b82018701529084019082016131b3565b8a018501975050505b505050505084602084015282810360408401526131f48185612b9d565b9695505050505050565b831515815282602082015260606040820152600061321f6060830184612b9d565b95945050505050565b60006101a061324f8361324288546001600160a01b031690565b6001600160a01b03169052565b60018601546001600160a01b0390811660208501526002870154811660408501526003870154811660608501526004870154811660808501526005870154811660a08501526006870154811660c08501526007870154811660e08501526008870154811661010085015260098701548116610120850152600a87015416610140840152610160830185905261018083018190526131f481840185612b9d565b60208082526029908201527f5472616e73616374696f6e4c65646765723a20416464726573732063616e6e6f60408201526874206265207a65726f60b81b606082015260800190565b6020808252602a908201527f5472616e73616374696f6e4c65646765723a2076616c7565732063616e206e6f6040820152697420626520656d70747960b01b606082015260800190565b600080835461338f81612f5c565b600182811680156133a757600181146133bc576133eb565b60ff19841687528215158302870194506133eb565b8760005260208060002060005b858110156133e25781548a8201529084019082016133c9565b50505082870194505b50929695505050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161341f5761341f6133f7565b5060010190565b81810381811115612593576125936133f7565b60208082526023908201527f5472616e73616374696f6e4c65646765723a204c6564676572206973206c6f636040820152621ad95960ea1b606082015260800190565b80820180821115612593576125936133f7565b6000602082840312156134a157600080fd5b5051919050565b60208082526023908201527f5472616e73616374696f6e4c65646765723a20496e73756666696369656e742060408201526243494360e81b606082015260800190565b8181036134f6575050565b6135008254612f5c565b6001600160401b03811115613517576135176126e6565b613525816130278454612f5c565b6000601f82116001811461355357600083156135415750848201545b61354b8482612feb565b855550612fe4565b600085815260209020601f19841690600086815260209020845b8381101561358d578286015482556001958601959091019060200161356d565b50858310156130a95793015460001960f8600387901b161c19169092555050600190811b01905550565b6000823560be19833603018112612f5257600080fd5b6001600160401b038311156135e4576135e46126e6565b6135f8836135f28354612f5c565b83612fab565b6000601f84116001811461362657600085156136145750838201355b61361e8682612feb565b845550612fe4565b600083815260209020601f19861690835b828110156136575786850135825560209485019460019092019101613637565b50868210156136745760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e1984360301811261369d57600080fd5b8301803591506001600160401b038211156136b757600080fd5b6020019150600581901b36038213156136cf57600080fd5b9250929050565b8183101561262e578060005260206000206136f5838201858301612f96565b50505050565b6001600160401b03831115613712576137126126e6565b600160401b831115613726576137266126e6565b80548382556137368482846136d6565b50818160005260208060002060005b8681101561375f5783358282015592820192600101613745565b50505050505050565b6001600160401b0383111561377f5761377f6126e6565b600160401b831115613793576137936126e6565b80548382556137a38482846136d6565b50818160005260208060002060005b8681101561375f5783356137c58161280a565b82820155928201926001016137b2565b600160401b8211156137e9576137e96126e6565b80548282558083101561262e57816000526020600020601f840160051c8101601f85168015613829576000198083018054828460200360031b1c16815550505b50612fe4601f840160051c830182612f96565b6002811061281f57600080fd5b600081356125938161383c565b6001600160401b0383111561386d5761386d6126e6565b61387783826137d5565b60008181526020902082908460051c60005b818110156138e1576000805b60208082106138a457506138d4565b6138c76138b088613849565b60ff600385901b90811b801987169290911b161790565b9601959150600101613895565b5083820155600101613889565b50601f198616808703818814613937576000805b828110156139315761392061390988613849565b60ff600384901b90811b801986169290911b161790565b6020979097019691506001016138f5565b50848401555b5050505050505050565b6000813561259381612dd5565b8135601e1983360301811261396257600080fd5b820180356001600160401b0381111561397a57600080fd5b60208201915080360382131561398f57600080fd5b61399a8183856135cd565b50506139a96020830183613686565b6139b78183600186016136fb565b50506139c66040830183613686565b6139d48183600286016136fb565b50506139e36060830183613686565b6139f1818360038601613768565b5050613a006080830183613686565b613a0e818360048601613856565b5050612630613a1f60a08401613941565b6005830160ff1981541660ff8315151681178255505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e19843603018112613a7857600080fd5b83016020810192503590506001600160401b03811115613a9757600080fd5b8060051b36038213156136cf57600080fd5b81835260006001600160fb1b03831115613ac257600080fd5b8260051b80836020870137939093016020019392505050565b8183526000602080850194508260005b85811015613b19578135613afe8161280a565b6001600160a01b031687529582019590820190600101613aeb565b509495945050505050565b818352600060208085019450826000805b86811015613b76578235613b488161383c565b60028110613b6457634e487b7160e01b83526021600452602483fd5b88529683019691830191600101613b35565b50959695505050505050565b803561282d81612dd5565b60608082528181018590526000906080808401600588901b8501820189855b8a811015613cea57878303607f190184528135368d900360be19018112613bd257600080fd5b8c0160c0813536839003601e19018112613beb57600080fd5b820160208181019135906001600160401b03821115613c0957600080fd5b813603831315613c1857600080fd5b838852613c288489018385613a38565b9350613c3681860186613a61565b9350915087840381890152613c4c848484613aa9565b935060409250613c5e83860186613a61565b9250888503848a0152613c72858483613aa9565b945050613c818b860186613a61565b935091508784038b890152613c97848484613adb565b9350613ca58a860186613a61565b935091508784038a890152613cbb848484613b24565b935060a09250613ccc838601613b82565b15159290970191909152509484019493929092019150600101613bac565b50508760208701528581036040870152613d048188612b9d565b9a9950505050505050505050565b60008451613d24818460208901612b79565b601160f91b9083018181528551909190613d45816001850160208a01612b79565b62111d1160e91b600193909101928301528451613d69816004850160208901612b79565b600492019182015260050195945050505050565b60008251613d8f818460208701612b79565b600b60fa1b920191825250600101919050565b60008251613db4818460208701612b79565b607d60f81b92019182525060010191905056fea264697066735822122018b03027095889c7c8c23c57096c3ee14b5c4ecacbcf25383f17727e40b1b6da64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806382d13d6d116100b8578063d578dddd1161007c578063d578dddd146103b2578063d615d1c0146103d3578063def51dc2146103e6578063e683b7f214610401578063f36f235d1461040e578063f945fed01461041657600080fd5b806382d13d6d1461034f57806387b209b714610362578063885bff7b14610379578063c54cdb011461038c578063c74111911461039f57600080fd5b80633bd5b669116100ff5780633bd5b669146102e3578063402c2ecc146102f657806349bd604e14610309578063737733e31461031c5780637fdd66941461033c57600080fd5b80631ecd33d71461013c5780632d11ee141461015157806332f516b9146101db578063381a0ee014610206578063392e53cd146102c1575b600080fd5b61014f61014a3660046127c4565b61042a565b005b601054601154601254601354601454601554601654601754601854601954601a546101839a999897969594939291908b565b604080519b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152610120830152610140820152610160015b60405180910390f35b601d546101ee906001600160a01b031681565b6040516001600160a01b0390911681526020016101d2565b600554600654600754600854600954600a54600b54600c54600d54600e54600f546102569a6001600160a01b039081169a811699811698811697811696811695811694811693811692811691168b565b604080516001600160a01b039c8d1681529a8c1660208c0152988b16988a01989098529589166060890152938816608088015291871660a0870152861660c0860152851660e085015284166101008401528316610120830152909116610140820152610160016101d2565b6020546102d390610100900460ff1681565b60405190151581526020016101d2565b61014f6102f13660046127c4565b610994565b61014f6103043660046128c3565b610b0d565b61014f610317366004612a99565b610fb6565b61032f61032a366004612b60565b61134b565b6040516101d29190612bc9565b61014f61034a366004612be3565b6113e5565b61014f61035d366004612c68565b611714565b61036b601f5481565b6040519081526020016101d2565b6020546102d39062010000900460ff1681565b601b546101ee906001600160a01b031681565b61014f6103ad366004612cb7565b611f30565b6103c56103c0366004612b60565b6121b1565b6040516101d2929190612d3e565b6103c56103e1366004612d62565b612258565b6020546101ee9064010000000090046001600160a01b031681565b6020546102d39060ff1681565b61032f61230a565b6020546102d3906301000000900460ff1681565b6002600154036104555760405162461bcd60e51b815260040161044c90612d9e565b60405180910390fd5b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612de3565b6104e25760405162461bcd60e51b815260040161044c90612e00565b602054610100900460ff166105095760405162461bcd60e51b815260040161044c90612e54565b60205460ff161561052c5760405162461bcd60e51b815260040161044c90612e9d565b6020546301000000900460ff16156105565760405162461bcd60e51b815260040161044c90612ee9565b604080516001808252818301909252600091816020015b606081526020019060019003908161056d57505060408051600180825281830190925291925060009190602082015b606081526020019060019003908161059c579050509050604051806040016040528060118152602001707472616e73616374696f6e53746174757360781b815250826000815181106105f0576105f0612f2a565b60200260200101819052506040518060400160405280600e81526020016d13d491115497d111531254d5115160921b8152508160008151811061063557610635612f2a565b602002602001018190525061073160038360008151811061065857610658612f2a565b602002602001015160405161066d9190612f40565b908152604051908190036020019020805461068790612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546106b390612f5c565b80156107005780601f106106d557610100808354040283529160200191610700565b820191906000526020600020905b8154815290600101906020018083116106e357829003601f168201915b50505050506040518060400160405280600e81526020016d13d491115497d111531254d5115160921b81525061253f565b6107895760405162461bcd60e51b815260206004820152602360248201527f5472616e73616374696f6e4c65646765723a20416c72656164792064656c69736044820152621d195960ea1b606482015260840161044c565b6040518060400160405280826000815181106107a7576107a7612f2a565b60200260200101518152602001600115158152506003836000815181106107d0576107d0612f2a565b60200260200101516040516107e59190612f40565b908152604051908190036020019020815181906108029082613000565b50602091909101516001909101805460ff19169115159190911790556108288484610994565b601b5460405163098c667960e21b81526001600160a01b039091169063263199e49061085e90859085908990899060040161310e565b600060405180830381600087803b15801561087857600080fd5b505af115801561088c573d6000803e3d6000fd5b5050601b5460408051681b1a5cdd1a5b99d25960ba1b8152600360098201529051908190036029018120635b862f0560e11b82526001600160a01b03909216935063b70c5e0a92506108e5919088908890600401613158565b600060405180830381600087803b1580156108ff57600080fd5b505af1158015610913573d6000803e3d6000fd5b5050600f54600754601654604051632142170760e11b81523060048201526001600160a01b0392831660248201526044810191909152911692506342842e0e91506064015b600060405180830381600087803b15801561097257600080fd5b505af1158015610986573d6000803e3d6000fd5b505060018055505050505050565b601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa1580156109dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a009190612de3565b610a1c5760405162461bcd60e51b815260040161044c90612e00565b6020546301000000900460ff1615610a885760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a204c656467657220697320616c7260448201526865616479206c6f636b60b81b606482015260840161044c565b6020805463ff0000001916630100000090811791829055601b5460405163fc7050eb60e01b81526001600160a01b039091169263fc7050eb92610ad792910460ff1690869086906004016131fe565b600060405180830381600087803b158015610af157600080fd5b505af1158015610b05573d6000803e3d6000fd5b505050505050565b600260015403610b2f5760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba09190612de3565b610bbc5760405162461bcd60e51b815260040161044c90612e00565b60408401516001600160a01b0316610c285760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a20496e76616c69642073656c6c6560448201526872206164647265737360b81b606482015260840161044c565b6000836040015111610c8d5760405162461bcd60e51b815260206004820152602860248201527f5472616e73616374696f6e4c65646765723a20496e76616c69642073656c6c656044820152671c88185b5bdd5b9d60c21b606482015260840161044c565b6007546001600160a01b031615610d015760405162461bcd60e51b815260206004820152603260248201527f5472616e73616374696f6e4c65646765723a2044697362757273652064657461604482015271696c7320616c72656164792065786973747360701b606482015260840161044c565b83600560008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160080160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101208201518160090160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061014082015181600a0160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050826010600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a0155905050601b60009054906101000a90046001600160a01b03166001600160a01b03166398810eda600584846040518463ffffffff1660e01b815260040161095893929190613228565b600260015403610fd85760405162461bcd60e51b815260040161044c90612d9e565b6002600155600054610100900460ff1615808015610ffd5750600054600160ff909116105b806110175750303b158015611017575060005460ff166001145b61107a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161044c565b6000805460ff19166001179055801561109d576000805461ff0019166101001790555b6001600160a01b0388166110c35760405162461bcd60e51b815260040161044c906132ee565b6001600160a01b0387166110e95760405162461bcd60e51b815260040161044c906132ee565b8451806111085760405162461bcd60e51b815260040161044c90613337565b845181146111585760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e4c65646765723a20696e76616c6964206461746100604482015260640161044c565b60005b8181101561123b5786818151811061117557611175612f2a565b602002602001015160026000838152602001908152602001600020908161119c9190613000565b5060405180604001604052808783815181106111ba576111ba612f2a565b60200260200101518152602001600115158152506003600260008481526020019081526020016000206040516111f09190613381565b9081526040519081900360200190208151819061120d9082613000565b50602091909101516001909101805460ff1916911515919091179055806112338161340d565b91505061115b565b50611247600182613426565b601e5560208054601b80546001600160a01b03199081166001600160a01b038e81169182179093556101006001600160c01b03199094166401000000008e8516021793909317909355601c8054909316908a161790915560405163225f921960e21b815263897e4864906112c590899089908990899060040161310e565b600060405180830381600087803b1580156112df57600080fd5b505af11580156112f3573d6000803e3d6000fd5b50505050508015610986576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505060018055505050505050565b6002602052600090815260409020805461136490612f5c565b80601f016020809104026020016040519081016040528092919081815260200182805461139090612f5c565b80156113dd5780601f106113b2576101008083540402835291602001916113dd565b820191906000526020600020905b8154815290600101906020018083116113c057829003601f168201915b505050505081565b6002600154036114075760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114789190612de3565b6114945760405162461bcd60e51b815260040161044c90612e00565b83516020546301000000900460ff16156114c05760405162461bcd60e51b815260040161044c90613439565b602054610100900460ff166114e75760405162461bcd60e51b815260040161044c90612e54565b600081116115075760405162461bcd60e51b815260040161044c90613337565b835181146115575760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e4c65646765723a20696e76616c6964206461746100604482015260640161044c565b60005b818110156116a057600386828151811061157657611576612f2a565b602002602001015160405161158b9190612f40565b9081526040519081900360200190206001015460ff166115fb5760405162461bcd60e51b815260206004820152602560248201527f5472616e73616374696f6e4c65646765723a20496e76616c6964206c6564676560448201526472206b657960d81b606482015260840161044c565b604051806040016040528086838151811061161857611618612f2a565b6020026020010151815260200160011515815250600387838151811061164057611640612f2a565b60200260200101516040516116559190612f40565b908152604051908190036020019020815181906116729082613000565b50602091909101516001909101805460ff1916911515919091179055806116988161340d565b91505061155a565b50601b5460405163098c667960e21b81526001600160a01b039091169063263199e4906116d790889088908890889060040161310e565b600060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b50506001805550505050505050565b6002600154036117365760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a79190612de3565b6117c35760405162461bcd60e51b815260040161044c90612e00565b602054610100900460ff166117ea5760405162461bcd60e51b815260040161044c90612e54565b60205460ff161561180d5760405162461bcd60e51b815260040161044c90612e9d565b6020546301000000900460ff16156118375760405162461bcd60e51b815260040161044c90612ee9565b6007546001600160a01b03166118a65760405162461bcd60e51b815260206004820152602e60248201527f5472616e73616374696f6e4c65646765723a204469736275727365206465746160448201526d696c73206e6f742065786973747360901b606482015260840161044c565b600083600003611cbe576020805460ff191660011790556015546014546013546012546011546010546118d9919061347c565b6118e3919061347c565b6118ed919061347c565b6118f7919061347c565b611901919061347c565b6020546040516370a0823160e01b815230600482015291925082916401000000009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611955573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611979919061348f565b10156119975760405162461bcd60e51b815260040161044c906134a8565b6005546010546119b0916001600160a01b031690612599565b6006546011546119c9916001600160a01b031690612599565b6007546012546119e2916001600160a01b031690612599565b6009546013546119fb916001600160a01b031690612599565b600c54601454611a14916001600160a01b031690612599565b600d54601554611a2d916001600160a01b031690612599565b600b54601954611a46916001600160a01b031690612599565b600a54601854611a5f916001600160a01b031690612599565b600e54601a54611a78916001600160a01b031690612599565b601b5460408051671b195919d95c925960c21b8152600360088201529051908190036028018120635f61f3a360e11b82526001600160a01b039092169163bec3e74691611acc919087908790600401613158565b600060405180830381600087803b158015611ae657600080fd5b505af1158015611afa573d6000803e3d6000fd5b50505050611b088383610994565b611be66003604051611b299068746f6b656e5479706560b81b815260090190565b9081526040519081900360200190208054611b4390612f5c565b80601f0160208091040260200160405190810160405280929190818152602001828054611b6f90612f5c565b8015611bbc5780601f10611b9157610100808354040283529160200191611bbc565b820191906000526020600020905b815481529060010190602001808311611b9f57829003601f168201915b5050505050604051806040016040528060078152602001664552433131353560c81b81525061253f565b15611c7957600f54600854601654601754604051637921219560e11b81523060048201526001600160a01b0393841660248201526044810192909252606482015260a06084820152600060a482015291169063f242432a9060c4015b600060405180830381600087803b158015611c5c57600080fd5b505af1158015611c70573d6000803e3d6000fd5b50505050611f26565b600f54600854601654604051632142170760e11b81523060048201526001600160a01b03928316602482015260448101919091529116906342842e0e90606401611c42565b6000848152600460205260409020600581015460ff1615611d335760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a2052756c6520616c726561647920604482015268191a5cd89d5c9cd95960ba1b606482015260840161044c565b60058101805460ff191660011790556000858152600460205260409020819080611d5d83826134eb565b5060018281018054611d729284019190612634565b5060028281018054611d879284019190612634565b5060038281018054611d9c9284019190612634565b5060048281018054611db19284019190612684565b506005918201549101805460ff191660ff9092161515919091179055600381015460005b81811015611e1c57826002018181548110611df257611df2612f2a565b906000526020600020015484611e08919061347c565b935080611e148161340d565b915050611dd5565b506020546040516370a0823160e01b8152306004820152849164010000000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015611e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e91919061348f565b1015611eaf5760405162461bcd60e51b815260040161044c906134a8565b60005b81811015611f2257611f10836003018281548110611ed257611ed2612f2a565b6000918252602090912001546002850180546001600160a01b039092169184908110611f0057611f00612f2a565b9060005260206000200154612599565b80611f1a8161340d565b915050611eb2565b5050505b5050600180555050565b600260015403611f525760405162461bcd60e51b815260040161044c90612d9e565b6002600155601c5460405163011b5dad60e11b81523360048201526001600160a01b0390911690630236bb5a90602401602060405180830381865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc39190612de3565b611fdf5760405162461bcd60e51b815260040161044c90612e00565b6020548390610100900460ff166120085760405162461bcd60e51b815260040161044c90612e54565b60205462010000900460ff16156120705760405162461bcd60e51b815260206004820152602660248201527f5472616e73616374696f6e4c65646765723a2052756c657320616c726561647960448201526508185919195960d21b606482015260840161044c565b6020546301000000900460ff161561209a5760405162461bcd60e51b815260040161044c90613439565b600081116120fc5760405162461bcd60e51b815260206004820152602960248201527f5472616e73616374696f6e4c65646765723a2072756c65732063616e206e6f7460448201526820626520656d70747960b81b606482015260840161044c565b60005b8481101561215b5785858281811061211957612119612f2a565b905060200281019061212b91906135b7565b601f546000908152600460205260409020612146828261394e565b508190506121538161340d565b9150506120ff565b50612167600182613426565b601f556020805462ff0000191662010000179055601b546040516332644bf360e11b81526001600160a01b03909116906364c897e6906116d7908890889088908890600401613b8d565b6004602052600090815260409020805481906121cc90612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546121f890612f5c565b80156122455780601f1061221a57610100808354040283529160200191612245565b820191906000526020600020905b81548152906001019060200180831161222857829003601f168201915b5050506005909301549192505060ff1682565b805160208183018101805160038252928201919093012091528054819061227e90612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546122aa90612f5c565b80156122f75780601f106122cc576101008083540402835291602001916122f7565b820191906000526020600020905b8154815290600101906020018083116122da57829003601f168201915b5050506001909301549192505060ff1682565b60606000601e541161233357506040805180820190915260028152617b7d60f01b602082015290565b60408051607b60f81b602082015281516001818303018152602190910190915260005b601e548111612517576000818152600260205260408120805461237890612f5c565b80601f01602080910402602001604051908101604052809291908181526020018280546123a490612f5c565b80156123f15780601f106123c6576101008083540402835291602001916123f1565b820191906000526020600020905b8154815290600101906020018083116123d457829003601f168201915b50505050509050600060038260405161240a9190612f40565b908152604051908190036020019020805461242490612f5c565b80601f016020809104026020016040519081016040528092919081815260200182805461245090612f5c565b801561249d5780601f106124725761010080835404028352916020019161249d565b820191906000526020600020905b81548152906001019060200180831161248057829003601f168201915b505050505090508382826040516020016124b993929190613d12565b6040516020818303038152906040529350601e548360016124da919061347c565b1161250257836040516020016124f09190613d7d565b60405160208183030381529060405293505b5050808061250f9061340d565b915050612356565b50806040516020016125299190613da2565b60408051601f1981840301815291905292915050565b6000816040516020016125529190612f40565b60405160208183030381529060405280519060200120836040516020016125799190612f40565b604051602081830303815290604052805190602001201490505b92915050565b6001600160a01b03821615612630576020546040516323b872dd60e01b81523060048201526001600160a01b03848116602483015260448201849052640100000000909204909116906323b872dd906064016020604051808303816000875af115801561260a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262e9190612de3565b505b5050565b8280548282559060005260206000209081019282156126745760005260206000209182015b82811115612674578254825591600101919060010190612659565b506126809291506126d1565b5090565b82805482825590600052602060002090601f0160209004810192821561267457600052602060002091601f0160209004820182811115612674578254825591600101919060010190612659565b5b8082111561268057600081556001016126d2565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b038111828210171561271f5761271f6126e6565b60405290565b604051601f8201601f191681016001600160401b038111828210171561274d5761274d6126e6565b604052919050565b600082601f83011261276657600080fd5b81356001600160401b0381111561277f5761277f6126e6565b612792601f8201601f1916602001612725565b8181528460208386010111156127a757600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156127d757600080fd5b8235915060208301356001600160401b038111156127f457600080fd5b61280085828601612755565b9150509250929050565b6001600160a01b038116811461281f57600080fd5b50565b803561282d8161280a565b919050565b6000610160828403121561284557600080fd5b61284d6126fc565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e082015261010080830135818301525061012080830135818301525061014080830135818301525092915050565b6000806000808486036103008112156128db57600080fd5b610160808212156128eb57600080fd5b6128f36126fc565b91506128fe87612822565b825261290c60208801612822565b602083015261291d60408801612822565b604083015261292e60608801612822565b606083015261293f60808801612822565b608083015261295060a08801612822565b60a083015261296160c08801612822565b60c083015261297260e08801612822565b60e0830152610100612985818901612822565b90830152610120612997888201612822565b908301526101406129a9888201612822565b81840152508195506129bd88828901612832565b945050506102c085013591506102e08501356001600160401b038111156129e357600080fd5b6129ef87828801612755565b91505092959194509250565b600082601f830112612a0c57600080fd5b813560206001600160401b0380831115612a2857612a286126e6565b8260051b612a37838201612725565b9384528581018301938381019088861115612a5157600080fd5b84880192505b85831015612a8d57823584811115612a6f5760008081fd5b612a7d8a87838c0101612755565b8352509184019190840190612a57565b98975050505050505050565b600080600080600080600060e0888a031215612ab457600080fd5b8735612abf8161280a565b96506020880135612acf8161280a565b9550612add60408901612822565b945060608801356001600160401b0380821115612af957600080fd5b612b058b838c016129fb565b955060808a0135915080821115612b1b57600080fd5b612b278b838c016129fb565b945060a08a0135935060c08a0135915080821115612b4457600080fd5b50612b518a828b01612755565b91505092959891949750929550565b600060208284031215612b7257600080fd5b5035919050565b60005b83811015612b94578181015183820152602001612b7c565b50506000910152565b60008151808452612bb5816020860160208601612b79565b601f01601f19169290920160200192915050565b602081526000612bdc6020830184612b9d565b9392505050565b60008060008060808587031215612bf957600080fd5b84356001600160401b0380821115612c1057600080fd5b612c1c888389016129fb565b95506020870135915080821115612c3257600080fd5b612c3e888389016129fb565b9450604087013593506060870135915080821115612c5b57600080fd5b506129ef87828801612755565b600080600060608486031215612c7d57600080fd5b833592506020840135915060408401356001600160401b03811115612ca157600080fd5b612cad86828701612755565b9150509250925092565b60008060008060608587031215612ccd57600080fd5b84356001600160401b0380821115612ce457600080fd5b818701915087601f830112612cf857600080fd5b813581811115612d0757600080fd5b8860208260051b8501011115612d1c57600080fd5b60209283019650945090860135925060408601359080821115612c5b57600080fd5b604081526000612d516040830185612b9d565b905082151560208301529392505050565b600060208284031215612d7457600080fd5b81356001600160401b03811115612d8a57600080fd5b612d9684828501612755565b949350505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b801515811461281f57600080fd5b600060208284031215612df557600080fd5b8151612bdc81612dd5565b60208082526034908201527f5472616e73616374696f6e4c65646765723a204f6e6c792061646d696e206361604082015273371031b0b636103a3434b990333ab731ba34b7b760611b606082015260800190565b60208082526029908201527f5472616e73616374696f6e4c65646765723a204c6564676572206e6f7420696e6040820152681a5d1a585b1a5e995960ba1b606082015260800190565b6020808252602c908201527f5472616e73616374696f6e4c65646765723a205061796d656e7420616c72656160408201526b191e48191a5cd89d5c9cd95960a21b606082015260800190565b60208082526021908201527f5472616e73616374696f6e4c65646765723a204c6564676572206973206c6f636040820152606b60f81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008251612f52818460208701612b79565b9190910192915050565b600181811c90821680612f7057607f821691505b602082108103612f9057634e487b7160e01b600052602260045260246000fd5b50919050565b5b818110156126305760008155600101612f97565b601f82111561262e57806000526020600020601f840160051c81016020851015612fd25750805b612fe4601f850160051c830182612f96565b5050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b03811115613019576130196126e6565b61302d816130278454612f5c565b84612fab565b602080601f83116001811461305c576000841561304a5750858301515b6130548582612feb565b865550610b05565b600085815260208120601f198616915b8281101561308b5788860151825594840194600190910190840161306c565b50858210156130a95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081518084526020808501808196508360051b8101915082860160005b858110156131015782840389526130ef848351612b9d565b988501989350908401906001016130d7565b5091979650505050505050565b60808152600061312160808301876130b9565b828103602084015261313381876130b9565b9050846040840152828103606084015261314d8185612b9d565b979650505050505050565b60608152600080855461316a81612f5c565b806060860152608060018084166000811461318c57600181146131a6576131d7565b60ff1985168884015283151560051b8801830195506131d7565b8a60005260208060002060005b868110156131ce5781548b82018701529084019082016131b3565b8a018501975050505b505050505084602084015282810360408401526131f48185612b9d565b9695505050505050565b831515815282602082015260606040820152600061321f6060830184612b9d565b95945050505050565b60006101a061324f8361324288546001600160a01b031690565b6001600160a01b03169052565b60018601546001600160a01b0390811660208501526002870154811660408501526003870154811660608501526004870154811660808501526005870154811660a08501526006870154811660c08501526007870154811660e08501526008870154811661010085015260098701548116610120850152600a87015416610140840152610160830185905261018083018190526131f481840185612b9d565b60208082526029908201527f5472616e73616374696f6e4c65646765723a20416464726573732063616e6e6f60408201526874206265207a65726f60b81b606082015260800190565b6020808252602a908201527f5472616e73616374696f6e4c65646765723a2076616c7565732063616e206e6f6040820152697420626520656d70747960b01b606082015260800190565b600080835461338f81612f5c565b600182811680156133a757600181146133bc576133eb565b60ff19841687528215158302870194506133eb565b8760005260208060002060005b858110156133e25781548a8201529084019082016133c9565b50505082870194505b50929695505050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161341f5761341f6133f7565b5060010190565b81810381811115612593576125936133f7565b60208082526023908201527f5472616e73616374696f6e4c65646765723a204c6564676572206973206c6f636040820152621ad95960ea1b606082015260800190565b80820180821115612593576125936133f7565b6000602082840312156134a157600080fd5b5051919050565b60208082526023908201527f5472616e73616374696f6e4c65646765723a20496e73756666696369656e742060408201526243494360e81b606082015260800190565b8181036134f6575050565b6135008254612f5c565b6001600160401b03811115613517576135176126e6565b613525816130278454612f5c565b6000601f82116001811461355357600083156135415750848201545b61354b8482612feb565b855550612fe4565b600085815260209020601f19841690600086815260209020845b8381101561358d578286015482556001958601959091019060200161356d565b50858310156130a95793015460001960f8600387901b161c19169092555050600190811b01905550565b6000823560be19833603018112612f5257600080fd5b6001600160401b038311156135e4576135e46126e6565b6135f8836135f28354612f5c565b83612fab565b6000601f84116001811461362657600085156136145750838201355b61361e8682612feb565b845550612fe4565b600083815260209020601f19861690835b828110156136575786850135825560209485019460019092019101613637565b50868210156136745760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e1984360301811261369d57600080fd5b8301803591506001600160401b038211156136b757600080fd5b6020019150600581901b36038213156136cf57600080fd5b9250929050565b8183101561262e578060005260206000206136f5838201858301612f96565b50505050565b6001600160401b03831115613712576137126126e6565b600160401b831115613726576137266126e6565b80548382556137368482846136d6565b50818160005260208060002060005b8681101561375f5783358282015592820192600101613745565b50505050505050565b6001600160401b0383111561377f5761377f6126e6565b600160401b831115613793576137936126e6565b80548382556137a38482846136d6565b50818160005260208060002060005b8681101561375f5783356137c58161280a565b82820155928201926001016137b2565b600160401b8211156137e9576137e96126e6565b80548282558083101561262e57816000526020600020601f840160051c8101601f85168015613829576000198083018054828460200360031b1c16815550505b50612fe4601f840160051c830182612f96565b6002811061281f57600080fd5b600081356125938161383c565b6001600160401b0383111561386d5761386d6126e6565b61387783826137d5565b60008181526020902082908460051c60005b818110156138e1576000805b60208082106138a457506138d4565b6138c76138b088613849565b60ff600385901b90811b801987169290911b161790565b9601959150600101613895565b5083820155600101613889565b50601f198616808703818814613937576000805b828110156139315761392061390988613849565b60ff600384901b90811b801986169290911b161790565b6020979097019691506001016138f5565b50848401555b5050505050505050565b6000813561259381612dd5565b8135601e1983360301811261396257600080fd5b820180356001600160401b0381111561397a57600080fd5b60208201915080360382131561398f57600080fd5b61399a8183856135cd565b50506139a96020830183613686565b6139b78183600186016136fb565b50506139c66040830183613686565b6139d48183600286016136fb565b50506139e36060830183613686565b6139f1818360038601613768565b5050613a006080830183613686565b613a0e818360048601613856565b5050612630613a1f60a08401613941565b6005830160ff1981541660ff8315151681178255505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e19843603018112613a7857600080fd5b83016020810192503590506001600160401b03811115613a9757600080fd5b8060051b36038213156136cf57600080fd5b81835260006001600160fb1b03831115613ac257600080fd5b8260051b80836020870137939093016020019392505050565b8183526000602080850194508260005b85811015613b19578135613afe8161280a565b6001600160a01b031687529582019590820190600101613aeb565b509495945050505050565b818352600060208085019450826000805b86811015613b76578235613b488161383c565b60028110613b6457634e487b7160e01b83526021600452602483fd5b88529683019691830191600101613b35565b50959695505050505050565b803561282d81612dd5565b60608082528181018590526000906080808401600588901b8501820189855b8a811015613cea57878303607f190184528135368d900360be19018112613bd257600080fd5b8c0160c0813536839003601e19018112613beb57600080fd5b820160208181019135906001600160401b03821115613c0957600080fd5b813603831315613c1857600080fd5b838852613c288489018385613a38565b9350613c3681860186613a61565b9350915087840381890152613c4c848484613aa9565b935060409250613c5e83860186613a61565b9250888503848a0152613c72858483613aa9565b945050613c818b860186613a61565b935091508784038b890152613c97848484613adb565b9350613ca58a860186613a61565b935091508784038a890152613cbb848484613b24565b935060a09250613ccc838601613b82565b15159290970191909152509484019493929092019150600101613bac565b50508760208701528581036040870152613d048188612b9d565b9a9950505050505050505050565b60008451613d24818460208901612b79565b601160f91b9083018181528551909190613d45816001850160208a01612b79565b62111d1160e91b600193909101928301528451613d69816004850160208901612b79565b600492019182015260050195945050505050565b60008251613d8f818460208701612b79565b600b60fa1b920191825250600101919050565b60008251613db4818460208701612b79565b607d60f81b92019182525060010191905056fea264697066735822122018b03027095889c7c8c23c57096c3ee14b5c4ecacbcf25383f17727e40b1b6da64736f6c63430008110033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
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.