-
-
Save thoonly/c56c003481df91b536f4108441f8b35a to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&runs=200&gist=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| import { CBORChainlink } from "./vendor/CBORChainlink.sol"; | |
| import { BufferChainlink } from "./vendor/BufferChainlink.sol"; | |
| /** | |
| * @title Library for common Chainlink functions | |
| * @dev Uses imported CBOR library for encoding to buffer | |
| */ | |
| library Chainlink { | |
| uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase | |
| using CBORChainlink for BufferChainlink.buffer; | |
| struct Request { | |
| bytes32 id; | |
| address callbackAddress; | |
| bytes4 callbackFunctionId; | |
| uint256 nonce; | |
| BufferChainlink.buffer buf; | |
| } | |
| /** | |
| * @notice Initializes a Chainlink request | |
| * @dev Sets the ID, callback address, and callback function signature on the request | |
| * @param self The uninitialized request | |
| * @param _id The Job Specification ID | |
| * @param _callbackAddress The callback address | |
| * @param _callbackFunction The callback function signature | |
| * @return The initialized request | |
| */ | |
| function initialize( | |
| Request memory self, | |
| bytes32 _id, | |
| address _callbackAddress, | |
| bytes4 _callbackFunction | |
| ) internal pure returns (Chainlink.Request memory) { | |
| BufferChainlink.init(self.buf, defaultBufferSize); | |
| self.id = _id; | |
| self.callbackAddress = _callbackAddress; | |
| self.callbackFunctionId = _callbackFunction; | |
| return self; | |
| } | |
| /** | |
| * @notice Sets the data for the buffer without encoding CBOR on-chain | |
| * @dev CBOR can be closed with curly-brackets {} or they can be left off | |
| * @param self The initialized request | |
| * @param _data The CBOR data | |
| */ | |
| function setBuffer(Request memory self, bytes memory _data) | |
| internal pure | |
| { | |
| BufferChainlink.init(self.buf, _data.length); | |
| BufferChainlink.append(self.buf, _data); | |
| } | |
| /** | |
| * @notice Adds a string value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The string value to add | |
| */ | |
| function add(Request memory self, string memory _key, string memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeString(_value); | |
| } | |
| /** | |
| * @notice Adds a bytes value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The bytes value to add | |
| */ | |
| function addBytes(Request memory self, string memory _key, bytes memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeBytes(_value); | |
| } | |
| /** | |
| * @notice Adds a int256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The int256 value to add | |
| */ | |
| function addInt(Request memory self, string memory _key, int256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeInt(_value); | |
| } | |
| /** | |
| * @notice Adds a uint256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The uint256 value to add | |
| */ | |
| function addUint(Request memory self, string memory _key, uint256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeUInt(_value); | |
| } | |
| /** | |
| * @notice Adds an array of strings to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _values The array of string values to add | |
| */ | |
| function addStringArray(Request memory self, string memory _key, string[] memory _values) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.startArray(); | |
| for (uint256 i = 0; i < _values.length; i++) { | |
| self.buf.encodeString(_values[i]); | |
| } | |
| self.buf.endSequence(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| import "./Chainlink.sol"; | |
| import "./interfaces/ENSInterface.sol"; | |
| import "./interfaces/LinkTokenInterface.sol"; | |
| import "./interfaces/ChainlinkRequestInterface.sol"; | |
| import "./interfaces/PointerInterface.sol"; | |
| import { ENSResolver as ENSResolver_Chainlink } from "./vendor/ENSResolver.sol"; | |
| /** | |
| * @title The ChainlinkClient contract | |
| * @notice Contract writers can inherit this contract in order to create requests for the | |
| * Chainlink network | |
| */ | |
| contract ChainlinkClient { | |
| using Chainlink for Chainlink.Request; | |
| uint256 constant internal LINK = 10**18; | |
| uint256 constant private AMOUNT_OVERRIDE = 0; | |
| address constant private SENDER_OVERRIDE = address(0); | |
| uint256 constant private ARGS_VERSION = 1; | |
| bytes32 constant private ENS_TOKEN_SUBNAME = keccak256("link"); | |
| bytes32 constant private ENS_ORACLE_SUBNAME = keccak256("oracle"); | |
| address constant private LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571; | |
| ENSInterface private ens; | |
| bytes32 private ensNode; | |
| LinkTokenInterface private link; | |
| ChainlinkRequestInterface private oracle; | |
| uint256 private requestCount = 1; | |
| mapping(bytes32 => address) private pendingRequests; | |
| event ChainlinkRequested(bytes32 indexed id); | |
| event ChainlinkFulfilled(bytes32 indexed id); | |
| event ChainlinkCancelled(bytes32 indexed id); | |
| /** | |
| * @notice Creates a request that can hold additional parameters | |
| * @param _specId The Job Specification ID that the request will be created for | |
| * @param _callbackAddress The callback address that the response will be sent to | |
| * @param _callbackFunctionSignature The callback function signature to use for the callback address | |
| * @return A Chainlink Request struct in memory | |
| */ | |
| function buildChainlinkRequest( | |
| bytes32 _specId, | |
| address _callbackAddress, | |
| bytes4 _callbackFunctionSignature | |
| ) internal pure returns (Chainlink.Request memory) { | |
| Chainlink.Request memory req; | |
| return req.initialize(_specId, _callbackAddress, _callbackFunctionSignature); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the stored oracle address | |
| * @dev Calls `chainlinkRequestTo` with the stored oracle address | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequest(Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32) | |
| { | |
| return sendChainlinkRequestTo(address(oracle), _req, _payment); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the specified oracle address | |
| * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to | |
| * send LINK which creates a request on the target oracle contract. | |
| * Emits ChainlinkRequested event. | |
| * @param _oracle The address of the oracle for the request | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32 requestId) | |
| { | |
| requestId = keccak256(abi.encodePacked(this, requestCount)); | |
| _req.nonce = requestCount; | |
| pendingRequests[requestId] = _oracle; | |
| emit ChainlinkRequested(requestId); | |
| require(link.transferAndCall(_oracle, _payment, encodeRequest(_req)), "unable to transferAndCall to oracle"); | |
| requestCount += 1; | |
| return requestId; | |
| } | |
| /** | |
| * @notice Allows a request to be cancelled if it has not been fulfilled | |
| * @dev Requires keeping track of the expiration value emitted from the oracle contract. | |
| * Deletes the request from the `pendingRequests` mapping. | |
| * Emits ChainlinkCancelled event. | |
| * @param _requestId The request ID | |
| * @param _payment The amount of LINK sent for the request | |
| * @param _callbackFunc The callback function specified for the request | |
| * @param _expiration The time of the expiration for the request | |
| */ | |
| function cancelChainlinkRequest( | |
| bytes32 _requestId, | |
| uint256 _payment, | |
| bytes4 _callbackFunc, | |
| uint256 _expiration | |
| ) | |
| internal | |
| { | |
| ChainlinkRequestInterface requested = ChainlinkRequestInterface(pendingRequests[_requestId]); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkCancelled(_requestId); | |
| requested.cancelOracleRequest(_requestId, _payment, _callbackFunc, _expiration); | |
| } | |
| /** | |
| * @notice Sets the stored oracle address | |
| * @param _oracle The address of the oracle contract | |
| */ | |
| function setChainlinkOracle(address _oracle) internal { | |
| oracle = ChainlinkRequestInterface(_oracle); | |
| } | |
| /** | |
| * @notice Sets the LINK token address | |
| * @param _link The address of the LINK token contract | |
| */ | |
| function setChainlinkToken(address _link) internal { | |
| link = LinkTokenInterface(_link); | |
| } | |
| /** | |
| * @notice Sets the Chainlink token address for the public | |
| * network as given by the Pointer contract | |
| */ | |
| function setPublicChainlinkToken() internal { | |
| setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress()); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the LINK token | |
| * @return The address of the LINK token | |
| */ | |
| function chainlinkTokenAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(link); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the oracle contract | |
| * @return The address of the oracle contract | |
| */ | |
| function chainlinkOracleAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(oracle); | |
| } | |
| /** | |
| * @notice Allows for a request which was created on another contract to be fulfilled | |
| * on this contract | |
| * @param _oracle The address of the oracle contract that will fulfill the request | |
| * @param _requestId The request ID used for the response | |
| */ | |
| function addChainlinkExternalRequest(address _oracle, bytes32 _requestId) | |
| internal | |
| notPendingRequest(_requestId) | |
| { | |
| pendingRequests[_requestId] = _oracle; | |
| } | |
| /** | |
| * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS | |
| * @dev Accounts for subnodes having different resolvers | |
| * @param _ens The address of the ENS contract | |
| * @param _node The ENS node hash | |
| */ | |
| function useChainlinkWithENS(address _ens, bytes32 _node) | |
| internal | |
| { | |
| ens = ENSInterface(_ens); | |
| ensNode = _node; | |
| bytes32 linkSubnode = keccak256(abi.encodePacked(ensNode, ENS_TOKEN_SUBNAME)); | |
| ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(linkSubnode)); | |
| setChainlinkToken(resolver.addr(linkSubnode)); | |
| updateChainlinkOracleWithENS(); | |
| } | |
| /** | |
| * @notice Sets the stored oracle contract with the address resolved by ENS | |
| * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously | |
| */ | |
| function updateChainlinkOracleWithENS() | |
| internal | |
| { | |
| bytes32 oracleSubnode = keccak256(abi.encodePacked(ensNode, ENS_ORACLE_SUBNAME)); | |
| ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(oracleSubnode)); | |
| setChainlinkOracle(resolver.addr(oracleSubnode)); | |
| } | |
| /** | |
| * @notice Encodes the request to be sent to the oracle contract | |
| * @dev The Chainlink node expects values to be in order for the request to be picked up. Order of types | |
| * will be validated in the oracle contract. | |
| * @param _req The initialized Chainlink Request | |
| * @return The bytes payload for the `transferAndCall` method | |
| */ | |
| function encodeRequest(Chainlink.Request memory _req) | |
| private | |
| view | |
| returns (bytes memory) | |
| { | |
| return abi.encodeWithSelector( | |
| oracle.oracleRequest.selector, | |
| SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address | |
| AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent | |
| _req.id, | |
| _req.callbackAddress, | |
| _req.callbackFunctionId, | |
| _req.nonce, | |
| ARGS_VERSION, | |
| _req.buf.buf); | |
| } | |
| /** | |
| * @notice Ensures that the fulfillment is valid for this contract | |
| * @dev Use if the contract developer prefers methods instead of modifiers for validation | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| function validateChainlinkCallback(bytes32 _requestId) | |
| internal | |
| recordChainlinkFulfillment(_requestId) | |
| // solhint-disable-next-line no-empty-blocks | |
| {} | |
| /** | |
| * @dev Reverts if the sender is not the oracle of the request. | |
| * Emits ChainlinkFulfilled event. | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier recordChainlinkFulfillment(bytes32 _requestId) { | |
| require(msg.sender == pendingRequests[_requestId], | |
| "Source must be the oracle of the request"); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkFulfilled(_requestId); | |
| _; | |
| } | |
| /** | |
| * @dev Reverts if the request is already pending | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier notPendingRequest(bytes32 _requestId) { | |
| require(pendingRequests[_requestId] == address(0), "Request is already pending"); | |
| _; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface ChainlinkRequestInterface { | |
| function oracleRequest( | |
| address sender, | |
| uint256 requestPrice, | |
| bytes32 serviceAgreementID, | |
| address callbackAddress, | |
| bytes4 callbackFunctionId, | |
| uint256 nonce, | |
| uint256 dataVersion, | |
| bytes calldata data | |
| ) external; | |
| function cancelOracleRequest( | |
| bytes32 requestId, | |
| uint256 payment, | |
| bytes4 callbackFunctionId, | |
| uint256 expiration | |
| ) external; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface ENSInterface { | |
| // Logged when the owner of a node assigns a new owner to a subnode. | |
| event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); | |
| // Logged when the owner of a node transfers ownership to a new account. | |
| event Transfer(bytes32 indexed node, address owner); | |
| // Logged when the resolver for a node changes. | |
| event NewResolver(bytes32 indexed node, address resolver); | |
| // Logged when the TTL of a node changes | |
| event NewTTL(bytes32 indexed node, uint64 ttl); | |
| function setSubnodeOwner(bytes32 node, bytes32 label, address _owner) external; | |
| function setResolver(bytes32 node, address _resolver) external; | |
| function setOwner(bytes32 node, address _owner) external; | |
| function setTTL(bytes32 node, uint64 _ttl) external; | |
| function owner(bytes32 node) external view returns (address); | |
| function resolver(bytes32 node) external view returns (address); | |
| function ttl(bytes32 node) external view returns (uint64); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface LinkTokenInterface { | |
| function allowance(address owner, address spender) external view returns (uint256 remaining); | |
| function approve(address spender, uint256 value) external returns (bool success); | |
| function balanceOf(address owner) external view returns (uint256 balance); | |
| function decimals() external view returns (uint8 decimalPlaces); | |
| function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); | |
| function increaseApproval(address spender, uint256 subtractedValue) external; | |
| function name() external view returns (string memory tokenName); | |
| function symbol() external view returns (string memory tokenSymbol); | |
| function totalSupply() external view returns (uint256 totalTokensIssued); | |
| function transfer(address to, uint256 value) external returns (bool success); | |
| function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success); | |
| function transferFrom(address from, address to, uint256 value) external returns (bool success); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface PointerInterface { | |
| function getAddress() external view returns (address); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| /** | |
| * @dev A library for working with mutable byte buffers in Solidity. | |
| * | |
| * Byte buffers are mutable and expandable, and provide a variety of primitives | |
| * for writing to them. At any time you can fetch a bytes object containing the | |
| * current contents of the buffer. The bytes object should not be stored between | |
| * operations, as it may change due to resizing of the buffer. | |
| */ | |
| library BufferChainlink { | |
| /** | |
| * @dev Represents a mutable buffer. Buffers have a current value (buf) and | |
| * a capacity. The capacity may be longer than the current value, in | |
| * which case it can be extended without the need to allocate more memory. | |
| */ | |
| struct buffer { | |
| bytes buf; | |
| uint capacity; | |
| } | |
| /** | |
| * @dev Initializes a buffer with an initial capacity. | |
| * @param buf The buffer to initialize. | |
| * @param capacity The number of bytes of space to allocate the buffer. | |
| * @return The buffer, for chaining. | |
| */ | |
| function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) { | |
| if (capacity % 32 != 0) { | |
| capacity += 32 - (capacity % 32); | |
| } | |
| // Allocate space for the buffer data | |
| buf.capacity = capacity; | |
| assembly { | |
| let ptr := mload(0x40) | |
| mstore(buf, ptr) | |
| mstore(ptr, 0) | |
| mstore(0x40, add(32, add(ptr, capacity))) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Initializes a new buffer from an existing bytes object. | |
| * Changes to the buffer may mutate the original value. | |
| * @param b The bytes object to initialize the buffer with. | |
| * @return A new buffer. | |
| */ | |
| function fromBytes(bytes memory b) internal pure returns(buffer memory) { | |
| buffer memory buf; | |
| buf.buf = b; | |
| buf.capacity = b.length; | |
| return buf; | |
| } | |
| function resize(buffer memory buf, uint capacity) private pure { | |
| bytes memory oldbuf = buf.buf; | |
| init(buf, capacity); | |
| append(buf, oldbuf); | |
| } | |
| function max(uint a, uint b) private pure returns(uint) { | |
| if (a > b) { | |
| return a; | |
| } | |
| return b; | |
| } | |
| /** | |
| * @dev Sets buffer length to 0. | |
| * @param buf The buffer to truncate. | |
| * @return The original buffer, for chaining.. | |
| */ | |
| function truncate(buffer memory buf) internal pure returns (buffer memory) { | |
| assembly { | |
| let bufptr := mload(buf) | |
| mstore(bufptr, 0) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The start offset to write to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) { | |
| require(len <= data.length); | |
| if (off + len > buf.capacity) { | |
| resize(buf, max(buf.capacity, len + off) * 2); | |
| } | |
| uint dest; | |
| uint src; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Start address = buffer address + offset + sizeof(buffer length) | |
| dest := add(add(bufptr, 32), off) | |
| // Update buffer length if we're extending it | |
| if gt(add(len, off), buflen) { | |
| mstore(bufptr, add(len, off)) | |
| } | |
| src := add(data, 32) | |
| } | |
| // Copy word-length chunks while possible | |
| for (; len >= 32; len -= 32) { | |
| assembly { | |
| mstore(dest, mload(src)) | |
| } | |
| dest += 32; | |
| src += 32; | |
| } | |
| // Copy remaining bytes | |
| uint mask = 256 ** (32 - len) - 1; | |
| assembly { | |
| let srcpart := and(mload(src), not(mask)) | |
| let destpart := and(mload(dest), mask) | |
| mstore(dest, or(destpart, srcpart)) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, len); | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, data.length); | |
| } | |
| /** | |
| * @dev Writes a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write the byte at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) { | |
| if (off >= buf.capacity) { | |
| resize(buf, buf.capacity * 2); | |
| } | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Address = buffer address + sizeof(buffer length) + off | |
| let dest := add(add(bufptr, off), 32) | |
| mstore8(dest, data) | |
| // Update buffer length if we extended it | |
| if eq(off, buflen) { | |
| mstore(bufptr, add(buflen, 1)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) { | |
| return writeUint8(buf, buf.buf.length, data); | |
| } | |
| /** | |
| * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (left-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| // Right-align data | |
| data = data >> (8 * (32 - len)); | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + sizeof(buffer length) + off + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, off, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chhaining. | |
| */ | |
| function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, 32); | |
| } | |
| /** | |
| * @dev Writes an integer to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (right-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + off + sizeof(buffer length) + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the end of the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer. | |
| */ | |
| function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) { | |
| return writeInt(buf, buf.buf.length, data, len); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >= 0.4.19; | |
| import { BufferChainlink } from "./BufferChainlink.sol"; | |
| library CBORChainlink { | |
| using BufferChainlink for BufferChainlink.buffer; | |
| uint8 private constant MAJOR_TYPE_INT = 0; | |
| uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1; | |
| uint8 private constant MAJOR_TYPE_BYTES = 2; | |
| uint8 private constant MAJOR_TYPE_STRING = 3; | |
| uint8 private constant MAJOR_TYPE_ARRAY = 4; | |
| uint8 private constant MAJOR_TYPE_MAP = 5; | |
| uint8 private constant MAJOR_TYPE_TAG = 6; | |
| uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7; | |
| uint8 private constant TAG_TYPE_BIGNUM = 2; | |
| uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3; | |
| function encodeType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major, | |
| uint value | |
| ) | |
| private | |
| pure | |
| { | |
| if(value <= 23) { | |
| buf.appendUint8(uint8((major << 5) | value)); | |
| } else if(value <= 0xFF) { | |
| buf.appendUint8(uint8((major << 5) | 24)); | |
| buf.appendInt(value, 1); | |
| } else if(value <= 0xFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 25)); | |
| buf.appendInt(value, 2); | |
| } else if(value <= 0xFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 26)); | |
| buf.appendInt(value, 4); | |
| } else if(value <= 0xFFFFFFFFFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 27)); | |
| buf.appendInt(value, 8); | |
| } | |
| } | |
| function encodeIndefiniteLengthType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major | |
| ) | |
| private | |
| pure | |
| { | |
| buf.appendUint8(uint8((major << 5) | 31)); | |
| } | |
| function encodeUInt( | |
| BufferChainlink.buffer memory buf, | |
| uint value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_INT, value); | |
| } | |
| function encodeInt( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| if(value < -0x10000000000000000) { | |
| encodeSignedBigNum(buf, value); | |
| } else if(value > 0xFFFFFFFFFFFFFFFF) { | |
| encodeBigNum(buf, value); | |
| } else if(value >= 0) { | |
| encodeType(buf, MAJOR_TYPE_INT, uint(value)); | |
| } else { | |
| encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value)); | |
| } | |
| } | |
| function encodeBytes( | |
| BufferChainlink.buffer memory buf, | |
| bytes memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_BYTES, value.length); | |
| buf.append(value); | |
| } | |
| function encodeBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(value))); | |
| } | |
| function encodeSignedBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int input | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(-1 - input))); | |
| } | |
| function encodeString( | |
| BufferChainlink.buffer memory buf, | |
| string memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length); | |
| buf.append(bytes(value)); | |
| } | |
| function startArray( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); | |
| } | |
| function startMap( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); | |
| } | |
| function endSequence( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| abstract contract ENSResolver { | |
| function addr(bytes32 node) public view virtual returns (address); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| import { CBORChainlink } from "./vendor/CBORChainlink.sol"; | |
| import { BufferChainlink } from "./vendor/BufferChainlink.sol"; | |
| /** | |
| * @title Library for common Chainlink functions | |
| * @dev Uses imported CBOR library for encoding to buffer | |
| */ | |
| library Chainlink { | |
| uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase | |
| using CBORChainlink for BufferChainlink.buffer; | |
| struct Request { | |
| bytes32 id; | |
| address callbackAddress; | |
| bytes4 callbackFunctionId; | |
| uint256 nonce; | |
| BufferChainlink.buffer buf; | |
| } | |
| /** | |
| * @notice Initializes a Chainlink request | |
| * @dev Sets the ID, callback address, and callback function signature on the request | |
| * @param self The uninitialized request | |
| * @param _id The Job Specification ID | |
| * @param _callbackAddress The callback address | |
| * @param _callbackFunction The callback function signature | |
| * @return The initialized request | |
| */ | |
| function initialize( | |
| Request memory self, | |
| bytes32 _id, | |
| address _callbackAddress, | |
| bytes4 _callbackFunction | |
| ) internal pure returns (Chainlink.Request memory) { | |
| BufferChainlink.init(self.buf, defaultBufferSize); | |
| self.id = _id; | |
| self.callbackAddress = _callbackAddress; | |
| self.callbackFunctionId = _callbackFunction; | |
| return self; | |
| } | |
| /** | |
| * @notice Sets the data for the buffer without encoding CBOR on-chain | |
| * @dev CBOR can be closed with curly-brackets {} or they can be left off | |
| * @param self The initialized request | |
| * @param _data The CBOR data | |
| */ | |
| function setBuffer(Request memory self, bytes memory _data) | |
| internal pure | |
| { | |
| BufferChainlink.init(self.buf, _data.length); | |
| BufferChainlink.append(self.buf, _data); | |
| } | |
| /** | |
| * @notice Adds a string value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The string value to add | |
| */ | |
| function add(Request memory self, string memory _key, string memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeString(_value); | |
| } | |
| /** | |
| * @notice Adds a bytes value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The bytes value to add | |
| */ | |
| function addBytes(Request memory self, string memory _key, bytes memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeBytes(_value); | |
| } | |
| /** | |
| * @notice Adds a int256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The int256 value to add | |
| */ | |
| function addInt(Request memory self, string memory _key, int256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeInt(_value); | |
| } | |
| /** | |
| * @notice Adds a uint256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The uint256 value to add | |
| */ | |
| function addUint(Request memory self, string memory _key, uint256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeUInt(_value); | |
| } | |
| /** | |
| * @notice Adds an array of strings to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _values The array of string values to add | |
| */ | |
| function addStringArray(Request memory self, string memory _key, string[] memory _values) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.startArray(); | |
| for (uint256 i = 0; i < _values.length; i++) { | |
| self.buf.encodeString(_values[i]); | |
| } | |
| self.buf.endSequence(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| import "./Chainlink.sol"; | |
| import "./interfaces/ENSInterface.sol"; | |
| import "./interfaces/LinkTokenInterface.sol"; | |
| import "./interfaces/ChainlinkRequestInterface.sol"; | |
| import "./interfaces/PointerInterface.sol"; | |
| import { ENSResolver as ENSResolver_Chainlink } from "./vendor/ENSResolver.sol"; | |
| /** | |
| * @title The ChainlinkClient contract | |
| * @notice Contract writers can inherit this contract in order to create requests for the | |
| * Chainlink network | |
| */ | |
| contract ChainlinkClient { | |
| using Chainlink for Chainlink.Request; | |
| uint256 constant internal LINK = 10**18; | |
| uint256 constant private AMOUNT_OVERRIDE = 0; | |
| address constant private SENDER_OVERRIDE = address(0); | |
| uint256 constant private ARGS_VERSION = 1; | |
| bytes32 constant private ENS_TOKEN_SUBNAME = keccak256("link"); | |
| bytes32 constant private ENS_ORACLE_SUBNAME = keccak256("oracle"); | |
| address constant private LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571; | |
| ENSInterface private ens; | |
| bytes32 private ensNode; | |
| LinkTokenInterface private link; | |
| ChainlinkRequestInterface private oracle; | |
| uint256 private requestCount = 1; | |
| mapping(bytes32 => address) private pendingRequests; | |
| event ChainlinkRequested(bytes32 indexed id); | |
| event ChainlinkFulfilled(bytes32 indexed id); | |
| event ChainlinkCancelled(bytes32 indexed id); | |
| /** | |
| * @notice Creates a request that can hold additional parameters | |
| * @param _specId The Job Specification ID that the request will be created for | |
| * @param _callbackAddress The callback address that the response will be sent to | |
| * @param _callbackFunctionSignature The callback function signature to use for the callback address | |
| * @return A Chainlink Request struct in memory | |
| */ | |
| function buildChainlinkRequest( | |
| bytes32 _specId, | |
| address _callbackAddress, | |
| bytes4 _callbackFunctionSignature | |
| ) internal pure returns (Chainlink.Request memory) { | |
| Chainlink.Request memory req; | |
| return req.initialize(_specId, _callbackAddress, _callbackFunctionSignature); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the stored oracle address | |
| * @dev Calls `chainlinkRequestTo` with the stored oracle address | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequest(Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32) | |
| { | |
| return sendChainlinkRequestTo(address(oracle), _req, _payment); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the specified oracle address | |
| * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to | |
| * send LINK which creates a request on the target oracle contract. | |
| * Emits ChainlinkRequested event. | |
| * @param _oracle The address of the oracle for the request | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32 requestId) | |
| { | |
| requestId = keccak256(abi.encodePacked(this, requestCount)); | |
| _req.nonce = requestCount; | |
| pendingRequests[requestId] = _oracle; | |
| emit ChainlinkRequested(requestId); | |
| require(link.transferAndCall(_oracle, _payment, encodeRequest(_req)), "unable to transferAndCall to oracle"); | |
| requestCount += 1; | |
| return requestId; | |
| } | |
| /** | |
| * @notice Allows a request to be cancelled if it has not been fulfilled | |
| * @dev Requires keeping track of the expiration value emitted from the oracle contract. | |
| * Deletes the request from the `pendingRequests` mapping. | |
| * Emits ChainlinkCancelled event. | |
| * @param _requestId The request ID | |
| * @param _payment The amount of LINK sent for the request | |
| * @param _callbackFunc The callback function specified for the request | |
| * @param _expiration The time of the expiration for the request | |
| */ | |
| function cancelChainlinkRequest( | |
| bytes32 _requestId, | |
| uint256 _payment, | |
| bytes4 _callbackFunc, | |
| uint256 _expiration | |
| ) | |
| internal | |
| { | |
| ChainlinkRequestInterface requested = ChainlinkRequestInterface(pendingRequests[_requestId]); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkCancelled(_requestId); | |
| requested.cancelOracleRequest(_requestId, _payment, _callbackFunc, _expiration); | |
| } | |
| /** | |
| * @notice Sets the stored oracle address | |
| * @param _oracle The address of the oracle contract | |
| */ | |
| function setChainlinkOracle(address _oracle) internal { | |
| oracle = ChainlinkRequestInterface(_oracle); | |
| } | |
| /** | |
| * @notice Sets the LINK token address | |
| * @param _link The address of the LINK token contract | |
| */ | |
| function setChainlinkToken(address _link) internal { | |
| link = LinkTokenInterface(_link); | |
| } | |
| /** | |
| * @notice Sets the Chainlink token address for the public | |
| * network as given by the Pointer contract | |
| */ | |
| function setPublicChainlinkToken() internal { | |
| setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress()); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the LINK token | |
| * @return The address of the LINK token | |
| */ | |
| function chainlinkTokenAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(link); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the oracle contract | |
| * @return The address of the oracle contract | |
| */ | |
| function chainlinkOracleAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(oracle); | |
| } | |
| /** | |
| * @notice Allows for a request which was created on another contract to be fulfilled | |
| * on this contract | |
| * @param _oracle The address of the oracle contract that will fulfill the request | |
| * @param _requestId The request ID used for the response | |
| */ | |
| function addChainlinkExternalRequest(address _oracle, bytes32 _requestId) | |
| internal | |
| notPendingRequest(_requestId) | |
| { | |
| pendingRequests[_requestId] = _oracle; | |
| } | |
| /** | |
| * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS | |
| * @dev Accounts for subnodes having different resolvers | |
| * @param _ens The address of the ENS contract | |
| * @param _node The ENS node hash | |
| */ | |
| function useChainlinkWithENS(address _ens, bytes32 _node) | |
| internal | |
| { | |
| ens = ENSInterface(_ens); | |
| ensNode = _node; | |
| bytes32 linkSubnode = keccak256(abi.encodePacked(ensNode, ENS_TOKEN_SUBNAME)); | |
| ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(linkSubnode)); | |
| setChainlinkToken(resolver.addr(linkSubnode)); | |
| updateChainlinkOracleWithENS(); | |
| } | |
| /** | |
| * @notice Sets the stored oracle contract with the address resolved by ENS | |
| * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously | |
| */ | |
| function updateChainlinkOracleWithENS() | |
| internal | |
| { | |
| bytes32 oracleSubnode = keccak256(abi.encodePacked(ensNode, ENS_ORACLE_SUBNAME)); | |
| ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(oracleSubnode)); | |
| setChainlinkOracle(resolver.addr(oracleSubnode)); | |
| } | |
| /** | |
| * @notice Encodes the request to be sent to the oracle contract | |
| * @dev The Chainlink node expects values to be in order for the request to be picked up. Order of types | |
| * will be validated in the oracle contract. | |
| * @param _req The initialized Chainlink Request | |
| * @return The bytes payload for the `transferAndCall` method | |
| */ | |
| function encodeRequest(Chainlink.Request memory _req) | |
| private | |
| view | |
| returns (bytes memory) | |
| { | |
| return abi.encodeWithSelector( | |
| oracle.oracleRequest.selector, | |
| SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address | |
| AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent | |
| _req.id, | |
| _req.callbackAddress, | |
| _req.callbackFunctionId, | |
| _req.nonce, | |
| ARGS_VERSION, | |
| _req.buf.buf); | |
| } | |
| /** | |
| * @notice Ensures that the fulfillment is valid for this contract | |
| * @dev Use if the contract developer prefers methods instead of modifiers for validation | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| function validateChainlinkCallback(bytes32 _requestId) | |
| internal | |
| recordChainlinkFulfillment(_requestId) | |
| // solhint-disable-next-line no-empty-blocks | |
| {} | |
| /** | |
| * @dev Reverts if the sender is not the oracle of the request. | |
| * Emits ChainlinkFulfilled event. | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier recordChainlinkFulfillment(bytes32 _requestId) { | |
| require(msg.sender == pendingRequests[_requestId], | |
| "Source must be the oracle of the request"); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkFulfilled(_requestId); | |
| _; | |
| } | |
| /** | |
| * @dev Reverts if the request is already pending | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier notPendingRequest(bytes32 _requestId) { | |
| require(pendingRequests[_requestId] == address(0), "Request is already pending"); | |
| _; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface ChainlinkRequestInterface { | |
| function oracleRequest( | |
| address sender, | |
| uint256 requestPrice, | |
| bytes32 serviceAgreementID, | |
| address callbackAddress, | |
| bytes4 callbackFunctionId, | |
| uint256 nonce, | |
| uint256 dataVersion, | |
| bytes calldata data | |
| ) external; | |
| function cancelOracleRequest( | |
| bytes32 requestId, | |
| uint256 payment, | |
| bytes4 callbackFunctionId, | |
| uint256 expiration | |
| ) external; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface ENSInterface { | |
| // Logged when the owner of a node assigns a new owner to a subnode. | |
| event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); | |
| // Logged when the owner of a node transfers ownership to a new account. | |
| event Transfer(bytes32 indexed node, address owner); | |
| // Logged when the resolver for a node changes. | |
| event NewResolver(bytes32 indexed node, address resolver); | |
| // Logged when the TTL of a node changes | |
| event NewTTL(bytes32 indexed node, uint64 ttl); | |
| function setSubnodeOwner(bytes32 node, bytes32 label, address _owner) external; | |
| function setResolver(bytes32 node, address _resolver) external; | |
| function setOwner(bytes32 node, address _owner) external; | |
| function setTTL(bytes32 node, uint64 _ttl) external; | |
| function owner(bytes32 node) external view returns (address); | |
| function resolver(bytes32 node) external view returns (address); | |
| function ttl(bytes32 node) external view returns (uint64); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface LinkTokenInterface { | |
| function allowance(address owner, address spender) external view returns (uint256 remaining); | |
| function approve(address spender, uint256 value) external returns (bool success); | |
| function balanceOf(address owner) external view returns (uint256 balance); | |
| function decimals() external view returns (uint8 decimalPlaces); | |
| function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); | |
| function increaseApproval(address spender, uint256 subtractedValue) external; | |
| function name() external view returns (string memory tokenName); | |
| function symbol() external view returns (string memory tokenSymbol); | |
| function totalSupply() external view returns (uint256 totalTokensIssued); | |
| function transfer(address to, uint256 value) external returns (bool success); | |
| function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success); | |
| function transferFrom(address from, address to, uint256 value) external returns (bool success); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface PointerInterface { | |
| function getAddress() external view returns (address); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| /** | |
| * @dev A library for working with mutable byte buffers in Solidity. | |
| * | |
| * Byte buffers are mutable and expandable, and provide a variety of primitives | |
| * for writing to them. At any time you can fetch a bytes object containing the | |
| * current contents of the buffer. The bytes object should not be stored between | |
| * operations, as it may change due to resizing of the buffer. | |
| */ | |
| library BufferChainlink { | |
| /** | |
| * @dev Represents a mutable buffer. Buffers have a current value (buf) and | |
| * a capacity. The capacity may be longer than the current value, in | |
| * which case it can be extended without the need to allocate more memory. | |
| */ | |
| struct buffer { | |
| bytes buf; | |
| uint capacity; | |
| } | |
| /** | |
| * @dev Initializes a buffer with an initial capacity. | |
| * @param buf The buffer to initialize. | |
| * @param capacity The number of bytes of space to allocate the buffer. | |
| * @return The buffer, for chaining. | |
| */ | |
| function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) { | |
| if (capacity % 32 != 0) { | |
| capacity += 32 - (capacity % 32); | |
| } | |
| // Allocate space for the buffer data | |
| buf.capacity = capacity; | |
| assembly { | |
| let ptr := mload(0x40) | |
| mstore(buf, ptr) | |
| mstore(ptr, 0) | |
| mstore(0x40, add(32, add(ptr, capacity))) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Initializes a new buffer from an existing bytes object. | |
| * Changes to the buffer may mutate the original value. | |
| * @param b The bytes object to initialize the buffer with. | |
| * @return A new buffer. | |
| */ | |
| function fromBytes(bytes memory b) internal pure returns(buffer memory) { | |
| buffer memory buf; | |
| buf.buf = b; | |
| buf.capacity = b.length; | |
| return buf; | |
| } | |
| function resize(buffer memory buf, uint capacity) private pure { | |
| bytes memory oldbuf = buf.buf; | |
| init(buf, capacity); | |
| append(buf, oldbuf); | |
| } | |
| function max(uint a, uint b) private pure returns(uint) { | |
| if (a > b) { | |
| return a; | |
| } | |
| return b; | |
| } | |
| /** | |
| * @dev Sets buffer length to 0. | |
| * @param buf The buffer to truncate. | |
| * @return The original buffer, for chaining.. | |
| */ | |
| function truncate(buffer memory buf) internal pure returns (buffer memory) { | |
| assembly { | |
| let bufptr := mload(buf) | |
| mstore(bufptr, 0) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The start offset to write to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) { | |
| require(len <= data.length); | |
| if (off + len > buf.capacity) { | |
| resize(buf, max(buf.capacity, len + off) * 2); | |
| } | |
| uint dest; | |
| uint src; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Start address = buffer address + offset + sizeof(buffer length) | |
| dest := add(add(bufptr, 32), off) | |
| // Update buffer length if we're extending it | |
| if gt(add(len, off), buflen) { | |
| mstore(bufptr, add(len, off)) | |
| } | |
| src := add(data, 32) | |
| } | |
| // Copy word-length chunks while possible | |
| for (; len >= 32; len -= 32) { | |
| assembly { | |
| mstore(dest, mload(src)) | |
| } | |
| dest += 32; | |
| src += 32; | |
| } | |
| // Copy remaining bytes | |
| uint mask = 256 ** (32 - len) - 1; | |
| assembly { | |
| let srcpart := and(mload(src), not(mask)) | |
| let destpart := and(mload(dest), mask) | |
| mstore(dest, or(destpart, srcpart)) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, len); | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, data.length); | |
| } | |
| /** | |
| * @dev Writes a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write the byte at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) { | |
| if (off >= buf.capacity) { | |
| resize(buf, buf.capacity * 2); | |
| } | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Address = buffer address + sizeof(buffer length) + off | |
| let dest := add(add(bufptr, off), 32) | |
| mstore8(dest, data) | |
| // Update buffer length if we extended it | |
| if eq(off, buflen) { | |
| mstore(bufptr, add(buflen, 1)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) { | |
| return writeUint8(buf, buf.buf.length, data); | |
| } | |
| /** | |
| * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (left-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| // Right-align data | |
| data = data >> (8 * (32 - len)); | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + sizeof(buffer length) + off + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, off, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chhaining. | |
| */ | |
| function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, 32); | |
| } | |
| /** | |
| * @dev Writes an integer to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (right-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + off + sizeof(buffer length) + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the end of the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer. | |
| */ | |
| function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) { | |
| return writeInt(buf, buf.buf.length, data, len); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >= 0.4.19; | |
| import { BufferChainlink } from "./BufferChainlink.sol"; | |
| library CBORChainlink { | |
| using BufferChainlink for BufferChainlink.buffer; | |
| uint8 private constant MAJOR_TYPE_INT = 0; | |
| uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1; | |
| uint8 private constant MAJOR_TYPE_BYTES = 2; | |
| uint8 private constant MAJOR_TYPE_STRING = 3; | |
| uint8 private constant MAJOR_TYPE_ARRAY = 4; | |
| uint8 private constant MAJOR_TYPE_MAP = 5; | |
| uint8 private constant MAJOR_TYPE_TAG = 6; | |
| uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7; | |
| uint8 private constant TAG_TYPE_BIGNUM = 2; | |
| uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3; | |
| function encodeType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major, | |
| uint value | |
| ) | |
| private | |
| pure | |
| { | |
| if(value <= 23) { | |
| buf.appendUint8(uint8((major << 5) | value)); | |
| } else if(value <= 0xFF) { | |
| buf.appendUint8(uint8((major << 5) | 24)); | |
| buf.appendInt(value, 1); | |
| } else if(value <= 0xFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 25)); | |
| buf.appendInt(value, 2); | |
| } else if(value <= 0xFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 26)); | |
| buf.appendInt(value, 4); | |
| } else if(value <= 0xFFFFFFFFFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 27)); | |
| buf.appendInt(value, 8); | |
| } | |
| } | |
| function encodeIndefiniteLengthType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major | |
| ) | |
| private | |
| pure | |
| { | |
| buf.appendUint8(uint8((major << 5) | 31)); | |
| } | |
| function encodeUInt( | |
| BufferChainlink.buffer memory buf, | |
| uint value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_INT, value); | |
| } | |
| function encodeInt( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| if(value < -0x10000000000000000) { | |
| encodeSignedBigNum(buf, value); | |
| } else if(value > 0xFFFFFFFFFFFFFFFF) { | |
| encodeBigNum(buf, value); | |
| } else if(value >= 0) { | |
| encodeType(buf, MAJOR_TYPE_INT, uint(value)); | |
| } else { | |
| encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value)); | |
| } | |
| } | |
| function encodeBytes( | |
| BufferChainlink.buffer memory buf, | |
| bytes memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_BYTES, value.length); | |
| buf.append(value); | |
| } | |
| function encodeBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(value))); | |
| } | |
| function encodeSignedBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int input | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(-1 - input))); | |
| } | |
| function encodeString( | |
| BufferChainlink.buffer memory buf, | |
| string memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length); | |
| buf.append(bytes(value)); | |
| } | |
| function startArray( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); | |
| } | |
| function startMap( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); | |
| } | |
| function endSequence( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| abstract contract ENSResolver { | |
| function addr(bytes32 node) public view virtual returns (address); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REMIX EXAMPLE PROJECT | |
| Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
| It contains 3 directories: | |
| 1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
| 2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
| 3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
| SCRIPTS | |
| The 'scripts' folder contains example async/await scripts for deploying the 'Storage' contract. | |
| For the deployment of any other contract, 'contractName' and 'constructorArgs' should be updated (along with other code if required). | |
| Scripts have full access to the web3.js and ethers.js libraries. | |
| To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled. | |
| Output from script will appear in remix terminal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "6080604052600160045534801561001557600080fd5b506100246100b460201b60201c565b732f90a6d021db21e1b2a077c5a37b3c7e75d15b7e600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f323966613961613133626631343638373838623763633461353030613435623860088190555067016345785d8a000060098190555061019d565b61015773c89bd4e1632d3a43cb03aaad5262cbe4038bc57173ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff1660e01b815260040160206040518083038186803b15801561011157600080fd5b505afa158015610125573d6000803e3d6000fd5b505050506040513d602081101561013b57600080fd5b810190808051906020019092919050505061015960201b60201c565b565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611171806101ac6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634357855e146100515780636021abac146100895780638dc654a2146100a7578063c618a1e4146100b1575b600080fd5b6100876004803603604081101561006757600080fd5b8101908080359060200190929190803590602001909291905050506100cf565b005b6100916101f6565b6040518082815260200191505060405180910390f35b6100af610384565b005b6100b9610552565b6040518082815260200191505060405180910390f35b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806110cb6028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600681905550505050565b6000610200611020565b61021460085430634357855e60e01b610558565b90506102786040518060400160405280600381526020017f67657400000000000000000000000000000000000000000000000000000000008152506040518060800160405280604981526020016110f360499139836105899092919063ffffffff16565b6102f76040518060400160405280600481526020017f70617468000000000000000000000000000000000000000000000000000000008152506040518060400160405280601881526020017f5241572e4554482e5553442e564f4c554d453234484f55520000000000000000815250836105899092919063ffffffff16565b6000670de0b6b3a7640000905061034e6040518060400160405280600581526020017f74696d657300000000000000000000000000000000000000000000000000000081525082846105bc9092919063ffffffff16565b61037d600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836009546105ef565b9250505090565b600061038e610878565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561041457600080fd5b505afa158015610428573d6000803e3d6000fd5b505050506040513d602081101561043e57600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104a257600080fd5b505af11580156104b6573d6000803e3d6000fd5b505050506040513d60208110156104cc57600080fd5b810190808051906020019092919050505061054f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f556e61626c6520746f207472616e73666572000000000000000000000000000081525060200191505060405180910390fd5b50565b60065481565b610560611020565b610568611020565b61057f858585846108a2909392919063ffffffff16565b9150509392505050565b6105a082846080015161095290919063ffffffff16565b6105b781846080015161095290919063ffffffff16565b505050565b6105d382846080015161095290919063ffffffff16565b6105ea81846080015161097790919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea0858461071187610a1b565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610782578082015181840152602081019050610767565b50505050905090810190601f1680156107af5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156107d057600080fd5b505af11580156107e4573d6000803e3d6000fd5b505050506040513d60208110156107fa57600080fd5b8101908080519060200190929190505050610860576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806110a86023913960400191505060405180910390fd5b60016004600082825401925050819055509392505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108aa611020565b6108ba8560800151610100610b9c565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b61095f8260038351610bf0565b6109728183610d3590919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008112156109ae576109a98282610d57565b610a17565b67ffffffffffffffff8113156109cd576109c88282610dc5565b610a16565b600081126109e6576109e182600083610bf0565b610a15565b610a14826001837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03610bf0565b5b5b5b5050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610aff578082015181840152602081019050610ae4565b50505050905090810190601f168015610b2c5780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b610ba461108d565b600060208381610bb057fe5b0614610bc95760208281610bc057fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b60178111610c1d57610c178160058460ff16901b60ff161784610e1190919063ffffffff16565b50610d30565b60ff8111610c5f57610c42601860058460ff16901b1784610e1190919063ffffffff16565b50610c5981600185610e319092919063ffffffff16565b50610d2f565b61ffff8111610ca257610c85601960058460ff16901b1784610e1190919063ffffffff16565b50610c9c81600285610e319092919063ffffffff16565b50610d2e565b63ffffffff8111610ce757610cca601a60058460ff16901b1784610e1190919063ffffffff16565b50610ce181600485610e319092919063ffffffff16565b50610d2d565b67ffffffffffffffff8111610d2c57610d13601b60058460ff16901b1784610e1190919063ffffffff16565b50610d2a81600885610e319092919063ffffffff16565b505b5b5b5b5b505050565b610d3d61108d565b610d4f83846000015151848551610e53565b905092915050565b610d7560036005600660ff16901b1783610e1190919063ffffffff16565b50610dc182827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0360405160200180828152602001915050604051602081830303815290604052610f0c565b5050565b610de360026005600660ff16901b1783610e1190919063ffffffff16565b50610e0d828260405160200180828152602001915050604051602081830303815290604052610f0c565b5050565b610e1961108d565b610e298384600001515184610f31565b905092915050565b610e3961108d565b610e4a848560000151518585610f7f565b90509392505050565b610e5b61108d565b8251821115610e6957600080fd5b84602001518285011115610e9457610e93856002610e8d8860200151888701610fe0565b02610ffc565b5b600080865180518760208301019350808887011115610eb35787860182525b60208701925050505b60208410610edf5780518252602082019150602081019050602084039350610ebc565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610f198260028351610bf0565b610f2c8183610d3590919063ffffffff16565b505050565b610f3961108d565b83602001518310610f5657610f55846002866020015102610ffc565b5b8351805160208583010184815381861415610f72576001820183525b5050508390509392505050565b610f8761108d565b84602001518483011115610fa557610fa485600286850102610ffc565b5b60006001836101000a0390508551838682010185831982511617815281518588011115610fd25784870182525b505085915050949350505050565b600081831115610ff257829050610ff6565b8190505b92915050565b60608260000151905061100f8383610b9c565b5061101a8382610d35565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815260200161108761108d565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f6620746865207265717565737468747470733a2f2f6d696e2d6170692e63727970746f636f6d706172652e636f6d2f646174612f70726963656d756c746966756c6c3f6673796d733d455448267473796d733d555344a264697066735822122083ab8c879f4be1afe6d12cf13c2b06377729732dbccf5b1f2d49824c03cab28464736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x24 PUSH2 0xB4 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH20 0x2F90A6D021DB21E1B2A077C5A37B3C7E75D15B7E PUSH1 0x7 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH32 0x3239666139616131336266313436383738386237636334613530306134356238 PUSH1 0x8 DUP2 SWAP1 SSTORE POP PUSH8 0x16345785D8A0000 PUSH1 0x9 DUP2 SWAP1 SSTORE POP PUSH2 0x19D JUMP JUMPDEST PUSH2 0x157 PUSH20 0xC89BD4E1632D3A43CB03AAAD5262CBE4038BC571 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x38CC4831 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x111 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x125 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x13B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x159 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST JUMP JUMPDEST DUP1 PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH2 0x1171 DUP1 PUSH2 0x1AC PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4357855E EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x6021ABAC EQ PUSH2 0x89 JUMPI DUP1 PUSH4 0x8DC654A2 EQ PUSH2 0xA7 JUMPI DUP1 PUSH4 0xC618A1E4 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x87 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0xCF JUMP JUMPDEST STOP JUMPDEST PUSH2 0x91 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAF PUSH2 0x384 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB9 PUSH2 0x552 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x187 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x10CB PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x6 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x214 PUSH1 0x8 SLOAD ADDRESS PUSH4 0x4357855E PUSH1 0xE0 SHL PUSH2 0x558 JUMP JUMPDEST SWAP1 POP PUSH2 0x278 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6765740000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10F3 PUSH1 0x49 SWAP2 CODECOPY DUP4 PUSH2 0x589 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x2F7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7061746800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x18 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5241572E4554482E5553442E564F4C554D453234484F55520000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x589 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 SWAP1 POP PUSH2 0x34E PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x74696D6573000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP3 DUP5 PUSH2 0x5BC SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37D PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x9 SLOAD PUSH2 0x5EF JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38E PUSH2 0x878 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA9059CBB CALLER DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x414 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x428 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x43E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4B6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x54F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH32 0x556E61626C6520746F207472616E736665720000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x560 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x568 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x57F DUP6 DUP6 DUP6 DUP5 PUSH2 0x8A2 SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5A0 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5B7 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x5D3 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5EA DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x977 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x711 DUP8 PUSH2 0xA1B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x782 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x767 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7AF JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x7D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x7E4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x860 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x10A8 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x8AA PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x8BA DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0xB9C JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x95F DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0x972 DUP2 DUP4 PUSH2 0xD35 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 DUP2 SLT ISZERO PUSH2 0x9AE JUMPI PUSH2 0x9A9 DUP3 DUP3 PUSH2 0xD57 JUMP JUMPDEST PUSH2 0xA17 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 SGT ISZERO PUSH2 0x9CD JUMPI PUSH2 0x9C8 DUP3 DUP3 PUSH2 0xDC5 JUMP JUMPDEST PUSH2 0xA16 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT PUSH2 0x9E6 JUMPI PUSH2 0x9E1 DUP3 PUSH1 0x0 DUP4 PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0xA15 JUMP JUMPDEST PUSH2 0xA14 DUP3 PUSH1 0x1 DUP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH2 0xBF0 JUMP JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xAFF JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xAE4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xB2C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xBA4 PUSH2 0x108D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0xBB0 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0xBC9 JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0xBC0 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0xC1D JUMPI PUSH2 0xC17 DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD30 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0xC5F JUMPI PUSH2 0xC42 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xC59 DUP2 PUSH1 0x1 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2F JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0xCA2 JUMPI PUSH2 0xC85 PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xC9C DUP2 PUSH1 0x2 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2E JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xCE7 JUMPI PUSH2 0xCCA PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xCE1 DUP2 PUSH1 0x4 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2D JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0xD2C JUMPI PUSH2 0xD13 PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2A DUP2 PUSH1 0x8 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xD3D PUSH2 0x108D JUMP JUMPDEST PUSH2 0xD4F DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xE53 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD75 PUSH1 0x3 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDC1 DUP3 DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xF0C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDE3 PUSH1 0x2 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xE0D DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xF0C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xE19 PUSH2 0x108D JUMP JUMPDEST PUSH2 0xE29 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xF31 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xE39 PUSH2 0x108D JUMP JUMPDEST PUSH2 0xE4A DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xF7F JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xE5B PUSH2 0x108D JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xE69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xE94 JUMPI PUSH2 0xE93 DUP6 PUSH1 0x2 PUSH2 0xE8D DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0xFE0 JUMP JUMPDEST MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xEB3 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xEDF JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xEBC JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xF19 DUP3 PUSH1 0x2 DUP4 MLOAD PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0xF2C DUP2 DUP4 PUSH2 0xD35 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xF39 PUSH2 0x108D JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xF56 JUMPI PUSH2 0xF55 DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0xF72 JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xF87 PUSH2 0x108D JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xFA5 JUMPI PUSH2 0xFA4 DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0xFD2 JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xFF2 JUMPI DUP3 SWAP1 POP PUSH2 0xFF6 JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0x100F DUP4 DUP4 PUSH2 0xB9C JUMP JUMPDEST POP PUSH2 0x101A DUP4 DUP3 PUSH2 0xD35 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1087 PUSH2 0x108D JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374687474 PUSH17 0x733A2F2F6D696E2D6170692E6372797074 PUSH16 0x636F6D706172652E636F6D2F64617461 0x2F PUSH17 0x726963656D756C746966756C6C3F667379 PUSH14 0x733D455448267473796D733D5553 DIFFICULTY LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP4 0xAB DUP13 DUP8 SWAP16 0x4B 0xE1 0xAF 0xE6 0xD1 0x2C CALL EXTCODECOPY 0x2B MOD CALLDATACOPY PUSH24 0x29732DBCCF5B1F2D49824C03CAB28464736F6C634300060C STOP CALLER ", | |
| "sourceMap": "29631:3277:0:-:0;;;21493:1;21462:32;;29970:218;;;;;;;;;;30001:25;:23;;;:25;;:::i;:::-;30045:42;30036:6;;:51;;;;;;;;;;;;;;;;;;30097:42;:5;:42;;;;30155:14;30149:3;:20;;;;29631:3277;;25381:123;25431:68;21281:42;25449:47;;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25431:17;;;:68;;:::i;:::-;25381:123::o;25164:94::-;25247:5;25221:4;;:32;;;;;;;;;;;;;;;;;;25164:94;:::o;29631:3277::-;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "608060405234801561001057600080fd5b506004361061004c5760003560e01c80634357855e146100515780636021abac146100895780638dc654a2146100a7578063c618a1e4146100b1575b600080fd5b6100876004803603604081101561006757600080fd5b8101908080359060200190929190803590602001909291905050506100cf565b005b6100916101f6565b6040518082815260200191505060405180910390f35b6100af610384565b005b6100b9610552565b6040518082815260200191505060405180910390f35b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806110cb6028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600681905550505050565b6000610200611020565b61021460085430634357855e60e01b610558565b90506102786040518060400160405280600381526020017f67657400000000000000000000000000000000000000000000000000000000008152506040518060800160405280604981526020016110f360499139836105899092919063ffffffff16565b6102f76040518060400160405280600481526020017f70617468000000000000000000000000000000000000000000000000000000008152506040518060400160405280601881526020017f5241572e4554482e5553442e564f4c554d453234484f55520000000000000000815250836105899092919063ffffffff16565b6000670de0b6b3a7640000905061034e6040518060400160405280600581526020017f74696d657300000000000000000000000000000000000000000000000000000081525082846105bc9092919063ffffffff16565b61037d600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836009546105ef565b9250505090565b600061038e610878565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561041457600080fd5b505afa158015610428573d6000803e3d6000fd5b505050506040513d602081101561043e57600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104a257600080fd5b505af11580156104b6573d6000803e3d6000fd5b505050506040513d60208110156104cc57600080fd5b810190808051906020019092919050505061054f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f556e61626c6520746f207472616e73666572000000000000000000000000000081525060200191505060405180910390fd5b50565b60065481565b610560611020565b610568611020565b61057f858585846108a2909392919063ffffffff16565b9150509392505050565b6105a082846080015161095290919063ffffffff16565b6105b781846080015161095290919063ffffffff16565b505050565b6105d382846080015161095290919063ffffffff16565b6105ea81846080015161097790919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea0858461071187610a1b565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610782578082015181840152602081019050610767565b50505050905090810190601f1680156107af5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156107d057600080fd5b505af11580156107e4573d6000803e3d6000fd5b505050506040513d60208110156107fa57600080fd5b8101908080519060200190929190505050610860576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806110a86023913960400191505060405180910390fd5b60016004600082825401925050819055509392505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108aa611020565b6108ba8560800151610100610b9c565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b61095f8260038351610bf0565b6109728183610d3590919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008112156109ae576109a98282610d57565b610a17565b67ffffffffffffffff8113156109cd576109c88282610dc5565b610a16565b600081126109e6576109e182600083610bf0565b610a15565b610a14826001837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03610bf0565b5b5b5b5050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610aff578082015181840152602081019050610ae4565b50505050905090810190601f168015610b2c5780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b610ba461108d565b600060208381610bb057fe5b0614610bc95760208281610bc057fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b60178111610c1d57610c178160058460ff16901b60ff161784610e1190919063ffffffff16565b50610d30565b60ff8111610c5f57610c42601860058460ff16901b1784610e1190919063ffffffff16565b50610c5981600185610e319092919063ffffffff16565b50610d2f565b61ffff8111610ca257610c85601960058460ff16901b1784610e1190919063ffffffff16565b50610c9c81600285610e319092919063ffffffff16565b50610d2e565b63ffffffff8111610ce757610cca601a60058460ff16901b1784610e1190919063ffffffff16565b50610ce181600485610e319092919063ffffffff16565b50610d2d565b67ffffffffffffffff8111610d2c57610d13601b60058460ff16901b1784610e1190919063ffffffff16565b50610d2a81600885610e319092919063ffffffff16565b505b5b5b5b5b505050565b610d3d61108d565b610d4f83846000015151848551610e53565b905092915050565b610d7560036005600660ff16901b1783610e1190919063ffffffff16565b50610dc182827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0360405160200180828152602001915050604051602081830303815290604052610f0c565b5050565b610de360026005600660ff16901b1783610e1190919063ffffffff16565b50610e0d828260405160200180828152602001915050604051602081830303815290604052610f0c565b5050565b610e1961108d565b610e298384600001515184610f31565b905092915050565b610e3961108d565b610e4a848560000151518585610f7f565b90509392505050565b610e5b61108d565b8251821115610e6957600080fd5b84602001518285011115610e9457610e93856002610e8d8860200151888701610fe0565b02610ffc565b5b600080865180518760208301019350808887011115610eb35787860182525b60208701925050505b60208410610edf5780518252602082019150602081019050602084039350610ebc565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610f198260028351610bf0565b610f2c8183610d3590919063ffffffff16565b505050565b610f3961108d565b83602001518310610f5657610f55846002866020015102610ffc565b5b8351805160208583010184815381861415610f72576001820183525b5050508390509392505050565b610f8761108d565b84602001518483011115610fa557610fa485600286850102610ffc565b5b60006001836101000a0390508551838682010185831982511617815281518588011115610fd25784870182525b505085915050949350505050565b600081831115610ff257829050610ff6565b8190505b92915050565b60608260000151905061100f8383610b9c565b5061101a8382610d35565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815260200161108761108d565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f6620746865207265717565737468747470733a2f2f6d696e2d6170692e63727970746f636f6d706172652e636f6d2f646174612f70726963656d756c746966756c6c3f6673796d733d455448267473796d733d555344a264697066735822122083ab8c879f4be1afe6d12cf13c2b06377729732dbccf5b1f2d49824c03cab28464736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4357855E EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x6021ABAC EQ PUSH2 0x89 JUMPI DUP1 PUSH4 0x8DC654A2 EQ PUSH2 0xA7 JUMPI DUP1 PUSH4 0xC618A1E4 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x87 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0xCF JUMP JUMPDEST STOP JUMPDEST PUSH2 0x91 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAF PUSH2 0x384 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB9 PUSH2 0x552 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x187 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x10CB PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x6 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x214 PUSH1 0x8 SLOAD ADDRESS PUSH4 0x4357855E PUSH1 0xE0 SHL PUSH2 0x558 JUMP JUMPDEST SWAP1 POP PUSH2 0x278 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6765740000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10F3 PUSH1 0x49 SWAP2 CODECOPY DUP4 PUSH2 0x589 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x2F7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7061746800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x18 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5241572E4554482E5553442E564F4C554D453234484F55520000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x589 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 SWAP1 POP PUSH2 0x34E PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x74696D6573000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP3 DUP5 PUSH2 0x5BC SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37D PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x9 SLOAD PUSH2 0x5EF JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38E PUSH2 0x878 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA9059CBB CALLER DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x414 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x428 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x43E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4B6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x54F JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH32 0x556E61626C6520746F207472616E736665720000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x560 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x568 PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x57F DUP6 DUP6 DUP6 DUP5 PUSH2 0x8A2 SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5A0 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5B7 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x5D3 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x952 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5EA DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x977 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x711 DUP8 PUSH2 0xA1B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x782 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x767 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7AF JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x7D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x7E4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x860 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x10A8 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x8AA PUSH2 0x1020 JUMP JUMPDEST PUSH2 0x8BA DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0xB9C JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x95F DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0x972 DUP2 DUP4 PUSH2 0xD35 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 DUP2 SLT ISZERO PUSH2 0x9AE JUMPI PUSH2 0x9A9 DUP3 DUP3 PUSH2 0xD57 JUMP JUMPDEST PUSH2 0xA17 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 SGT ISZERO PUSH2 0x9CD JUMPI PUSH2 0x9C8 DUP3 DUP3 PUSH2 0xDC5 JUMP JUMPDEST PUSH2 0xA16 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT PUSH2 0x9E6 JUMPI PUSH2 0x9E1 DUP3 PUSH1 0x0 DUP4 PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0xA15 JUMP JUMPDEST PUSH2 0xA14 DUP3 PUSH1 0x1 DUP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH2 0xBF0 JUMP JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xAFF JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xAE4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xB2C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xBA4 PUSH2 0x108D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0xBB0 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0xBC9 JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0xBC0 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0xC1D JUMPI PUSH2 0xC17 DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD30 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0xC5F JUMPI PUSH2 0xC42 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xC59 DUP2 PUSH1 0x1 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2F JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0xCA2 JUMPI PUSH2 0xC85 PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xC9C DUP2 PUSH1 0x2 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2E JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xCE7 JUMPI PUSH2 0xCCA PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xCE1 DUP2 PUSH1 0x4 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2D JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0xD2C JUMPI PUSH2 0xD13 PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD2A DUP2 PUSH1 0x8 DUP6 PUSH2 0xE31 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xD3D PUSH2 0x108D JUMP JUMPDEST PUSH2 0xD4F DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xE53 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD75 PUSH1 0x3 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDC1 DUP3 DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xF0C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDE3 PUSH1 0x2 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xE11 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xE0D DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xF0C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xE19 PUSH2 0x108D JUMP JUMPDEST PUSH2 0xE29 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xF31 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xE39 PUSH2 0x108D JUMP JUMPDEST PUSH2 0xE4A DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xF7F JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xE5B PUSH2 0x108D JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xE69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xE94 JUMPI PUSH2 0xE93 DUP6 PUSH1 0x2 PUSH2 0xE8D DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0xFE0 JUMP JUMPDEST MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xEB3 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xEDF JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xEBC JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xF19 DUP3 PUSH1 0x2 DUP4 MLOAD PUSH2 0xBF0 JUMP JUMPDEST PUSH2 0xF2C DUP2 DUP4 PUSH2 0xD35 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xF39 PUSH2 0x108D JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xF56 JUMPI PUSH2 0xF55 DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0xF72 JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xF87 PUSH2 0x108D JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xFA5 JUMPI PUSH2 0xFA4 DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0xFFC JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0xFD2 JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xFF2 JUMPI DUP3 SWAP1 POP PUSH2 0xFF6 JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0x100F DUP4 DUP4 PUSH2 0xB9C JUMP JUMPDEST POP PUSH2 0x101A DUP4 DUP3 PUSH2 0xD35 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1087 PUSH2 0x108D JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374687474 PUSH17 0x733A2F2F6D696E2D6170692E6372797074 PUSH16 0x636F6D706172652E636F6D2F64617461 0x2F PUSH17 0x726963656D756C746966756C6C3F667379 PUSH14 0x733D455448267473796D733D5553 DIFFICULTY LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP4 0xAB DUP13 DUP8 SWAP16 0x4B 0xE1 0xAF 0xE6 0xD1 0x2C CALL EXTCODECOPY 0x2B MOD CALLDATACOPY PUSH24 0x29732DBCCF5B1F2D49824C03CAB28464736F6C634300060C STOP CALLER ", | |
| "sourceMap": "29631:3277:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32336:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;31182:1076;;;:::i;:::-;;;;;;;;;;;;;;;;;;;32675:231;;;:::i;:::-;;29680:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;32336:137;32424:10;29033:15;:27;29049:10;29033:27;;;;;;;;;;;;;;;;;;;;;29019:41;;:10;:41;;;29011:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29130:15;:27;29146:10;29130:27;;;;;;;;;;;;29123:34;;;;;;;;;;;29187:10;29168:30;;;;;;;;;;32459:7:::1;32450:6;:16;;;;32336:137:::0;;;:::o;31182:1076::-;31227:17;31261:32;;:::i;:::-;31296:66;31318:5;;31333:4;31340:21;;;31296;:66::i;:::-;31261:101;;31434:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;:11;;:95;;;;;:::i;:::-;31943:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;:11;;:47;;;;;:::i;:::-;32082:15;32100:6;32082:24;;32116:36;;;;;;;;;;;;;;;;;;32140:11;32116:7;:14;;:36;;;;;:::i;:::-;32207:44;32230:6;;;;;;;;;;;32238:7;32247:3;;32207:22;:44::i;:::-;32200:51;;;;31182:1076;:::o;32675:231::-;32718:28;32768:23;:21;:23::i;:::-;32718:74;;32810:9;:18;;;32829:10;32841:9;:19;;;32869:4;32841:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32810:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32802:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32675:231;:::o;29680:21::-;;;;:::o;22097:295::-;22245:24;;:::i;:::-;22277:28;;:::i;:::-;22318:69;22333:7;22342:16;22360:26;22318:3;:14;;:69;;;;;;:::i;:::-;22311:76;;;22097:295;;;;;:::o;18708:169::-;18810:27;18832:4;18810;:8;;;:21;;:27;;;;:::i;:::-;18843:29;18865:6;18843:4;:8;;;:21;;:29;;;;:::i;:::-;18708:169;;;:::o;19461:162::-;19559:27;19581:4;19559;:8;;;:21;;:27;;;;:::i;:::-;19592:26;19611:6;19592:4;:8;;;:18;;:26;;;;:::i;:::-;19461:162;;;:::o;23402:488::-;23526:17;23592:4;23598:12;;23575:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23565:47;;;;;;23553:59;;23631:12;;23618:4;:10;;:25;;;;;23678:7;23649:15;:26;23665:9;23649:26;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;23715:9;23696:29;;;;;;;;;;23739:4;;;;;;;;;;;:20;;;23760:7;23769:8;23779:19;23793:4;23779:13;:19::i;:::-;23739:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23731:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23861:1;23845:12;;:17;;;;;;;;;;;23402:488;;;;;:::o;25623:110::-;25691:7;25723:4;;;;;;;;;;;25708:20;;25623:110;:::o;17718:365::-;17867:24;;:::i;:::-;17899:49;17920:4;:8;;;17085:3;17899:20;:49::i;:::-;;17964:3;17954:4;:7;;:13;;;;;17996:16;17973:4;:20;;:39;;;;;;;;;;;18044:17;18018:4;:23;;:43;;;;;;;;;;;;;18074:4;18067:11;;17718:365;;;;;;:::o;16088:210::-;16208:55;16219:3;13681:1;16249:5;16243:19;16208:10;:55::i;:::-;16269:24;16286:5;16269:3;:10;;:24;;;;:::i;:::-;;16088:210;;:::o;14985:424::-;15103:20;15095:5;:28;15092:313;;;15133:30;15152:3;15157:5;15133:18;:30::i;:::-;15092:313;;;15187:18;15179:5;:26;15176:229;;;15215:24;15228:3;15233:5;15215:12;:24::i;:::-;15176:229;;;15264:1;15255:5;:10;15252:153;;15275:44;15286:3;13532:1;15312:5;15275:10;:44::i;:::-;15252:153;;;15340:58;15351:3;13586:1;15391:5;15386:2;:10;15340;:58::i;:::-;15252:153;15176:229;15092:313;14985:424;;:::o;27854:527::-;27942:12;28001:29;;;21049:1;20993;28251:4;:7;;;28266:4;:20;;;28294:4;:23;;;28325:4;:10;;;21095:1;28363:4;:8;;;:12;;;27971:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27964:412;;27854:527;;;:::o;4538:395::-;4608:13;;:::i;:::-;4650:1;4644:2;4633:8;:13;;;;;;:18;4629:71;;4690:2;4679:8;:13;;;;;;4673:2;:20;4661:32;;;;4629:71;4762:8;4747:3;:12;;:23;;;;;4810:4;4804:11;4834:3;4829;4822:16;4857:1;4852:3;4845:14;4896:8;4891:3;4887:18;4883:2;4879:27;4873:4;4866:41;4785:128;4925:3;4918:10;;4538:395;;;;:::o;13980:670::-;14117:2;14108:5;:11;14105:541;;14129:44;14166:5;14161:1;14152:5;:10;;;;14151:20;;;14129:3;:15;;:44;;;;:::i;:::-;;14105:541;;;14198:4;14189:5;:13;14186:460;;14212:41;14249:2;14244:1;14235:5;:10;;;;14234:17;14212:3;:15;;:41;;;;:::i;:::-;;14261:23;14275:5;14282:1;14261:3;:13;;:23;;;;;:::i;:::-;;14186:460;;;14309:6;14300:5;:15;14297:349;;14325:41;14362:2;14357:1;14348:5;:10;;;;14347:17;14325:3;:15;;:41;;;;:::i;:::-;;14374:23;14388:5;14395:1;14374:3;:13;;:23;;;;;:::i;:::-;;14297:349;;;14422:10;14413:5;:19;14410:236;;14442:41;14479:2;14474:1;14465:5;:10;;;;14464:17;14442:3;:15;;:41;;;;:::i;:::-;;14491:23;14505:5;14512:1;14491:3;:13;;:23;;;;;:::i;:::-;;14410:236;;;14539:18;14530:5;:27;14527:119;;14567:41;14604:2;14599:1;14590:5;:10;;;;14589:17;14567:3;:15;;:41;;;;:::i;:::-;;14616:23;14630:5;14637:1;14616:3;:13;;:23;;;;;:::i;:::-;;14527:119;14410:236;14297:349;14186:460;14105:541;13980:670;;;:::o;8092:155::-;8169:13;;:::i;:::-;8197:45;8203:3;8208;:7;;;:14;8224:4;8230;:11;8197:5;:45::i;:::-;8190:52;;8092:155;;;;:::o;15839:245::-;15955:72;13974:1;15996;13818;15978:19;;;;15977:48;15955:3;:15;;:72;;;;:::i;:::-;;16033:46;16045:3;16071:5;16066:2;:10;16050:28;;;;;;;;;;;;;;;;;;;;;;;;;16033:11;:46::i;:::-;15839:245;;:::o;15610:225::-;15720:63;13919:1;15761;13818;15743:19;;;;15742:39;15720:3;:15;;:63;;;;:::i;:::-;;15789:41;15801:3;15822:5;15806:23;;;;;;;;;;;;;;;;;;;;;;;;;15789:11;:41::i;:::-;15610:225;;:::o;9407:144::-;9481:13;;:::i;:::-;9509:37;9520:3;9525;:7;;;:14;9541:4;9509:10;:37::i;:::-;9502:44;;9407:144;;;;:::o;13099:154::-;13180:13;;:::i;:::-;13208:40;13217:3;13222;:7;;;:14;13238:4;13244:3;13208:8;:40::i;:::-;13201:47;;13099:154;;;;;:::o;6247:1140::-;6342:13;;:::i;:::-;6378:4;:11;6371:3;:18;;6363:27;;;;;;6413:3;:12;;;6407:3;6401;:9;:24;6397:90;;;6435:45;6442:3;6478:1;6447:28;6451:3;:12;;;6471:3;6465;:9;6447:3;:28::i;:::-;:32;6435:6;:45::i;:::-;6397:90;6493:9;6508:8;6602:3;6596:10;6673:6;6667:13;6789:3;6784:2;6776:6;6772:15;6768:25;6760:33;;6873:6;6867:3;6862;6858:13;6855:25;6852:2;;;6915:3;6910;6906:13;6898:6;6891:29;6852:2;6952;6946:4;6942:13;6935:20;;6531:430;;7013:129;7027:2;7020:3;:9;7013:129;;7088:3;7082:10;7076:4;7069:24;7116:2;7108:10;;;;7133:2;7126:9;;;;7038:2;7031:9;;;;7013:129;;;7176:9;7208:1;7201:3;7196:2;:8;7188:3;:17;:21;7176:33;;7267:4;7263:9;7257:3;7251:10;7247:26;7313:4;7306;7300:11;7296:22;7351:7;7341:8;7338:21;7332:4;7325:35;7224:142;;7379:3;7372:10;;;;;6247:1140;;;;;;:::o;15413:193::-;15531:47;15542:3;13633:1;15565:5;:12;15531:10;:47::i;:::-;15584:17;15595:5;15584:3;:10;;:17;;;;:::i;:::-;;15413:193;;:::o;8541:619::-;8624:13;;:::i;:::-;8656:3;:12;;;8649:3;:19;8645:69;;8678:29;8685:3;8705:1;8690:3;:12;;;:16;8678:6;:29::i;:::-;8645:69;8800:3;8794:10;8871:6;8865:13;8983:2;8977:3;8969:6;8965:16;8961:25;9007:4;9001;8993:19;9078:6;9073:3;9070:15;9067:2;;;9123:1;9115:6;9111:14;9103:6;9096:30;9067:2;8729:411;;;9152:3;9145:10;;8541:619;;;;;:::o;12206:642::-;12295:13;;:::i;:::-;12332:3;:12;;;12326:3;12320;:9;:24;12316:73;;;12354:28;12361:3;12380:1;12373:3;12367;:9;12366:15;12354:6;:28::i;:::-;12316:73;12395:9;12420:1;12414:3;12407;:10;:14;12395:26;;12507:3;12501:10;12622:3;12616;12608:6;12604:16;12600:26;12678:4;12670;12666:9;12659:4;12653:11;12649:27;12646:37;12640:4;12633:51;12766:6;12760:13;12754:3;12749;12745:13;12742:32;12739:2;;;12809:3;12804;12800:13;12792:6;12785:29;12739:2;12436:392;;12840:3;12833:10;;;12206:642;;;;;;:::o;5485:114::-;5535:4;5555:1;5551;:5;5547:34;;;5573:1;5566:8;;;;5547:34;5593:1;5586:8;;5485:114;;;;;:::o;5328:153::-;5397:19;5419:3;:7;;;5397:29;;5432:19;5437:3;5442:8;5432:4;:19::i;:::-;;5457;5464:3;5469:6;5457;:19::i;:::-;;5328:153;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "893000", | |
| "executionCost": "infinite", | |
| "totalCost": "infinite" | |
| }, | |
| "external": { | |
| "fulfill(bytes32,uint256)": "infinite", | |
| "requestVolumeData()": "infinite", | |
| "volume()": "1049", | |
| "withdrawLink()": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": { | |
| "fulfill(bytes32,uint256)": "4357855e", | |
| "requestVolumeData()": "6021abac", | |
| "volume()": "c618a1e4", | |
| "withdrawLink()": "8dc654a2" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_volume", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfill", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "requestVolumeData", | |
| "outputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "volume", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "withdrawLink", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_volume", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfill", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "requestVolumeData", | |
| "outputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "volume", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "withdrawLink", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": { | |
| "constructor": "Network: Kovan Chainlink - 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e Chainlink - 29fa9aa13bf1468788b7cc4a500a45b8 Fee: 0.1 LINK", | |
| "fulfill(bytes32,uint256)": { | |
| "notice": "Receive the response in the form of uint256" | |
| }, | |
| "requestVolumeData()": { | |
| "notice": "Create a Chainlink request to retrieve API response, find the target data, then multiply by 1000000000000000000 (to remove decimal places from data).************************************************************************************ STOP! * THIS FUNCTION WILL FAIL IF THIS CONTRACT DOES NOT OWN LINK * ---------------------------------------------------------- * Learn how to obtain testnet LINK and fund this contract: * ------- https://docs.chain.link/docs/acquire-link -------- * ---- https://docs.chain.link/docs/fund-your-contract ----- * ************************************************************************************" | |
| }, | |
| "withdrawLink()": { | |
| "notice": "Withdraw LINK from this contract NOTE: DO NOT USE THIS IN PRODUCTION AS IT CAN BE CALLED BY ANY ADDRESS. THIS IS PURELY FOR EXAMPLE PURPOSES ONLY." | |
| } | |
| }, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "APIConsumer" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1864accb04752f7c2308725d12c4c7a22ea69ece2c7b135bbcbb7e7eeb938f364736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CALL DUP7 0x4A 0xCC 0xB0 SELFBALANCE MSTORE 0xF7 0xC2 ADDRESS DUP8 0x25 0xD1 0x2C 0x4C PUSH27 0x22EA69ECE2C7B135BBCBB7E7EEB938F364736F6C634300060C0033 ", | |
| "sourceMap": "3990:9265:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1864accb04752f7c2308725d12c4c7a22ea69ece2c7b135bbcbb7e7eeb938f364736f6c634300060c0033", | |
| "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CALL DUP7 0x4A 0xCC 0xB0 SELFBALANCE MSTORE 0xF7 0xC2 ADDRESS DUP8 0x25 0xD1 0x2C 0x4C PUSH27 0x22EA69ECE2C7B135BBCBB7E7EEB938F364736F6C634300060C0033 ", | |
| "sourceMap": "3990:9265:0:-:0;;;;;;;;" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "17200", | |
| "executionCost": "97", | |
| "totalCost": "17297" | |
| }, | |
| "internal": { | |
| "append(struct BufferChainlink.buffer memory,bytes memory)": "infinite", | |
| "append(struct BufferChainlink.buffer memory,bytes memory,uint256)": "infinite", | |
| "appendBytes20(struct BufferChainlink.buffer memory,bytes20)": "infinite", | |
| "appendBytes32(struct BufferChainlink.buffer memory,bytes32)": "infinite", | |
| "appendInt(struct BufferChainlink.buffer memory,uint256,uint256)": "infinite", | |
| "appendUint8(struct BufferChainlink.buffer memory,uint8)": "infinite", | |
| "fromBytes(bytes memory)": "infinite", | |
| "init(struct BufferChainlink.buffer memory,uint256)": "infinite", | |
| "max(uint256,uint256)": "infinite", | |
| "resize(struct BufferChainlink.buffer memory,uint256)": "infinite", | |
| "truncate(struct BufferChainlink.buffer memory)": "infinite", | |
| "write(struct BufferChainlink.buffer memory,uint256,bytes memory,uint256)": "infinite", | |
| "write(struct BufferChainlink.buffer memory,uint256,bytes32,uint256)": "infinite", | |
| "writeBytes20(struct BufferChainlink.buffer memory,uint256,bytes20)": "infinite", | |
| "writeInt(struct BufferChainlink.buffer memory,uint256,uint256,uint256)": "infinite", | |
| "writeUint8(struct BufferChainlink.buffer memory,uint256,uint8)": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": {} | |
| }, | |
| "abi": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [], | |
| "devdoc": { | |
| "details": "A library for working with mutable byte buffers in Solidity. Byte buffers are mutable and expandable, and provide a variety of primitives for writing to them. At any time you can fetch a bytes object containing the current contents of the buffer. The bytes object should not be stored between operations, as it may change due to resizing of the buffer.", | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "BufferChainlink" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206e06fd6166a594d6486ed7519f87d8584b29fcc84410e0adfc0a6c8b0788cb5964736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x6FD6166A594D6486ED7519F87D858 0x4B 0x29 0xFC 0xC8 DIFFICULTY LT 0xE0 0xAD 0xFC EXP PUSH13 0x8B0788CB5964736F6C63430006 0xC STOP CALLER ", | |
| "sourceMap": "13413:3344:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206e06fd6166a594d6486ed7519f87d8584b29fcc84410e0adfc0a6c8b0788cb5964736f6c634300060c0033", | |
| "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x6FD6166A594D6486ED7519F87D858 0x4B 0x29 0xFC 0xC8 DIFFICULTY LT 0xE0 0xAD 0xFC EXP PUSH13 0x8B0788CB5964736F6C63430006 0xC STOP CALLER ", | |
| "sourceMap": "13413:3344:0:-:0;;;;;;;;" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "17200", | |
| "executionCost": "97", | |
| "totalCost": "17297" | |
| }, | |
| "internal": { | |
| "encodeBigNum(struct BufferChainlink.buffer memory,int256)": "infinite", | |
| "encodeBytes(struct BufferChainlink.buffer memory,bytes memory)": "infinite", | |
| "encodeIndefiniteLengthType(struct BufferChainlink.buffer memory,uint8)": "infinite", | |
| "encodeInt(struct BufferChainlink.buffer memory,int256)": "infinite", | |
| "encodeSignedBigNum(struct BufferChainlink.buffer memory,int256)": "infinite", | |
| "encodeString(struct BufferChainlink.buffer memory,string memory)": "infinite", | |
| "encodeType(struct BufferChainlink.buffer memory,uint8,uint256)": "infinite", | |
| "encodeUInt(struct BufferChainlink.buffer memory,uint256)": "infinite", | |
| "endSequence(struct BufferChainlink.buffer memory)": "infinite", | |
| "startArray(struct BufferChainlink.buffer memory)": "infinite", | |
| "startMap(struct BufferChainlink.buffer memory)": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": {} | |
| }, | |
| "abi": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "CBORChainlink" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122011d6d6dae28bdc0e2721e487944283ca018c8235795c3c4e78e5a85314824b9364736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 GT 0xD6 0xD6 0xDA 0xE2 DUP12 0xDC 0xE 0x27 0x21 0xE4 DUP8 SWAP5 TIMESTAMP DUP4 0xCA ADD DUP13 DUP3 CALLDATALOAD PUSH26 0x5C3C4E78E5A85314824B9364736F6C634300060C003300000000 ", | |
| "sourceMap": "17017:3506:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122011d6d6dae28bdc0e2721e487944283ca018c8235795c3c4e78e5a85314824b9364736f6c634300060c0033", | |
| "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 GT 0xD6 0xD6 0xDA 0xE2 DUP12 0xDC 0xE 0x27 0x21 0xE4 DUP8 SWAP5 TIMESTAMP DUP4 0xCA ADD DUP13 DUP3 CALLDATALOAD PUSH26 0x5C3C4E78E5A85314824B9364736F6C634300060C003300000000 ", | |
| "sourceMap": "17017:3506:0:-:0;;;;;;;;" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "17200", | |
| "executionCost": "97", | |
| "totalCost": "17297" | |
| }, | |
| "internal": { | |
| "add(struct Chainlink.Request memory,string memory,string memory)": "infinite", | |
| "addBytes(struct Chainlink.Request memory,string memory,bytes memory)": "infinite", | |
| "addInt(struct Chainlink.Request memory,string memory,int256)": "infinite", | |
| "addStringArray(struct Chainlink.Request memory,string memory,string memory[] memory)": "infinite", | |
| "addUint(struct Chainlink.Request memory,string memory,uint256)": "infinite", | |
| "initialize(struct Chainlink.Request memory,bytes32,address,bytes4)": "infinite", | |
| "setBuffer(struct Chainlink.Request memory,bytes memory)": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": {} | |
| }, | |
| "abi": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [], | |
| "devdoc": { | |
| "details": "Uses imported CBOR library for encoding to buffer", | |
| "kind": "dev", | |
| "methods": {}, | |
| "title": "Library for common Chainlink functions", | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "Chainlink" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "60806040526001600455348015601457600080fd5b50603f8060226000396000f3fe6080604052600080fdfea2646970667358221220a173613dddfb3d245fe61cda6fb48d2f2cab5069c6f258ea3e16c7a13133df4864736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE CALLVALUE DUP1 ISZERO PUSH1 0x14 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x3F DUP1 PUSH1 0x22 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 LOG1 PUSH20 0x613DDDFB3D245FE61CDA6FB48D2F2CAB5069C6F2 PC 0xEA RETURNDATACOPY AND 0xC7 LOG1 BALANCE CALLER 0xDF 0x48 PUSH5 0x736F6C6343 STOP MOD 0xC STOP CALLER ", | |
| "sourceMap": "20836:8643:0:-:0;;;21493:1;21462:32;;20836:8643;;;;;;;;;;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "6080604052600080fdfea2646970667358221220a173613dddfb3d245fe61cda6fb48d2f2cab5069c6f258ea3e16c7a13133df4864736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 LOG1 PUSH20 0x613DDDFB3D245FE61CDA6FB48D2F2CAB5069C6F2 PC 0xEA RETURNDATACOPY AND 0xC7 LOG1 BALANCE CALLER 0xDF 0x48 PUSH5 0x736F6C6343 STOP MOD 0xC STOP CALLER ", | |
| "sourceMap": "20836:8643:0:-:0;;;;;" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "12600", | |
| "executionCost": "20072", | |
| "totalCost": "32672" | |
| }, | |
| "internal": { | |
| "addChainlinkExternalRequest(address,bytes32)": "infinite", | |
| "buildChainlinkRequest(bytes32,address,bytes4)": "infinite", | |
| "cancelChainlinkRequest(bytes32,uint256,bytes4,uint256)": "infinite", | |
| "chainlinkOracleAddress()": "infinite", | |
| "chainlinkTokenAddress()": "infinite", | |
| "encodeRequest(struct Chainlink.Request memory)": "infinite", | |
| "sendChainlinkRequest(struct Chainlink.Request memory,uint256)": "infinite", | |
| "sendChainlinkRequestTo(address,struct Chainlink.Request memory,uint256)": "infinite", | |
| "setChainlinkOracle(address)": "infinite", | |
| "setChainlinkToken(address)": "infinite", | |
| "setPublicChainlinkToken()": "infinite", | |
| "updateChainlinkOracleWithENS()": "infinite", | |
| "useChainlinkWithENS(address,bytes32)": "infinite", | |
| "validateChainlinkCallback(bytes32)": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": {} | |
| }, | |
| "abi": [ | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "title": "The ChainlinkClient contract", | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "notice": "Contract writers can inherit this contract in order to create requests for the Chainlink network", | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "ChainlinkClient" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "gasEstimates": null, | |
| "methodIdentifiers": { | |
| "cancelOracleRequest(bytes32,uint256,bytes4,uint256)": "6ee4d553", | |
| "oracleRequest(address,uint256,bytes32,address,bytes4,uint256,uint256,bytes)": "40429946" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "payment", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes4", | |
| "name": "callbackFunctionId", | |
| "type": "bytes4" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "expiration", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "cancelOracleRequest", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "sender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "requestPrice", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes32", | |
| "name": "serviceAgreementID", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "callbackAddress", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "bytes4", | |
| "name": "callbackFunctionId", | |
| "type": "bytes4" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "nonce", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "dataVersion", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "oracleRequest", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "payment", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes4", | |
| "name": "callbackFunctionId", | |
| "type": "bytes4" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "expiration", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "cancelOracleRequest", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "sender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "requestPrice", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes32", | |
| "name": "serviceAgreementID", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "callbackAddress", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "bytes4", | |
| "name": "callbackFunctionId", | |
| "type": "bytes4" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "nonce", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "dataVersion", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "oracleRequest", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "ChainlinkRequestInterface" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "gasEstimates": null, | |
| "methodIdentifiers": { | |
| "owner(bytes32)": "02571be3", | |
| "resolver(bytes32)": "0178b8bf", | |
| "setOwner(bytes32,address)": "5b0fc9c3", | |
| "setResolver(bytes32,address)": "1896f70a", | |
| "setSubnodeOwner(bytes32,bytes32,address)": "06ab5923", | |
| "setTTL(bytes32,uint64)": "14ab9038", | |
| "ttl(bytes32)": "16a25cbd" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "label", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "NewOwner", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "resolver", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "NewResolver", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint64", | |
| "name": "ttl", | |
| "type": "uint64" | |
| } | |
| ], | |
| "name": "NewTTL", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "Transfer", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "owner", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "resolver", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setOwner", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_resolver", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setResolver", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "bytes32", | |
| "name": "label", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setSubnodeOwner", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint64", | |
| "name": "_ttl", | |
| "type": "uint64" | |
| } | |
| ], | |
| "name": "setTTL", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ttl", | |
| "outputs": [ | |
| { | |
| "internalType": "uint64", | |
| "name": "", | |
| "type": "uint64" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "label", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "NewOwner", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "resolver", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "NewResolver", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "uint64", | |
| "name": "ttl", | |
| "type": "uint64" | |
| } | |
| ], | |
| "name": "NewTTL", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "indexed": false, | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "Transfer", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "owner", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "resolver", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setOwner", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_resolver", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setResolver", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "bytes32", | |
| "name": "label", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "_owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "setSubnodeOwner", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint64", | |
| "name": "_ttl", | |
| "type": "uint64" | |
| } | |
| ], | |
| "name": "setTTL", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ttl", | |
| "outputs": [ | |
| { | |
| "internalType": "uint64", | |
| "name": "", | |
| "type": "uint64" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "ENSInterface" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "gasEstimates": null, | |
| "methodIdentifiers": { | |
| "addr(bytes32)": "3b3b57de" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "addr", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "node", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "addr", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "ENSResolver" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "gasEstimates": null, | |
| "methodIdentifiers": { | |
| "allowance(address,address)": "dd62ed3e", | |
| "approve(address,uint256)": "095ea7b3", | |
| "balanceOf(address)": "70a08231", | |
| "decimals()": "313ce567", | |
| "decreaseApproval(address,uint256)": "66188463", | |
| "increaseApproval(address,uint256)": "d73dd623", | |
| "name()": "06fdde03", | |
| "symbol()": "95d89b41", | |
| "totalSupply()": "18160ddd", | |
| "transfer(address,uint256)": "a9059cbb", | |
| "transferAndCall(address,uint256,bytes)": "4000aea0", | |
| "transferFrom(address,address,uint256)": "23b872dd" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "allowance", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "remaining", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "approve", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "balanceOf", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "balance", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "decimals", | |
| "outputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "decimalPlaces", | |
| "type": "uint8" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "addedValue", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "decreaseApproval", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "subtractedValue", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "increaseApproval", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "name", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "tokenName", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "symbol", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "tokenSymbol", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "totalSupply", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "totalTokensIssued", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "transfer", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "transferAndCall", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "from", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "transferFrom", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "allowance", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "remaining", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "approve", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| } | |
| ], | |
| "name": "balanceOf", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "balance", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "decimals", | |
| "outputs": [ | |
| { | |
| "internalType": "uint8", | |
| "name": "decimalPlaces", | |
| "type": "uint8" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "addedValue", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "decreaseApproval", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "spender", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "subtractedValue", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "increaseApproval", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "name", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "tokenName", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "symbol", | |
| "outputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "tokenSymbol", | |
| "type": "string" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "totalSupply", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "totalTokensIssued", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "transfer", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| }, | |
| { | |
| "internalType": "bytes", | |
| "name": "data", | |
| "type": "bytes" | |
| } | |
| ], | |
| "name": "transferAndCall", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "from", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "address", | |
| "name": "to", | |
| "type": "address" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "value", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "transferFrom", | |
| "outputs": [ | |
| { | |
| "internalType": "bool", | |
| "name": "success", | |
| "type": "bool" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "LinkTokenInterface" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "", | |
| "opcodes": "", | |
| "sourceMap": "" | |
| }, | |
| "gasEstimates": null, | |
| "methodIdentifiers": { | |
| "getAddress()": "38cc4831" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "name": "getAddress", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "name": "getAddress", | |
| "outputs": [ | |
| { | |
| "internalType": "address", | |
| "name": "", | |
| "type": "address" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": {}, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "Chainlink_test_flat.sol": "PointerInterface" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "Chainlink_test_flat.sol": { | |
| "keccak256": "0x4e326a7cd9d507974c6a0ad3818bd3ec12ff453f76f5b65bf9937deec3d84cbe", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ab2281049990a578ee54d24489ab1a0476d9236282bce0b6f1b94f75a5263e87", | |
| "dweb:/ipfs/QmVR4Hdguyw3km8EFsyC7ygtTBYZ4VLbAqVbWdaVJsLFyj" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/ENSResolver.sol | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| abstract contract ENSResolver { | |
| function addr(bytes32 node) public view virtual returns (address); | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/PointerInterface.sol | |
| pragma solidity ^0.6.0; | |
| interface PointerInterface { | |
| function getAddress() external view returns (address); | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol | |
| pragma solidity ^0.6.0; | |
| interface ChainlinkRequestInterface { | |
| function oracleRequest( | |
| address sender, | |
| uint256 requestPrice, | |
| bytes32 serviceAgreementID, | |
| address callbackAddress, | |
| bytes4 callbackFunctionId, | |
| uint256 nonce, | |
| uint256 dataVersion, | |
| bytes calldata data | |
| ) external; | |
| function cancelOracleRequest( | |
| bytes32 requestId, | |
| uint256 payment, | |
| bytes4 callbackFunctionId, | |
| uint256 expiration | |
| ) external; | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol | |
| pragma solidity ^0.6.0; | |
| interface LinkTokenInterface { | |
| function allowance(address owner, address spender) external view returns (uint256 remaining); | |
| function approve(address spender, uint256 value) external returns (bool success); | |
| function balanceOf(address owner) external view returns (uint256 balance); | |
| function decimals() external view returns (uint8 decimalPlaces); | |
| function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); | |
| function increaseApproval(address spender, uint256 subtractedValue) external; | |
| function name() external view returns (string memory tokenName); | |
| function symbol() external view returns (string memory tokenSymbol); | |
| function totalSupply() external view returns (uint256 totalTokensIssued); | |
| function transfer(address to, uint256 value) external returns (bool success); | |
| function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success); | |
| function transferFrom(address from, address to, uint256 value) external returns (bool success); | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/ENSInterface.sol | |
| pragma solidity ^0.6.0; | |
| interface ENSInterface { | |
| // Logged when the owner of a node assigns a new owner to a subnode. | |
| event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); | |
| // Logged when the owner of a node transfers ownership to a new account. | |
| event Transfer(bytes32 indexed node, address owner); | |
| // Logged when the resolver for a node changes. | |
| event NewResolver(bytes32 indexed node, address resolver); | |
| // Logged when the TTL of a node changes | |
| event NewTTL(bytes32 indexed node, uint64 ttl); | |
| function setSubnodeOwner(bytes32 node, bytes32 label, address _owner) external; | |
| function setResolver(bytes32 node, address _resolver) external; | |
| function setOwner(bytes32 node, address _owner) external; | |
| function setTTL(bytes32 node, uint64 _ttl) external; | |
| function owner(bytes32 node) external view returns (address); | |
| function resolver(bytes32 node) external view returns (address); | |
| function ttl(bytes32 node) external view returns (uint64); | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/BufferChainlink.sol | |
| pragma solidity ^0.6.0; | |
| /** | |
| * @dev A library for working with mutable byte buffers in Solidity. | |
| * | |
| * Byte buffers are mutable and expandable, and provide a variety of primitives | |
| * for writing to them. At any time you can fetch a bytes object containing the | |
| * current contents of the buffer. The bytes object should not be stored between | |
| * operations, as it may change due to resizing of the buffer. | |
| */ | |
| library BufferChainlink { | |
| /** | |
| * @dev Represents a mutable buffer. Buffers have a current value (buf) and | |
| * a capacity. The capacity may be longer than the current value, in | |
| * which case it can be extended without the need to allocate more memory. | |
| */ | |
| struct buffer { | |
| bytes buf; | |
| uint capacity; | |
| } | |
| /** | |
| * @dev Initializes a buffer with an initial capacity. | |
| * @param buf The buffer to initialize. | |
| * @param capacity The number of bytes of space to allocate the buffer. | |
| * @return The buffer, for chaining. | |
| */ | |
| function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) { | |
| if (capacity % 32 != 0) { | |
| capacity += 32 - (capacity % 32); | |
| } | |
| // Allocate space for the buffer data | |
| buf.capacity = capacity; | |
| assembly { | |
| let ptr := mload(0x40) | |
| mstore(buf, ptr) | |
| mstore(ptr, 0) | |
| mstore(0x40, add(32, add(ptr, capacity))) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Initializes a new buffer from an existing bytes object. | |
| * Changes to the buffer may mutate the original value. | |
| * @param b The bytes object to initialize the buffer with. | |
| * @return A new buffer. | |
| */ | |
| function fromBytes(bytes memory b) internal pure returns(buffer memory) { | |
| buffer memory buf; | |
| buf.buf = b; | |
| buf.capacity = b.length; | |
| return buf; | |
| } | |
| function resize(buffer memory buf, uint capacity) private pure { | |
| bytes memory oldbuf = buf.buf; | |
| init(buf, capacity); | |
| append(buf, oldbuf); | |
| } | |
| function max(uint a, uint b) private pure returns(uint) { | |
| if (a > b) { | |
| return a; | |
| } | |
| return b; | |
| } | |
| /** | |
| * @dev Sets buffer length to 0. | |
| * @param buf The buffer to truncate. | |
| * @return The original buffer, for chaining.. | |
| */ | |
| function truncate(buffer memory buf) internal pure returns (buffer memory) { | |
| assembly { | |
| let bufptr := mload(buf) | |
| mstore(bufptr, 0) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The start offset to write to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) { | |
| require(len <= data.length); | |
| if (off + len > buf.capacity) { | |
| resize(buf, max(buf.capacity, len + off) * 2); | |
| } | |
| uint dest; | |
| uint src; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Start address = buffer address + offset + sizeof(buffer length) | |
| dest := add(add(bufptr, 32), off) | |
| // Update buffer length if we're extending it | |
| if gt(add(len, off), buflen) { | |
| mstore(bufptr, add(len, off)) | |
| } | |
| src := add(data, 32) | |
| } | |
| // Copy word-length chunks while possible | |
| for (; len >= 32; len -= 32) { | |
| assembly { | |
| mstore(dest, mload(src)) | |
| } | |
| dest += 32; | |
| src += 32; | |
| } | |
| // Copy remaining bytes | |
| uint mask = 256 ** (32 - len) - 1; | |
| assembly { | |
| let srcpart := and(mload(src), not(mask)) | |
| let destpart := and(mload(dest), mask) | |
| mstore(dest, or(destpart, srcpart)) | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @param len The number of bytes to copy. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, len); | |
| } | |
| /** | |
| * @dev Appends a byte string to a buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, data.length); | |
| } | |
| /** | |
| * @dev Writes a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write the byte at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) { | |
| if (off >= buf.capacity) { | |
| resize(buf, buf.capacity * 2); | |
| } | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Length of existing buffer data | |
| let buflen := mload(bufptr) | |
| // Address = buffer address + sizeof(buffer length) + off | |
| let dest := add(add(bufptr, off), 32) | |
| mstore8(dest, data) | |
| // Update buffer length if we extended it | |
| if eq(off, buflen) { | |
| mstore(bufptr, add(buflen, 1)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) { | |
| return writeUint8(buf, buf.buf.length, data); | |
| } | |
| /** | |
| * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (left-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| // Right-align data | |
| data = data >> (8 * (32 - len)); | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + sizeof(buffer length) + off + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the | |
| * capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, off, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chhaining. | |
| */ | |
| function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, bytes32(data), 20); | |
| } | |
| /** | |
| * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer, for chaining. | |
| */ | |
| function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) { | |
| return write(buf, buf.buf.length, data, 32); | |
| } | |
| /** | |
| * @dev Writes an integer to the buffer. Resizes if doing so would exceed | |
| * the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param off The offset to write at. | |
| * @param data The data to append. | |
| * @param len The number of bytes to write (right-aligned). | |
| * @return The original buffer, for chaining. | |
| */ | |
| function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) { | |
| if (len + off > buf.capacity) { | |
| resize(buf, (len + off) * 2); | |
| } | |
| uint mask = 256 ** len - 1; | |
| assembly { | |
| // Memory address of the buffer data | |
| let bufptr := mload(buf) | |
| // Address = buffer address + off + sizeof(buffer length) + len | |
| let dest := add(add(bufptr, off), len) | |
| mstore(dest, or(and(mload(dest), not(mask)), data)) | |
| // Update buffer length if we extended it | |
| if gt(add(off, len), mload(bufptr)) { | |
| mstore(bufptr, add(off, len)) | |
| } | |
| } | |
| return buf; | |
| } | |
| /** | |
| * @dev Appends a byte to the end of the buffer. Resizes if doing so would | |
| * exceed the capacity of the buffer. | |
| * @param buf The buffer to append to. | |
| * @param data The data to append. | |
| * @return The original buffer. | |
| */ | |
| function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) { | |
| return writeInt(buf, buf.buf.length, data, len); | |
| } | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/CBORChainlink.sol | |
| pragma solidity >= 0.4.19; | |
| library CBORChainlink { | |
| using BufferChainlink for BufferChainlink.buffer; | |
| uint8 private constant MAJOR_TYPE_INT = 0; | |
| uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1; | |
| uint8 private constant MAJOR_TYPE_BYTES = 2; | |
| uint8 private constant MAJOR_TYPE_STRING = 3; | |
| uint8 private constant MAJOR_TYPE_ARRAY = 4; | |
| uint8 private constant MAJOR_TYPE_MAP = 5; | |
| uint8 private constant MAJOR_TYPE_TAG = 6; | |
| uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7; | |
| uint8 private constant TAG_TYPE_BIGNUM = 2; | |
| uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3; | |
| function encodeType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major, | |
| uint value | |
| ) | |
| private | |
| pure | |
| { | |
| if(value <= 23) { | |
| buf.appendUint8(uint8((major << 5) | value)); | |
| } else if(value <= 0xFF) { | |
| buf.appendUint8(uint8((major << 5) | 24)); | |
| buf.appendInt(value, 1); | |
| } else if(value <= 0xFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 25)); | |
| buf.appendInt(value, 2); | |
| } else if(value <= 0xFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 26)); | |
| buf.appendInt(value, 4); | |
| } else if(value <= 0xFFFFFFFFFFFFFFFF) { | |
| buf.appendUint8(uint8((major << 5) | 27)); | |
| buf.appendInt(value, 8); | |
| } | |
| } | |
| function encodeIndefiniteLengthType( | |
| BufferChainlink.buffer memory buf, | |
| uint8 major | |
| ) | |
| private | |
| pure | |
| { | |
| buf.appendUint8(uint8((major << 5) | 31)); | |
| } | |
| function encodeUInt( | |
| BufferChainlink.buffer memory buf, | |
| uint value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_INT, value); | |
| } | |
| function encodeInt( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| if(value < -0x10000000000000000) { | |
| encodeSignedBigNum(buf, value); | |
| } else if(value > 0xFFFFFFFFFFFFFFFF) { | |
| encodeBigNum(buf, value); | |
| } else if(value >= 0) { | |
| encodeType(buf, MAJOR_TYPE_INT, uint(value)); | |
| } else { | |
| encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value)); | |
| } | |
| } | |
| function encodeBytes( | |
| BufferChainlink.buffer memory buf, | |
| bytes memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_BYTES, value.length); | |
| buf.append(value); | |
| } | |
| function encodeBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int value | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(value))); | |
| } | |
| function encodeSignedBigNum( | |
| BufferChainlink.buffer memory buf, | |
| int input | |
| ) | |
| internal | |
| pure | |
| { | |
| buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)); | |
| encodeBytes(buf, abi.encode(uint(-1 - input))); | |
| } | |
| function encodeString( | |
| BufferChainlink.buffer memory buf, | |
| string memory value | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length); | |
| buf.append(bytes(value)); | |
| } | |
| function startArray( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); | |
| } | |
| function startMap( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); | |
| } | |
| function endSequence( | |
| BufferChainlink.buffer memory buf | |
| ) | |
| internal | |
| pure | |
| { | |
| encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE); | |
| } | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/Chainlink.sol | |
| pragma solidity ^0.6.0; | |
| /** | |
| * @title Library for common Chainlink functions | |
| * @dev Uses imported CBOR library for encoding to buffer | |
| */ | |
| library Chainlink { | |
| uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase | |
| using CBORChainlink for BufferChainlink.buffer; | |
| struct Request { | |
| bytes32 id; | |
| address callbackAddress; | |
| bytes4 callbackFunctionId; | |
| uint256 nonce; | |
| BufferChainlink.buffer buf; | |
| } | |
| /** | |
| * @notice Initializes a Chainlink request | |
| * @dev Sets the ID, callback address, and callback function signature on the request | |
| * @param self The uninitialized request | |
| * @param _id The Job Specification ID | |
| * @param _callbackAddress The callback address | |
| * @param _callbackFunction The callback function signature | |
| * @return The initialized request | |
| */ | |
| function initialize( | |
| Request memory self, | |
| bytes32 _id, | |
| address _callbackAddress, | |
| bytes4 _callbackFunction | |
| ) internal pure returns (Chainlink.Request memory) { | |
| BufferChainlink.init(self.buf, defaultBufferSize); | |
| self.id = _id; | |
| self.callbackAddress = _callbackAddress; | |
| self.callbackFunctionId = _callbackFunction; | |
| return self; | |
| } | |
| /** | |
| * @notice Sets the data for the buffer without encoding CBOR on-chain | |
| * @dev CBOR can be closed with curly-brackets {} or they can be left off | |
| * @param self The initialized request | |
| * @param _data The CBOR data | |
| */ | |
| function setBuffer(Request memory self, bytes memory _data) | |
| internal pure | |
| { | |
| BufferChainlink.init(self.buf, _data.length); | |
| BufferChainlink.append(self.buf, _data); | |
| } | |
| /** | |
| * @notice Adds a string value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The string value to add | |
| */ | |
| function add(Request memory self, string memory _key, string memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeString(_value); | |
| } | |
| /** | |
| * @notice Adds a bytes value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The bytes value to add | |
| */ | |
| function addBytes(Request memory self, string memory _key, bytes memory _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeBytes(_value); | |
| } | |
| /** | |
| * @notice Adds a int256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The int256 value to add | |
| */ | |
| function addInt(Request memory self, string memory _key, int256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeInt(_value); | |
| } | |
| /** | |
| * @notice Adds a uint256 value to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _value The uint256 value to add | |
| */ | |
| function addUint(Request memory self, string memory _key, uint256 _value) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.encodeUInt(_value); | |
| } | |
| /** | |
| * @notice Adds an array of strings to the request with a given key name | |
| * @param self The initialized request | |
| * @param _key The name of the key | |
| * @param _values The array of string values to add | |
| */ | |
| function addStringArray(Request memory self, string memory _key, string[] memory _values) | |
| internal pure | |
| { | |
| self.buf.encodeString(_key); | |
| self.buf.startArray(); | |
| for (uint256 i = 0; i < _values.length; i++) { | |
| self.buf.encodeString(_values[i]); | |
| } | |
| self.buf.endSequence(); | |
| } | |
| } | |
| // File: https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/ChainlinkClient.sol | |
| pragma solidity ^0.6.0; | |
| /** | |
| * @title The ChainlinkClient contract | |
| * @notice Contract writers can inherit this contract in order to create requests for the | |
| * Chainlink network | |
| */ | |
| contract ChainlinkClient { | |
| using Chainlink for Chainlink.Request; | |
| uint256 constant internal LINK = 10**18; | |
| uint256 constant private AMOUNT_OVERRIDE = 0; | |
| address constant private SENDER_OVERRIDE = address(0); | |
| uint256 constant private ARGS_VERSION = 1; | |
| bytes32 constant private ENS_TOKEN_SUBNAME = keccak256("link"); | |
| bytes32 constant private ENS_ORACLE_SUBNAME = keccak256("oracle"); | |
| address constant private LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571; | |
| ENSInterface private ens; | |
| bytes32 private ensNode; | |
| LinkTokenInterface private link; | |
| ChainlinkRequestInterface private oracle; | |
| uint256 private requestCount = 1; | |
| mapping(bytes32 => address) private pendingRequests; | |
| event ChainlinkRequested(bytes32 indexed id); | |
| event ChainlinkFulfilled(bytes32 indexed id); | |
| event ChainlinkCancelled(bytes32 indexed id); | |
| /** | |
| * @notice Creates a request that can hold additional parameters | |
| * @param _specId The Job Specification ID that the request will be created for | |
| * @param _callbackAddress The callback address that the response will be sent to | |
| * @param _callbackFunctionSignature The callback function signature to use for the callback address | |
| * @return A Chainlink Request struct in memory | |
| */ | |
| function buildChainlinkRequest( | |
| bytes32 _specId, | |
| address _callbackAddress, | |
| bytes4 _callbackFunctionSignature | |
| ) internal pure returns (Chainlink.Request memory) { | |
| Chainlink.Request memory req; | |
| return req.initialize(_specId, _callbackAddress, _callbackFunctionSignature); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the stored oracle address | |
| * @dev Calls `chainlinkRequestTo` with the stored oracle address | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequest(Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32) | |
| { | |
| return sendChainlinkRequestTo(address(oracle), _req, _payment); | |
| } | |
| /** | |
| * @notice Creates a Chainlink request to the specified oracle address | |
| * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to | |
| * send LINK which creates a request on the target oracle contract. | |
| * Emits ChainlinkRequested event. | |
| * @param _oracle The address of the oracle for the request | |
| * @param _req The initialized Chainlink Request | |
| * @param _payment The amount of LINK to send for the request | |
| * @return requestId The request ID | |
| */ | |
| function sendChainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment) | |
| internal | |
| returns (bytes32 requestId) | |
| { | |
| requestId = keccak256(abi.encodePacked(this, requestCount)); | |
| _req.nonce = requestCount; | |
| pendingRequests[requestId] = _oracle; | |
| emit ChainlinkRequested(requestId); | |
| require(link.transferAndCall(_oracle, _payment, encodeRequest(_req)), "unable to transferAndCall to oracle"); | |
| requestCount += 1; | |
| return requestId; | |
| } | |
| /** | |
| * @notice Allows a request to be cancelled if it has not been fulfilled | |
| * @dev Requires keeping track of the expiration value emitted from the oracle contract. | |
| * Deletes the request from the `pendingRequests` mapping. | |
| * Emits ChainlinkCancelled event. | |
| * @param _requestId The request ID | |
| * @param _payment The amount of LINK sent for the request | |
| * @param _callbackFunc The callback function specified for the request | |
| * @param _expiration The time of the expiration for the request | |
| */ | |
| function cancelChainlinkRequest( | |
| bytes32 _requestId, | |
| uint256 _payment, | |
| bytes4 _callbackFunc, | |
| uint256 _expiration | |
| ) | |
| internal | |
| { | |
| ChainlinkRequestInterface requested = ChainlinkRequestInterface(pendingRequests[_requestId]); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkCancelled(_requestId); | |
| requested.cancelOracleRequest(_requestId, _payment, _callbackFunc, _expiration); | |
| } | |
| /** | |
| * @notice Sets the stored oracle address | |
| * @param _oracle The address of the oracle contract | |
| */ | |
| function setChainlinkOracle(address _oracle) internal { | |
| oracle = ChainlinkRequestInterface(_oracle); | |
| } | |
| /** | |
| * @notice Sets the LINK token address | |
| * @param _link The address of the LINK token contract | |
| */ | |
| function setChainlinkToken(address _link) internal { | |
| link = LinkTokenInterface(_link); | |
| } | |
| /** | |
| * @notice Sets the Chainlink token address for the public | |
| * network as given by the Pointer contract | |
| */ | |
| function setPublicChainlinkToken() internal { | |
| setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress()); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the LINK token | |
| * @return The address of the LINK token | |
| */ | |
| function chainlinkTokenAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(link); | |
| } | |
| /** | |
| * @notice Retrieves the stored address of the oracle contract | |
| * @return The address of the oracle contract | |
| */ | |
| function chainlinkOracleAddress() | |
| internal | |
| view | |
| returns (address) | |
| { | |
| return address(oracle); | |
| } | |
| /** | |
| * @notice Allows for a request which was created on another contract to be fulfilled | |
| * on this contract | |
| * @param _oracle The address of the oracle contract that will fulfill the request | |
| * @param _requestId The request ID used for the response | |
| */ | |
| function addChainlinkExternalRequest(address _oracle, bytes32 _requestId) | |
| internal | |
| notPendingRequest(_requestId) | |
| { | |
| pendingRequests[_requestId] = _oracle; | |
| } | |
| /** | |
| * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS | |
| * @dev Accounts for subnodes having different resolvers | |
| * @param _ens The address of the ENS contract | |
| * @param _node The ENS node hash | |
| */ | |
| function useChainlinkWithENS(address _ens, bytes32 _node) | |
| internal | |
| { | |
| ens = ENSInterface(_ens); | |
| ensNode = _node; | |
| bytes32 linkSubnode = keccak256(abi.encodePacked(ensNode, ENS_TOKEN_SUBNAME)); | |
| ENSResolver resolver = ENSResolver(ens.resolver(linkSubnode)); | |
| setChainlinkToken(resolver.addr(linkSubnode)); | |
| updateChainlinkOracleWithENS(); | |
| } | |
| /** | |
| * @notice Sets the stored oracle contract with the address resolved by ENS | |
| * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously | |
| */ | |
| function updateChainlinkOracleWithENS() | |
| internal | |
| { | |
| bytes32 oracleSubnode = keccak256(abi.encodePacked(ensNode, ENS_ORACLE_SUBNAME)); | |
| ENSResolver resolver = ENSResolver(ens.resolver(oracleSubnode)); | |
| setChainlinkOracle(resolver.addr(oracleSubnode)); | |
| } | |
| /** | |
| * @notice Encodes the request to be sent to the oracle contract | |
| * @dev The Chainlink node expects values to be in order for the request to be picked up. Order of types | |
| * will be validated in the oracle contract. | |
| * @param _req The initialized Chainlink Request | |
| * @return The bytes payload for the `transferAndCall` method | |
| */ | |
| function encodeRequest(Chainlink.Request memory _req) | |
| private | |
| view | |
| returns (bytes memory) | |
| { | |
| return abi.encodeWithSelector( | |
| oracle.oracleRequest.selector, | |
| SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address | |
| AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent | |
| _req.id, | |
| _req.callbackAddress, | |
| _req.callbackFunctionId, | |
| _req.nonce, | |
| ARGS_VERSION, | |
| _req.buf.buf); | |
| } | |
| /** | |
| * @notice Ensures that the fulfillment is valid for this contract | |
| * @dev Use if the contract developer prefers methods instead of modifiers for validation | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| function validateChainlinkCallback(bytes32 _requestId) | |
| internal | |
| recordChainlinkFulfillment(_requestId) | |
| // solhint-disable-next-line no-empty-blocks | |
| {} | |
| /** | |
| * @dev Reverts if the sender is not the oracle of the request. | |
| * Emits ChainlinkFulfilled event. | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier recordChainlinkFulfillment(bytes32 _requestId) { | |
| require(msg.sender == pendingRequests[_requestId], | |
| "Source must be the oracle of the request"); | |
| delete pendingRequests[_requestId]; | |
| emit ChainlinkFulfilled(_requestId); | |
| _; | |
| } | |
| /** | |
| * @dev Reverts if the request is already pending | |
| * @param _requestId The request ID for fulfillment | |
| */ | |
| modifier notPendingRequest(bytes32 _requestId) { | |
| require(pendingRequests[_requestId] == address(0), "Request is already pending"); | |
| _; | |
| } | |
| } | |
| // File: contracts/Chainlink_test.sol | |
| // This example code is designed to quickly deploy an example contract using Remix. | |
| pragma solidity ^0.6.0; | |
| contract APIConsumer is ChainlinkClient { | |
| uint256 public volume; | |
| address private oracle; | |
| bytes32 private jobId; | |
| uint256 private fee; | |
| /** | |
| * Network: Kovan | |
| * Chainlink - 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e | |
| * Chainlink - 29fa9aa13bf1468788b7cc4a500a45b8 | |
| * Fee: 0.1 LINK | |
| */ | |
| constructor() public { | |
| setPublicChainlinkToken(); | |
| oracle = 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e; | |
| jobId = "29fa9aa13bf1468788b7cc4a500a45b8"; | |
| fee = 0.1 * 10 ** 18; // 0.1 LINK | |
| } | |
| /** | |
| * Create a Chainlink request to retrieve API response, find the target | |
| * data, then multiply by 1000000000000000000 (to remove decimal places from data). | |
| ************************************************************************************ | |
| * STOP! * | |
| * THIS FUNCTION WILL FAIL IF THIS CONTRACT DOES NOT OWN LINK * | |
| * ---------------------------------------------------------- * | |
| * Learn how to obtain testnet LINK and fund this contract: * | |
| * ------- https://docs.chain.link/docs/acquire-link -------- * | |
| * ---- https://docs.chain.link/docs/fund-your-contract ----- * | |
| * * | |
| ************************************************************************************/ | |
| function requestVolumeData() public returns (bytes32 requestId) | |
| { | |
| Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); | |
| // Set the URL to perform the GET request on | |
| request.add("get", "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD"); | |
| // Set the path to find the desired data in the API response, where the response format is: | |
| // {"RAW": | |
| // {"ETH": | |
| // {"USD": | |
| // { | |
| // ..., | |
| // "VOLUME24HOUR": xxx.xxx, | |
| // ... | |
| // } | |
| // } | |
| // } | |
| // } | |
| request.add("path", "RAW.ETH.USD.VOLUME24HOUR"); | |
| // Multiply the result by 1000000000000000000 to remove decimals | |
| int timesAmount = 10**18; | |
| request.addInt("times", timesAmount); | |
| // Sends the request | |
| return sendChainlinkRequestTo(oracle, request, fee); | |
| } | |
| /** | |
| * Receive the response in the form of uint256 | |
| */ | |
| function fulfill(bytes32 _requestId, uint256 _volume) public recordChainlinkFulfillment(_requestId) | |
| { | |
| volume = _volume; | |
| } | |
| /** | |
| * Withdraw LINK from this contract | |
| * | |
| * NOTE: DO NOT USE THIS IN PRODUCTION AS IT CAN BE CALLED BY ANY ADDRESS. | |
| * THIS IS PURELY FOR EXAMPLE PURPOSES ONLY. | |
| */ | |
| function withdrawLink() external { | |
| LinkTokenInterface linkToken = LinkTokenInterface(chainlinkTokenAddress()); | |
| require(linkToken.transfer(msg.sender, linkToken.balanceOf(address(this))), "Unable to transfer"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| /** | |
| * @title Storage | |
| * @dev Store & retrieve value in a variable | |
| */ | |
| contract Storage { | |
| uint256 number; | |
| /** | |
| * @dev Store value in variable | |
| * @param num value to store | |
| */ | |
| function store(uint256 num) public { | |
| number = num; | |
| } | |
| /** | |
| * @dev Return value | |
| * @return value of 'number' | |
| */ | |
| function retrieve() public view returns (uint256){ | |
| return number; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| /** | |
| * @title Owner | |
| * @dev Set & change owner | |
| */ | |
| contract Owner { | |
| address private owner; | |
| // event for EVM logging | |
| event OwnerSet(address indexed oldOwner, address indexed newOwner); | |
| // modifier to check if caller is owner | |
| modifier isOwner() { | |
| // If the first argument of 'require' evaluates to 'false', execution terminates and all | |
| // changes to the state and to Ether balances are reverted. | |
| // This used to consume all gas in old EVM versions, but not anymore. | |
| // It is often a good idea to use 'require' to check if functions are called correctly. | |
| // As a second argument, you can also provide an explanation about what went wrong. | |
| require(msg.sender == owner, "Caller is not owner"); | |
| _; | |
| } | |
| /** | |
| * @dev Set contract deployer as owner | |
| */ | |
| constructor() { | |
| owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor | |
| emit OwnerSet(address(0), owner); | |
| } | |
| /** | |
| * @dev Change owner | |
| * @param newOwner address of new owner | |
| */ | |
| function changeOwner(address newOwner) public isOwner { | |
| emit OwnerSet(owner, newOwner); | |
| owner = newOwner; | |
| } | |
| /** | |
| * @dev Return owner address | |
| * @return address of owner | |
| */ | |
| function getOwner() external view returns (address) { | |
| return owner; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| /** | |
| * @title Ballot | |
| * @dev Implements voting process along with vote delegation | |
| */ | |
| contract Ballot { | |
| struct Voter { | |
| uint weight; // weight is accumulated by delegation | |
| bool voted; // if true, that person already voted | |
| address delegate; // person delegated to | |
| uint vote; // index of the voted proposal | |
| } | |
| struct Proposal { | |
| // If you can limit the length to a certain number of bytes, | |
| // always use one of bytes1 to bytes32 because they are much cheaper | |
| bytes32 name; // short name (up to 32 bytes) | |
| uint voteCount; // number of accumulated votes | |
| } | |
| address public chairperson; | |
| mapping(address => Voter) public voters; | |
| Proposal[] public proposals; | |
| /** | |
| * @dev Create a new ballot to choose one of 'proposalNames'. | |
| * @param proposalNames names of proposals | |
| */ | |
| constructor(bytes32[] memory proposalNames) { | |
| chairperson = msg.sender; | |
| voters[chairperson].weight = 1; | |
| for (uint i = 0; i < proposalNames.length; i++) { | |
| // 'Proposal({...})' creates a temporary | |
| // Proposal object and 'proposals.push(...)' | |
| // appends it to the end of 'proposals'. | |
| proposals.push(Proposal({ | |
| name: proposalNames[i], | |
| voteCount: 0 | |
| })); | |
| } | |
| } | |
| /** | |
| * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. | |
| * @param voter address of voter | |
| */ | |
| function giveRightToVote(address voter) public { | |
| require( | |
| msg.sender == chairperson, | |
| "Only chairperson can give right to vote." | |
| ); | |
| require( | |
| !voters[voter].voted, | |
| "The voter already voted." | |
| ); | |
| require(voters[voter].weight == 0); | |
| voters[voter].weight = 1; | |
| } | |
| /** | |
| * @dev Delegate your vote to the voter 'to'. | |
| * @param to address to which vote is delegated | |
| */ | |
| function delegate(address to) public { | |
| Voter storage sender = voters[msg.sender]; | |
| require(!sender.voted, "You already voted."); | |
| require(to != msg.sender, "Self-delegation is disallowed."); | |
| while (voters[to].delegate != address(0)) { | |
| to = voters[to].delegate; | |
| // We found a loop in the delegation, not allowed. | |
| require(to != msg.sender, "Found loop in delegation."); | |
| } | |
| sender.voted = true; | |
| sender.delegate = to; | |
| Voter storage delegate_ = voters[to]; | |
| if (delegate_.voted) { | |
| // If the delegate already voted, | |
| // directly add to the number of votes | |
| proposals[delegate_.vote].voteCount += sender.weight; | |
| } else { | |
| // If the delegate did not vote yet, | |
| // add to her weight. | |
| delegate_.weight += sender.weight; | |
| } | |
| } | |
| /** | |
| * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. | |
| * @param proposal index of proposal in the proposals array | |
| */ | |
| function vote(uint proposal) public { | |
| Voter storage sender = voters[msg.sender]; | |
| require(sender.weight != 0, "Has no right to vote"); | |
| require(!sender.voted, "Already voted."); | |
| sender.voted = true; | |
| sender.vote = proposal; | |
| // If 'proposal' is out of the range of the array, | |
| // this will throw automatically and revert all | |
| // changes. | |
| proposals[proposal].voteCount += sender.weight; | |
| } | |
| /** | |
| * @dev Computes the winning proposal taking all previous votes into account. | |
| * @return winningProposal_ index of winning proposal in the proposals array | |
| */ | |
| function winningProposal() public view | |
| returns (uint winningProposal_) | |
| { | |
| uint winningVoteCount = 0; | |
| for (uint p = 0; p < proposals.length; p++) { | |
| if (proposals[p].voteCount > winningVoteCount) { | |
| winningVoteCount = proposals[p].voteCount; | |
| winningProposal_ = p; | |
| } | |
| } | |
| } | |
| /** | |
| * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then | |
| * @return winnerName_ the name of the winner | |
| */ | |
| function winnerName() public view | |
| returns (bytes32 winnerName_) | |
| { | |
| winnerName_ = proposals[winningProposal()].name; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "6080604052600160045534801561001557600080fd5b506100246100b460201b60201c565b732f90a6d021db21e1b2a077c5a37b3c7e75d15b7e600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f323966613961613133626631343638373838623763633461353030613435623860088190555067016345785d8a000060098190555061019d565b61015773c89bd4e1632d3a43cb03aaad5262cbe4038bc57173ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff1660e01b815260040160206040518083038186803b15801561011157600080fd5b505afa158015610125573d6000803e3d6000fd5b505050506040513d602081101561013b57600080fd5b810190808051906020019092919050505061015960201b60201c565b565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611217806101ac6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634357855e146100515780636021abac146100895780638dc654a2146100a7578063c618a1e4146100b1575b600080fd5b6100876004803603604081101561006757600080fd5b8101908080359060200190929190803590602001909291905050506100cf565b005b6100916101f6565b6040518082815260200191505060405180910390f35b6100af610384565b005b6100b961057e565b6040518082815260200191505060405180910390f35b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806111716028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600681905550505050565b60006102006110c6565b61021460085430634357855e60e01b610584565b90506102786040518060400160405280600381526020017f676574000000000000000000000000000000000000000000000000000000000081525060405180608001604052806049815260200161119960499139836105b59092919063ffffffff16565b6102f76040518060400160405280600481526020017f70617468000000000000000000000000000000000000000000000000000000008152506040518060400160405280601881526020017f5241572e4554482e5553442e564f4c554d453234484f55520000000000000000815250836105b59092919063ffffffff16565b6000670de0b6b3a7640000905061034e6040518060400160405280600581526020017f74696d657300000000000000000000000000000000000000000000000000000081525082846105e89092919063ffffffff16565b61037d600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360095461061b565b9250505090565b600061038e6108d3565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561042a57600080fd5b505afa15801561043e573d6000803e3d6000fd5b505050506040513d602081101561045457600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104ce57600080fd5b505af11580156104e2573d6000803e3d6000fd5b505050506040513d60208110156104f857600080fd5b810190808051906020019092919050505061057b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f556e61626c6520746f207472616e73666572000000000000000000000000000081525060200191505060405180910390fd5b50565b60065481565b61058c6110c6565b6105946110c6565b6105ab858585846108fd909392919063ffffffff16565b9150509392505050565b6105cc8284608001516109ad90919063ffffffff16565b6105e38184608001516109ad90919063ffffffff16565b505050565b6105ff8284608001516109ad90919063ffffffff16565b6106168184608001516109d290919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea0858461075387610a76565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107da5780820151818401526020810190506107bf565b50505050905090810190601f1680156108075780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561082857600080fd5b505af115801561083c573d6000803e3d6000fd5b505050506040513d602081101561085257600080fd5b81019080805190602001909291905050506108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061114e6023913960400191505060405180910390fd5b60016004600082825401925050819055508090509392505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6109056110c6565b6109158560800151610100610c42565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b6109ba8260038351610c96565b6109cd8183610ddb90919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000811215610a0957610a048282610dfd565b610a72565b67ffffffffffffffff811315610a2857610a238282610e6b565b610a71565b60008112610a4157610a3c82600083610c96565b610a70565b610a6f826001837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03610c96565b5b5b5b5050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ba5578082015181840152602081019050610b8a565b50505050905090810190601f168015610bd25780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b610c4a611133565b600060208381610c5657fe5b0614610c6f5760208281610c6657fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b60178111610cc357610cbd8160058460ff16901b60ff161784610eb790919063ffffffff16565b50610dd6565b60ff8111610d0557610ce8601860058460ff16901b1784610eb790919063ffffffff16565b50610cff81600185610ed79092919063ffffffff16565b50610dd5565b61ffff8111610d4857610d2b601960058460ff16901b1784610eb790919063ffffffff16565b50610d4281600285610ed79092919063ffffffff16565b50610dd4565b63ffffffff8111610d8d57610d70601a60058460ff16901b1784610eb790919063ffffffff16565b50610d8781600485610ed79092919063ffffffff16565b50610dd3565b67ffffffffffffffff8111610dd257610db9601b60058460ff16901b1784610eb790919063ffffffff16565b50610dd081600885610ed79092919063ffffffff16565b505b5b5b5b5b505050565b610de3611133565b610df583846000015151848551610ef9565b905092915050565b610e1b60036005600660ff16901b1783610eb790919063ffffffff16565b50610e6782827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0360405160200180828152602001915050604051602081830303815290604052610fb2565b5050565b610e8960026005600660ff16901b1783610eb790919063ffffffff16565b50610eb3828260405160200180828152602001915050604051602081830303815290604052610fb2565b5050565b610ebf611133565b610ecf8384600001515184610fd7565b905092915050565b610edf611133565b610ef0848560000151518585611025565b90509392505050565b610f01611133565b8251821115610f0f57600080fd5b84602001518285011115610f3a57610f39856002610f338860200151888701611086565b026110a2565b5b600080865180518760208301019350808887011115610f595787860182525b60208701925050505b60208410610f855780518252602082019150602081019050602084039350610f62565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610fbf8260028351610c96565b610fd28183610ddb90919063ffffffff16565b505050565b610fdf611133565b83602001518310610ffc57610ffb8460028660200151026110a2565b5b8351805160208583010184815381861415611018576001820183525b5050508390509392505050565b61102d611133565b8460200151848301111561104b5761104a856002868501026110a2565b5b60006001836101000a03905085518386820101858319825116178152815185880111156110785784870182525b505085915050949350505050565b6000818311156110985782905061109c565b8190505b92915050565b6060826000015190506110b58383610c42565b506110c08382610ddb565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815260200161112d611133565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f6620746865207265717565737468747470733a2f2f6d696e2d6170692e63727970746f636f6d706172652e636f6d2f646174612f70726963656d756c746966756c6c3f6673796d733d455448267473796d733d555344a26469706673582212204b4751c58d161b2bb04cb870bfa9482996157a97e1498544d06bcda98f9c54ea64736f6c63430006060033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x24 PUSH2 0xB4 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH20 0x2F90A6D021DB21E1B2A077C5A37B3C7E75D15B7E PUSH1 0x7 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH32 0x3239666139616131336266313436383738386237636334613530306134356238 PUSH1 0x8 DUP2 SWAP1 SSTORE POP PUSH8 0x16345785D8A0000 PUSH1 0x9 DUP2 SWAP1 SSTORE POP PUSH2 0x19D JUMP JUMPDEST PUSH2 0x157 PUSH20 0xC89BD4E1632D3A43CB03AAAD5262CBE4038BC571 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x38CC4831 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x111 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x125 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x13B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x159 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST JUMP JUMPDEST DUP1 PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH2 0x1217 DUP1 PUSH2 0x1AC PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4357855E EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x6021ABAC EQ PUSH2 0x89 JUMPI DUP1 PUSH4 0x8DC654A2 EQ PUSH2 0xA7 JUMPI DUP1 PUSH4 0xC618A1E4 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x87 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0xCF JUMP JUMPDEST STOP JUMPDEST PUSH2 0x91 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAF PUSH2 0x384 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB9 PUSH2 0x57E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x187 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1171 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x6 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x214 PUSH1 0x8 SLOAD ADDRESS PUSH4 0x4357855E PUSH1 0xE0 SHL PUSH2 0x584 JUMP JUMPDEST SWAP1 POP PUSH2 0x278 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6765740000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1199 PUSH1 0x49 SWAP2 CODECOPY DUP4 PUSH2 0x5B5 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x2F7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7061746800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x18 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5241572E4554482E5553442E564F4C554D453234484F55520000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x5B5 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 SWAP1 POP PUSH2 0x34E PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x74696D6573000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP3 DUP5 PUSH2 0x5E8 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37D PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x9 SLOAD PUSH2 0x61B JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38E PUSH2 0x8D3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA9059CBB CALLER DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x42A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x43E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x454 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4E2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x57B JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH32 0x556E61626C6520746F207472616E736665720000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x58C PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x594 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x5AB DUP6 DUP6 DUP6 DUP5 PUSH2 0x8FD SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5CC DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5E3 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x5FF DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x616 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9D2 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x753 DUP8 PUSH2 0xA76 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x7DA JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x7BF JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x807 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x828 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x83C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x852 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x8B8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x114E PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP1 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x905 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x915 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0xC42 JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x9BA DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0xC96 JUMP JUMPDEST PUSH2 0x9CD DUP2 DUP4 PUSH2 0xDDB SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 DUP2 SLT ISZERO PUSH2 0xA09 JUMPI PUSH2 0xA04 DUP3 DUP3 PUSH2 0xDFD JUMP JUMPDEST PUSH2 0xA72 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 SGT ISZERO PUSH2 0xA28 JUMPI PUSH2 0xA23 DUP3 DUP3 PUSH2 0xE6B JUMP JUMPDEST PUSH2 0xA71 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT PUSH2 0xA41 JUMPI PUSH2 0xA3C DUP3 PUSH1 0x0 DUP4 PUSH2 0xC96 JUMP JUMPDEST PUSH2 0xA70 JUMP JUMPDEST PUSH2 0xA6F DUP3 PUSH1 0x1 DUP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH2 0xC96 JUMP JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xBA5 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xB8A JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xBD2 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC4A PUSH2 0x1133 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0xC56 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0xC6F JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0xC66 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0xCC3 JUMPI PUSH2 0xCBD DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD6 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0xD05 JUMPI PUSH2 0xCE8 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xCFF DUP2 PUSH1 0x1 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD5 JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0xD48 JUMPI PUSH2 0xD2B PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD42 DUP2 PUSH1 0x2 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD4 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xD8D JUMPI PUSH2 0xD70 PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD87 DUP2 PUSH1 0x4 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD3 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0xDD2 JUMPI PUSH2 0xDB9 PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD0 DUP2 PUSH1 0x8 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xDE3 PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xDF5 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xEF9 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xE1B PUSH1 0x3 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xE67 DUP3 DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xFB2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xE89 PUSH1 0x2 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xEB3 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xFB2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xEBF PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xECF DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xFD7 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xEDF PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xEF0 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0x1025 JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xF01 PUSH2 0x1133 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xF0F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xF3A JUMPI PUSH2 0xF39 DUP6 PUSH1 0x2 PUSH2 0xF33 DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0x1086 JUMP JUMPDEST MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xF59 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xF85 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xF62 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xFBF DUP3 PUSH1 0x2 DUP4 MLOAD PUSH2 0xC96 JUMP JUMPDEST PUSH2 0xFD2 DUP2 DUP4 PUSH2 0xDDB SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xFDF PUSH2 0x1133 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xFFC JUMPI PUSH2 0xFFB DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0x1018 JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x102D PUSH2 0x1133 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0x104B JUMPI PUSH2 0x104A DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0x1078 JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0x1098 JUMPI DUP3 SWAP1 POP PUSH2 0x109C JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0x10B5 DUP4 DUP4 PUSH2 0xC42 JUMP JUMPDEST POP PUSH2 0x10C0 DUP4 DUP3 PUSH2 0xDDB JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x112D PUSH2 0x1133 JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374687474 PUSH17 0x733A2F2F6D696E2D6170692E6372797074 PUSH16 0x636F6D706172652E636F6D2F64617461 0x2F PUSH17 0x726963656D756C746966756C6C3F667379 PUSH14 0x733D455448267473796D733D5553 DIFFICULTY LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4B SELFBALANCE MLOAD 0xC5 DUP14 AND SHL 0x2B 0xB0 0x4C 0xB8 PUSH17 0xBFA9482996157A97E1498544D06BCDA98F SWAP13 SLOAD 0xEA PUSH5 0x736F6C6343 STOP MOD MOD STOP CALLER ", | |
| "sourceMap": "232:3277:0:-:0;;;1163:1:2;1132:32;;571:218:0;5:9:-1;2:2;;;27:1;24;17:12;2:2;571:218:0;602:25;:23;;;:25;;:::i;:::-;646:42;637:6;;:51;;;;;;;;;;;;;;;;;;698:42;:5;:42;;;;756:14;750:3;:20;;;;232:3277;;5051:123:2;5101:68;951:42;5119:47;;;:49;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5119:49:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5119:49:2;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;5119:49:2;;;;;;;;;;;;;;;;5101:17;;;:68;;:::i;:::-;5051:123::o;4834:94::-;4917:5;4891:4;;:32;;;;;;;;;;;;;;;;;;4834:94;:::o;232:3277:0:-;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "608060405234801561001057600080fd5b506004361061004c5760003560e01c80634357855e146100515780636021abac146100895780638dc654a2146100a7578063c618a1e4146100b1575b600080fd5b6100876004803603604081101561006757600080fd5b8101908080359060200190929190803590602001909291905050506100cf565b005b6100916101f6565b6040518082815260200191505060405180910390f35b6100af610384565b005b6100b961057e565b6040518082815260200191505060405180910390f35b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806111716028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600681905550505050565b60006102006110c6565b61021460085430634357855e60e01b610584565b90506102786040518060400160405280600381526020017f676574000000000000000000000000000000000000000000000000000000000081525060405180608001604052806049815260200161119960499139836105b59092919063ffffffff16565b6102f76040518060400160405280600481526020017f70617468000000000000000000000000000000000000000000000000000000008152506040518060400160405280601881526020017f5241572e4554482e5553442e564f4c554d453234484f55520000000000000000815250836105b59092919063ffffffff16565b6000670de0b6b3a7640000905061034e6040518060400160405280600581526020017f74696d657300000000000000000000000000000000000000000000000000000081525082846105e89092919063ffffffff16565b61037d600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360095461061b565b9250505090565b600061038e6108d3565b90508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561042a57600080fd5b505afa15801561043e573d6000803e3d6000fd5b505050506040513d602081101561045457600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104ce57600080fd5b505af11580156104e2573d6000803e3d6000fd5b505050506040513d60208110156104f857600080fd5b810190808051906020019092919050505061057b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f556e61626c6520746f207472616e73666572000000000000000000000000000081525060200191505060405180910390fd5b50565b60065481565b61058c6110c6565b6105946110c6565b6105ab858585846108fd909392919063ffffffff16565b9150509392505050565b6105cc8284608001516109ad90919063ffffffff16565b6105e38184608001516109ad90919063ffffffff16565b505050565b6105ff8284608001516109ad90919063ffffffff16565b6106168184608001516109d290919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea0858461075387610a76565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107da5780820151818401526020810190506107bf565b50505050905090810190601f1680156108075780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561082857600080fd5b505af115801561083c573d6000803e3d6000fd5b505050506040513d602081101561085257600080fd5b81019080805190602001909291905050506108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061114e6023913960400191505060405180910390fd5b60016004600082825401925050819055508090509392505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6109056110c6565b6109158560800151610100610c42565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b6109ba8260038351610c96565b6109cd8183610ddb90919063ffffffff16565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000811215610a0957610a048282610dfd565b610a72565b67ffffffffffffffff811315610a2857610a238282610e6b565b610a71565b60008112610a4157610a3c82600083610c96565b610a70565b610a6f826001837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03610c96565b5b5b5b5050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ba5578082015181840152602081019050610b8a565b50505050905090810190601f168015610bd25780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b610c4a611133565b600060208381610c5657fe5b0614610c6f5760208281610c6657fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b60178111610cc357610cbd8160058460ff16901b60ff161784610eb790919063ffffffff16565b50610dd6565b60ff8111610d0557610ce8601860058460ff16901b1784610eb790919063ffffffff16565b50610cff81600185610ed79092919063ffffffff16565b50610dd5565b61ffff8111610d4857610d2b601960058460ff16901b1784610eb790919063ffffffff16565b50610d4281600285610ed79092919063ffffffff16565b50610dd4565b63ffffffff8111610d8d57610d70601a60058460ff16901b1784610eb790919063ffffffff16565b50610d8781600485610ed79092919063ffffffff16565b50610dd3565b67ffffffffffffffff8111610dd257610db9601b60058460ff16901b1784610eb790919063ffffffff16565b50610dd081600885610ed79092919063ffffffff16565b505b5b5b5b5b505050565b610de3611133565b610df583846000015151848551610ef9565b905092915050565b610e1b60036005600660ff16901b1783610eb790919063ffffffff16565b50610e6782827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0360405160200180828152602001915050604051602081830303815290604052610fb2565b5050565b610e8960026005600660ff16901b1783610eb790919063ffffffff16565b50610eb3828260405160200180828152602001915050604051602081830303815290604052610fb2565b5050565b610ebf611133565b610ecf8384600001515184610fd7565b905092915050565b610edf611133565b610ef0848560000151518585611025565b90509392505050565b610f01611133565b8251821115610f0f57600080fd5b84602001518285011115610f3a57610f39856002610f338860200151888701611086565b026110a2565b5b600080865180518760208301019350808887011115610f595787860182525b60208701925050505b60208410610f855780518252602082019150602081019050602084039350610f62565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610fbf8260028351610c96565b610fd28183610ddb90919063ffffffff16565b505050565b610fdf611133565b83602001518310610ffc57610ffb8460028660200151026110a2565b5b8351805160208583010184815381861415611018576001820183525b5050508390509392505050565b61102d611133565b8460200151848301111561104b5761104a856002868501026110a2565b5b60006001836101000a03905085518386820101858319825116178152815185880111156110785784870182525b505085915050949350505050565b6000818311156110985782905061109c565b8190505b92915050565b6060826000015190506110b58383610c42565b506110c08382610ddb565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815260200161112d611133565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f6620746865207265717565737468747470733a2f2f6d696e2d6170692e63727970746f636f6d706172652e636f6d2f646174612f70726963656d756c746966756c6c3f6673796d733d455448267473796d733d555344a26469706673582212204b4751c58d161b2bb04cb870bfa9482996157a97e1498544d06bcda98f9c54ea64736f6c63430006060033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4357855E EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0x6021ABAC EQ PUSH2 0x89 JUMPI DUP1 PUSH4 0x8DC654A2 EQ PUSH2 0xA7 JUMPI DUP1 PUSH4 0xC618A1E4 EQ PUSH2 0xB1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x87 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0xCF JUMP JUMPDEST STOP JUMPDEST PUSH2 0x91 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAF PUSH2 0x384 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB9 PUSH2 0x57E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x187 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1171 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x6 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x214 PUSH1 0x8 SLOAD ADDRESS PUSH4 0x4357855E PUSH1 0xE0 SHL PUSH2 0x584 JUMP JUMPDEST SWAP1 POP PUSH2 0x278 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6765740000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1199 PUSH1 0x49 SWAP2 CODECOPY DUP4 PUSH2 0x5B5 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x2F7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7061746800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x18 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5241572E4554482E5553442E564F4C554D453234484F55520000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x5B5 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 SWAP1 POP PUSH2 0x34E PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x74696D6573000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP3 DUP5 PUSH2 0x5E8 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37D PUSH1 0x7 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x9 SLOAD PUSH2 0x61B JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38E PUSH2 0x8D3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xA9059CBB CALLER DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x42A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x43E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x454 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4E2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x57B JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH32 0x556E61626C6520746F207472616E736665720000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x58C PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x594 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x5AB DUP6 DUP6 DUP6 DUP5 PUSH2 0x8FD SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5CC DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x5E3 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x5FF DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9AD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x616 DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x9D2 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x753 DUP8 PUSH2 0xA76 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x7DA JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x7BF JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x807 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x828 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x83C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x852 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x8B8 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x114E PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP1 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x905 PUSH2 0x10C6 JUMP JUMPDEST PUSH2 0x915 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0xC42 JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x9BA DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0xC96 JUMP JUMPDEST PUSH2 0x9CD DUP2 DUP4 PUSH2 0xDDB SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 DUP2 SLT ISZERO PUSH2 0xA09 JUMPI PUSH2 0xA04 DUP3 DUP3 PUSH2 0xDFD JUMP JUMPDEST PUSH2 0xA72 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 SGT ISZERO PUSH2 0xA28 JUMPI PUSH2 0xA23 DUP3 DUP3 PUSH2 0xE6B JUMP JUMPDEST PUSH2 0xA71 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT PUSH2 0xA41 JUMPI PUSH2 0xA3C DUP3 PUSH1 0x0 DUP4 PUSH2 0xC96 JUMP JUMPDEST PUSH2 0xA70 JUMP JUMPDEST PUSH2 0xA6F DUP3 PUSH1 0x1 DUP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH2 0xC96 JUMP JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xBA5 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xB8A JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xBD2 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC4A PUSH2 0x1133 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0xC56 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0xC6F JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0xC66 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0xCC3 JUMPI PUSH2 0xCBD DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD6 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0xD05 JUMPI PUSH2 0xCE8 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xCFF DUP2 PUSH1 0x1 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD5 JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0xD48 JUMPI PUSH2 0xD2B PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD42 DUP2 PUSH1 0x2 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD4 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xD8D JUMPI PUSH2 0xD70 PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xD87 DUP2 PUSH1 0x4 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD3 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0xDD2 JUMPI PUSH2 0xDB9 PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xDD0 DUP2 PUSH1 0x8 DUP6 PUSH2 0xED7 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xDE3 PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xDF5 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xEF9 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xE1B PUSH1 0x3 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xE67 DUP3 DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xFB2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xE89 PUSH1 0x2 PUSH1 0x5 PUSH1 0x6 PUSH1 0xFF AND SWAP1 SHL OR DUP4 PUSH2 0xEB7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0xEB3 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0xFB2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xEBF PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xECF DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xFD7 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xEDF PUSH2 0x1133 JUMP JUMPDEST PUSH2 0xEF0 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0x1025 JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xF01 PUSH2 0x1133 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xF0F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xF3A JUMPI PUSH2 0xF39 DUP6 PUSH1 0x2 PUSH2 0xF33 DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0x1086 JUMP JUMPDEST MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xF59 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xF85 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xF62 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xFBF DUP3 PUSH1 0x2 DUP4 MLOAD PUSH2 0xC96 JUMP JUMPDEST PUSH2 0xFD2 DUP2 DUP4 PUSH2 0xDDB SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xFDF PUSH2 0x1133 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xFFC JUMPI PUSH2 0xFFB DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0x1018 JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x102D PUSH2 0x1133 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0x104B JUMPI PUSH2 0x104A DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0x10A2 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0x1078 JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0x1098 JUMPI DUP3 SWAP1 POP PUSH2 0x109C JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0x10B5 DUP4 DUP4 PUSH2 0xC42 JUMP JUMPDEST POP PUSH2 0x10C0 DUP4 DUP3 PUSH2 0xDDB JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x112D PUSH2 0x1133 JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374687474 PUSH17 0x733A2F2F6D696E2D6170692E6372797074 PUSH16 0x636F6D706172652E636F6D2F64617461 0x2F PUSH17 0x726963656D756C746966756C6C3F667379 PUSH14 0x733D455448267473796D733D5553 DIFFICULTY LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4B SELFBALANCE MLOAD 0xC5 DUP14 AND SHL 0x2B 0xB0 0x4C 0xB8 PUSH17 0xBFA9482996157A97E1498544D06BCDA98F SWAP13 SLOAD 0xEA PUSH5 0x736F6C6343 STOP MOD MOD STOP CALLER ", | |
| "sourceMap": "232:3277:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;232:3277:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;2937:137:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;2937:137:0;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1783:1076;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3276:231;;;:::i;:::-;;281:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2937:137;3025:10;8743:15:2;:27;8759:10;8743:27;;;;;;;;;;;;;;;;;;;;;8729:41;;:10;:41;;;8721:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8840:15;:27;8856:10;8840:27;;;;;;;;;;;;8833:34;;;;;;;;;;;8897:10;8878:30;;;;;;;;;;3060:7:0::1;3051:6;:16;;;;2937:137:::0;;;:::o;1783:1076::-;1828:17;1862:32;;:::i;:::-;1897:66;1919:5;;1934:4;1941:21;;;1897;:66::i;:::-;1862:101;;2035:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;:11;;:95;;;;;:::i;:::-;2544:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;:11;;:47;;;;;:::i;:::-;2683:15;2701:6;2683:24;;2717:36;;;;;;;;;;;;;;;;;;2741:11;2717:7;:14;;:36;;;;;:::i;:::-;2808:44;2831:6;;;;;;;;;;;2839:7;2848:3;;2808:22;:44::i;:::-;2801:51;;;;1783:1076;:::o;3276:231::-;3319:28;3369:23;:21;:23::i;:::-;3319:74;;3411:9;:18;;;3430:10;3442:9;:19;;;3470:4;3442:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3442:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3442:34:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;3442:34:0;;;;;;;;;;;;;;;;3411:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3411:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3411:66:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;3411:66:0;;;;;;;;;;;;;;;;3403:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3276:231;:::o;281:21::-;;;;:::o;1767:295:2:-;1915:24;;:::i;:::-;1947:28;;:::i;:::-;1988:69;2003:7;2012:16;2030:26;1988:3;:14;;:69;;;;;;:::i;:::-;1981:76;;;1767:295;;;;;:::o;1988:169:1:-;2090:27;2112:4;2090;:8;;;:21;;:27;;;;:::i;:::-;2123:29;2145:6;2123:4;:8;;;:21;;:29;;;;:::i;:::-;1988:169;;;:::o;2741:162::-;2839:27;2861:4;2839;:8;;;:21;;:27;;;;:::i;:::-;2872:26;2891:6;2872:4;:8;;;:18;;:26;;;;:::i;:::-;2741:162;;;:::o;3072:488:2:-;3196:17;3262:4;3268:12;;3245:36;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3245:36:2;;;3235:47;;;;;;3223:59;;3301:12;;3288:4;:10;;:25;;;;;3348:7;3319:15;:26;3335:9;3319:26;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;3385:9;3366:29;;;;;;;;;;3409:4;;;;;;;;;;;:20;;;3430:7;3439:8;3449:19;3463:4;3449:13;:19::i;:::-;3409:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3409:60:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3409:60:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3409:60:2;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;3409:60:2;;;;;;;;;;;;;;;;3401:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3531:1;3515:12;;:17;;;;;;;;;;;3546:9;3539:16;;3072:488;;;;;:::o;5293:110::-;5361:7;5393:4;;;;;;;;;;;5378:20;;5293:110;:::o;998:365:1:-;1147:24;;:::i;:::-;1179:49;1200:4;:8;;;365:3;1179:20;:49::i;:::-;;1244:3;1234:4;:7;;:13;;;;;1276:16;1253:4;:20;;:39;;;;;;;;;;;1324:17;1298:4;:23;;:43;;;;;;;;;;;;;1354:4;1347:11;;998:365;;;;;;:::o;2793:210:8:-;2913:55;2924:3;386:1;2954:5;2948:19;2913:10;:55::i;:::-;2974:24;2991:5;2974:3;:10;;:24;;;;:::i;:::-;;2793:210;;:::o;1690:424::-;1808:20;1800:5;:28;1797:313;;;1838:30;1857:3;1862:5;1838:18;:30::i;:::-;1797:313;;;1892:18;1884:5;:26;1881:229;;;1920:24;1933:3;1938:5;1920:12;:24::i;:::-;1881:229;;;1969:1;1960:5;:10;1957:153;;1980:44;1991:3;237:1;2017:5;1980:10;:44::i;:::-;1957:153;;;2045:58;2056:3;291:1;2096:5;2091:2;:10;2045;:58::i;:::-;1957:153;1881:229;1797:313;1690:424;;:::o;7564:527:2:-;7652:12;7711:29;;;719:1;663;7961:4;:7;;;7976:4;:20;;;8004:4;:23;;;8035:4;:10;;;765:1;8073:4;:8;;;:12;;;7681:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;7681:405:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;7681:405:2;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;7681:405:2;7674:412;;7564:527;;;:::o;982:395:7:-;1052:13;;:::i;:::-;1094:1;1088:2;1077:8;:13;;;;;;:18;1073:71;;1134:2;1123:8;:13;;;;;;1117:2;:20;1105:32;;;;1073:71;1206:8;1191:3;:12;;:23;;;;;1254:4;1248:11;1278:3;1273;1266:16;1301:1;1296:3;1289:14;1340:8;1335:3;1331:18;1327:2;1323:27;1317:4;1310:41;1229:128;1369:3;1362:10;;982:395;;;;:::o;685:670:8:-;822:2;813:5;:11;810:541;;834:44;871:5;866:1;857:5;:10;;;;856:20;;;834:3;:15;;:44;;;;:::i;:::-;;810:541;;;903:4;894:5;:13;891:460;;917:41;954:2;949:1;940:5;:10;;;;939:17;917:3;:15;;:41;;;;:::i;:::-;;966:23;980:5;987:1;966:3;:13;;:23;;;;;:::i;:::-;;891:460;;;1014:6;1005:5;:15;1002:349;;1030:41;1067:2;1062:1;1053:5;:10;;;;1052:17;1030:3;:15;;:41;;;;:::i;:::-;;1079:23;1093:5;1100:1;1079:3;:13;;:23;;;;;:::i;:::-;;1002:349;;;1127:10;1118:5;:19;1115:236;;1147:41;1184:2;1179:1;1170:5;:10;;;;1169:17;1147:3;:15;;:41;;;;:::i;:::-;;1196:23;1210:5;1217:1;1196:3;:13;;:23;;;;;:::i;:::-;;1115:236;;;1244:18;1235:5;:27;1232:119;;1272:41;1309:2;1304:1;1295:5;:10;;;;1294:17;1272:3;:15;;:41;;;;:::i;:::-;;1321:23;1335:5;1342:1;1321:3;:13;;:23;;;;;:::i;:::-;;1232:119;1115:236;1002:349;891:460;810:541;685:670;;;:::o;4536:155:7:-;4613:13;;:::i;:::-;4641:45;4647:3;4652;:7;;;:14;4668:4;4674;:11;4641:5;:45::i;:::-;4634:52;;4536:155;;;;:::o;2544:245:8:-;2660:72;679:1;2701;523;2683:19;;;;2682:48;2660:3;:15;;:72;;;;:::i;:::-;;2738:46;2750:3;2776:5;2771:2;:10;2755:28;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2755:28:8;;;2738:11;:46::i;:::-;2544:245;;:::o;2315:225::-;2425:63;624:1;2466;523;2448:19;;;;2447:39;2425:3;:15;;:63;;;;:::i;:::-;;2494:41;2506:3;2527:5;2511:23;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2511:23:8;;;2494:11;:41::i;:::-;2315:225;;:::o;5851:144:7:-;5925:13;;:::i;:::-;5953:37;5964:3;5969;:7;;;:14;5985:4;5953:10;:37::i;:::-;5946:44;;5851:144;;;;:::o;9543:154::-;9624:13;;:::i;:::-;9652:40;9661:3;9666;:7;;;:14;9682:4;9688:3;9652:8;:40::i;:::-;9645:47;;9543:154;;;;;:::o;2691:1140::-;2786:13;;:::i;:::-;2822:4;:11;2815:3;:18;;2807:27;;12:1:-1;9;2:12;2807:27:7;2857:3;:12;;;2851:3;2845;:9;:24;2841:90;;;2879:45;2886:3;2922:1;2891:28;2895:3;:12;;;2915:3;2909;:9;2891:3;:28::i;:::-;:32;2879:6;:45::i;:::-;2841:90;2937:9;2952:8;3046:3;3040:10;3117:6;3111:13;3233:3;3228:2;3220:6;3216:15;3212:25;3204:33;;3317:6;3311:3;3306;3302:13;3299:25;3296:2;;;3359:3;3354;3350:13;3342:6;3335:29;3296:2;3396;3390:4;3386:13;3379:20;;2975:430;;3457:129;3471:2;3464:3;:9;3457:129;;3532:3;3526:10;3520:4;3513:24;3560:2;3552:10;;;;3577:2;3570:9;;;;3482:2;3475:9;;;;3457:129;;;3620:9;3652:1;3645:3;3640:2;:8;3632:3;:17;:21;3620:33;;3711:4;3707:9;3701:3;3695:10;3691:26;3757:4;3750;3744:11;3740:22;3795:7;3785:8;3782:21;3776:4;3769:35;3668:142;;3823:3;3816:10;;;;;2691:1140;;;;;;:::o;2118:193:8:-;2236:47;2247:3;338:1;2270:5;:12;2236:10;:47::i;:::-;2289:17;2300:5;2289:3;:10;;:17;;;;:::i;:::-;;2118:193;;:::o;4985:619:7:-;5068:13;;:::i;:::-;5100:3;:12;;;5093:3;:19;5089:69;;5122:29;5129:3;5149:1;5134:3;:12;;;:16;5122:6;:29::i;:::-;5089:69;5244:3;5238:10;5315:6;5309:13;5427:2;5421:3;5413:6;5409:16;5405:25;5451:4;5445;5437:19;5522:6;5517:3;5514:15;5511:2;;;5567:1;5559:6;5555:14;5547:6;5540:30;5511:2;5173:411;;;5596:3;5589:10;;4985:619;;;;;:::o;8650:642::-;8739:13;;:::i;:::-;8776:3;:12;;;8770:3;8764;:9;:24;8760:73;;;8798:28;8805:3;8824:1;8817:3;8811;:9;8810:15;8798:6;:28::i;:::-;8760:73;8839:9;8864:1;8858:3;8851;:10;:14;8839:26;;8951:3;8945:10;9066:3;9060;9052:6;9048:16;9044:26;9122:4;9114;9110:9;9103:4;9097:11;9093:27;9090:37;9084:4;9077:51;9210:6;9204:13;9198:3;9193;9189:13;9186:32;9183:2;;;9253:3;9248;9244:13;9236:6;9229:29;9183:2;8880:392;;9284:3;9277:10;;;8650:642;;;;;;:::o;1929:114::-;1979:4;1999:1;1995;:5;1991:34;;;2017:1;2010:8;;;;1991:34;2037:1;2030:8;;1929:114;;;;;:::o;1772:153::-;1841:19;1863:3;:7;;;1841:29;;1876:19;1881:3;1886:8;1876:4;:19::i;:::-;;1901;1908:3;1913:6;1901;:19::i;:::-;;1772:153;;;:::o;232:3277:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "926200", | |
| "executionCost": "infinite", | |
| "totalCost": "infinite" | |
| }, | |
| "external": { | |
| "fulfill(bytes32,uint256)": "infinite", | |
| "requestVolumeData()": "infinite", | |
| "volume()": "1049", | |
| "withdrawLink()": "infinite" | |
| } | |
| }, | |
| "methodIdentifiers": { | |
| "fulfill(bytes32,uint256)": "4357855e", | |
| "requestVolumeData()": "6021abac", | |
| "volume()": "c618a1e4", | |
| "withdrawLink()": "8dc654a2" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_volume", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfill", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "requestVolumeData", | |
| "outputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "volume", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "withdrawLink", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.6+commit.6c089d02" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_volume", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfill", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "requestVolumeData", | |
| "outputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "requestId", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "volume", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "withdrawLink", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "methods": {} | |
| }, | |
| "userdoc": { | |
| "methods": { | |
| "constructor": "Network: Kovan Chainlink - 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e Chainlink - 29fa9aa13bf1468788b7cc4a500a45b8 Fee: 0.1 LINK", | |
| "fulfill(bytes32,uint256)": { | |
| "notice": "Receive the response in the form of uint256" | |
| }, | |
| "requestVolumeData()": { | |
| "notice": "Create a Chainlink request to retrieve API response, find the target data, then multiply by 1000000000000000000 (to remove decimal places from data).************************************************************************************ STOP! * THIS FUNCTION WILL FAIL IF THIS CONTRACT DOES NOT OWN LINK * ---------------------------------------------------------- * Learn how to obtain testnet LINK and fund this contract: * ------- https://docs.chain.link/docs/acquire-link -------- * ---- https://docs.chain.link/docs/fund-your-contract ----- * ************************************************************************************" | |
| }, | |
| "withdrawLink()": { | |
| "notice": "Withdraw LINK from this contract * NOTE: DO NOT USE THIS IN PRODUCTION AS IT CAN BE CALLED BY ANY ADDRESS. THIS IS PURELY FOR EXAMPLE PURPOSES ONLY." | |
| } | |
| } | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "contracts/Chainlink_test.sol": "APIConsumer" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "contracts/Chainlink_test.sol": { | |
| "keccak256": "0xa58f6c2d8c7d197f5646fb510d8b53b6ea9efeb0a552a5141508291d6990ce2a", | |
| "urls": [ | |
| "bzz-raw://152fbd07b6ec3aeb042bda4593dc3a789fb24f81208c5afc0b54a4249ba0b1ce", | |
| "dweb:/ipfs/QmVKMmtFgHv2RJ9EMdMw44i8QDKRWBuJ9Dze9rbokYHzyN" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/Chainlink.sol": { | |
| "keccak256": "0x7bef34fd97f611103c6113025e3d6af755f326069767e72266698f64258e62b6", | |
| "urls": [ | |
| "bzz-raw://82125916319b872093aa8599d2c00bd07d363386a74a4d0268c6edf25c366f82", | |
| "dweb:/ipfs/QmXTnVy1XEw387NduvHHFQNmnzYTwFUhVz95kRvRrcwdHd" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/ChainlinkClient.sol": { | |
| "keccak256": "0x9f8883b8b5b76bba151e5f30d4c353b8a3f15ee3d97117deee4cccd91fe8640f", | |
| "urls": [ | |
| "bzz-raw://ee9b132779ac24df4f8a5e45dfc256acc70eb5e43f715de36593e488f20a44ff", | |
| "dweb:/ipfs/QmagJ1htVpP2ZYLAdHEpSEMx1Xd3csbUHAhLctryVDsNFg" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol": { | |
| "keccak256": "0xe513c0f60edf13da7d82625489cf2008c7b66170f3b1ed1606b84c73f95b17ad", | |
| "urls": [ | |
| "bzz-raw://78e083ef252b80bb63a5aa126bc7283cd9b88767dfdf0190d46802bc32756ecf", | |
| "dweb:/ipfs/QmdTyEQwX5ecoXR1rBh8DLDJpCYVDM85JjjR2sEJdE9wAA" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/ENSInterface.sol": { | |
| "keccak256": "0xdef864af6e516477773ea246b73531b1836de5bea4ac1cfd8be6e7f4b3f3c3fd", | |
| "urls": [ | |
| "bzz-raw://ad3346f5a393cd62d8de678a77d8dc323d8f9e21f0aaa504d0d0b990c8b61477", | |
| "dweb:/ipfs/QmQ2n8329Fzb7Zbzk5wqYvAfKJ9QPwTdCUmm9zUqhL67a1" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { | |
| "keccak256": "0xe245a7be950c94d87bb775ae9ee9fbd693fbe2987778e6ce0b04605ea44b7b68", | |
| "urls": [ | |
| "bzz-raw://bd2c3165d949fc66fe407b96eb3dc2092c7e800f4c073b411bf7b96de3e156c9", | |
| "dweb:/ipfs/QmcfJhR1Np4GsLWnww2Duqks2wEzYk8VDTvCAYy7MisG1r" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/interfaces/PointerInterface.sol": { | |
| "keccak256": "0x08aed19c3bef1ae2d90fc0d9d28a497fd7f312991ed08fedfe545de6b9a476e4", | |
| "urls": [ | |
| "bzz-raw://b2e7b4acfbd4cfbd4c3e266011955954ec0f5a2323647e81b936c66cb35e1b5e", | |
| "dweb:/ipfs/QmXVrpdo76r2WhxE7gJPj3dGycZYKKvK39VNVaB7HyhAbT" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/BufferChainlink.sol": { | |
| "keccak256": "0x14f13139229a2fef8f705f29f91de0bc81bcd5070ec75b4bd3fd82c1536ca685", | |
| "urls": [ | |
| "bzz-raw://9a403d7f17b316c7b8837a25df0563de2a1c3121b7cd43473abce8ce6742bd29", | |
| "dweb:/ipfs/QmWZYi4xJGjPt1pEM7mS7XsA1eF2zpcxiiuGHuiTndXHo7" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/CBORChainlink.sol": { | |
| "keccak256": "0xe7c6e4290ac2a41a138e6bd89d89a2779f66847a5ee6fb5a6f2a3386e5ce589d", | |
| "urls": [ | |
| "bzz-raw://1eb0e7821c4963b125b47c93e31cd6e073d2b87550651054fc526e63915d92ab", | |
| "dweb:/ipfs/QmVJq2sNTzX4Hfyway8JiY4RoQw4vQRSbzJWbsC7JsiyUs" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/vendor/ENSResolver.sol": { | |
| "keccak256": "0xfd992937d215ad669f69e91fefbe62cad8973ae329b4e810ca9b26a1ae0b6bb7", | |
| "urls": [ | |
| "bzz-raw://afb189e69fb705795bf41dea9ff20bab191164fc4876803168372f9bf1a1a0f1", | |
| "dweb:/ipfs/QmUBbNkFiJh9BrPepNVYMpxnEk1a5xqun8VT6Zb2jC3FtV" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "deploy": { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "rinkeby:4": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "kovan:42": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "görli:5": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "Custom": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| } | |
| }, | |
| "data": { | |
| "bytecode": { | |
| "linkReferences": {}, | |
| "object": "6080604052600160045534801561001557600080fd5b506100246100b460201b60201c565b73aa1dc356dc4b18f30c347798fd5379f3d77abc5b600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f323335663862316565623336346566633833633236643062656632643063303160078190555067016345785d8a000060088190555061019d565b61015773c89bd4e1632d3a43cb03aaad5262cbe4038bc57173ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff1660e01b815260040160206040518083038186803b15801561011157600080fd5b505afa158015610125573d6000803e3d6000fd5b505050506040513d602081101561013b57600080fd5b810190808051906020019092919050505061015960201b60201c565b565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610d10806101ac6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632f2bd8fe146100465780636537214714610101578063836facd41461011f575b600080fd5b6100ff6004803603602081101561005c57600080fd5b810190808035906020019064010000000081111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111640100000000831117156100ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610157565b005b6101096101f3565b6040518082815260200191505060405180910390f35b6101556004803603604081101561013557600080fd5b8101908080359060200190929190803590602001909291905050506101f9565b005b61015f610c08565b6101736007543063836facd460e01b610320565b90506101bf6040518060400160405280600481526020017f636974790000000000000000000000000000000000000000000000000000000081525083836103519092919063ffffffff16565b6101ee600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600854610384565b505050565b60095481565b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610cb36028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600981905550505050565b610328610c08565b610330610c08565b6103478585858461060d909392919063ffffffff16565b9150509392505050565b6103688284608001516106bd90919063ffffffff16565b61037f8184608001516106bd90919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea085846104a6876106e2565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105175780820151818401526020810190506104fc565b50505050905090810190601f1680156105445780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561056557600080fd5b505af1158015610579573d6000803e3d6000fd5b505050506040513d602081101561058f57600080fd5b81019080805190602001909291905050506105f5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610c906023913960400191505060405180910390fd5b60016004600082825401925050819055509392505050565b610615610c08565b6106258560800151610100610863565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b6106ca82600383516108b7565b6106dd81836109fc90919063ffffffff16565b505050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107c65780820151818401526020810190506107ab565b50505050905090810190601f1680156107f35780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b61086b610c75565b60006020838161087757fe5b0614610890576020828161088757fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b601781116108e4576108de8160058460ff16901b60ff161784610a1e90919063ffffffff16565b506109f7565b60ff811161092657610909601860058460ff16901b1784610a1e90919063ffffffff16565b5061092081600185610a3e9092919063ffffffff16565b506109f6565b61ffff81116109695761094c601960058460ff16901b1784610a1e90919063ffffffff16565b5061096381600285610a3e9092919063ffffffff16565b506109f5565b63ffffffff81116109ae57610991601a60058460ff16901b1784610a1e90919063ffffffff16565b506109a881600485610a3e9092919063ffffffff16565b506109f4565b67ffffffffffffffff81116109f3576109da601b60058460ff16901b1784610a1e90919063ffffffff16565b506109f181600885610a3e9092919063ffffffff16565b505b5b5b5b5b505050565b610a04610c75565b610a1683846000015151848551610a60565b905092915050565b610a26610c75565b610a368384600001515184610b19565b905092915050565b610a46610c75565b610a57848560000151518585610b67565b90509392505050565b610a68610c75565b8251821115610a7657600080fd5b84602001518285011115610aa157610aa0856002610a9a8860200151888701610bc8565b02610be4565b5b600080865180518760208301019350808887011115610ac05787860182525b60208701925050505b60208410610aec5780518252602082019150602081019050602084039350610ac9565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610b21610c75565b83602001518310610b3e57610b3d846002866020015102610be4565b5b8351805160208583010184815381861415610b5a576001820183525b5050508390509392505050565b610b6f610c75565b84602001518483011115610b8d57610b8c85600286850102610be4565b5b60006001836101000a0390508551838682010185831982511617815281518588011115610bba5784870182525b505085915050949350505050565b600081831115610bda57829050610bde565b8190505b92915050565b606082600001519050610bf78383610863565b50610c0283826109fc565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200160008152602001610c6f610c75565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374a2646970667358221220f60dc712a63f1e2605549cd40ed84b885115185d76f79b9154ea3d2137191aba64736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x24 PUSH2 0xB4 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH20 0xAA1DC356DC4B18F30C347798FD5379F3D77ABC5B PUSH1 0x6 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH32 0x3233356638623165656233363465666338336332366430626566326430633031 PUSH1 0x7 DUP2 SWAP1 SSTORE POP PUSH8 0x16345785D8A0000 PUSH1 0x8 DUP2 SWAP1 SSTORE POP PUSH2 0x19D JUMP JUMPDEST PUSH2 0x157 PUSH20 0xC89BD4E1632D3A43CB03AAAD5262CBE4038BC571 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x38CC4831 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x111 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x125 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x13B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x159 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST JUMP JUMPDEST DUP1 PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH2 0xD10 DUP1 PUSH2 0x1AC PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2F2BD8FE EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x65372147 EQ PUSH2 0x101 JUMPI DUP1 PUSH4 0x836FACD4 EQ PUSH2 0x11F JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xFF PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0x79 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP SWAP2 SWAP3 SWAP2 SWAP3 SWAP1 POP POP POP PUSH2 0x157 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x109 PUSH2 0x1F3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x155 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x135 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x1F9 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x15F PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x7 SLOAD ADDRESS PUSH4 0x836FACD4 PUSH1 0xE0 SHL PUSH2 0x320 JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6369747900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP4 DUP4 PUSH2 0x351 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x1EE PUSH1 0x6 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH1 0x8 SLOAD PUSH2 0x384 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x9 SLOAD DUP2 JUMP JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x2B1 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCB3 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x9 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH2 0x328 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x330 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x347 DUP6 DUP6 DUP6 DUP5 PUSH2 0x60D SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x368 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x6BD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37F DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x6BD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x4A6 DUP8 PUSH2 0x6E2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x517 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x4FC JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x544 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x565 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x579 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x5F5 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xC90 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x615 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x625 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0x863 JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x6CA DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x6DD DUP2 DUP4 PUSH2 0x9FC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x7C6 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x7AB JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7F3 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x86B PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0x877 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0x890 JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0x887 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0x8E4 JUMPI PUSH2 0x8DE DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F7 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0x926 JUMPI PUSH2 0x909 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x920 DUP2 PUSH1 0x1 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F6 JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0x969 JUMPI PUSH2 0x94C PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x963 DUP2 PUSH1 0x2 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F5 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0x9AE JUMPI PUSH2 0x991 PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9A8 DUP2 PUSH1 0x4 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F4 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0x9F3 JUMPI PUSH2 0x9DA PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F1 DUP2 PUSH1 0x8 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xA04 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA16 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xA60 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xA26 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA36 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xB19 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xA46 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA57 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xB67 JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xA68 PUSH2 0xC75 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xA76 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xAA1 JUMPI PUSH2 0xAA0 DUP6 PUSH1 0x2 PUSH2 0xA9A DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0xBC8 JUMP JUMPDEST MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xAC0 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xAEC JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xAC9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xB21 PUSH2 0xC75 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xB3E JUMPI PUSH2 0xB3D DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0xB5A JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xB6F PUSH2 0xC75 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xB8D JUMPI PUSH2 0xB8C DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0xBBA JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xBDA JUMPI DUP3 SWAP1 POP PUSH2 0xBDE JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0xBF7 DUP4 DUP4 PUSH2 0x863 JUMP JUMPDEST POP PUSH2 0xC02 DUP4 DUP3 PUSH2 0x9FC JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6F PUSH2 0xC75 JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374A26469 PUSH17 0x667358221220F60DC712A63F1E2605549C 0xD4 0xE 0xD8 0x4B DUP9 MLOAD ISZERO XOR 0x5D PUSH23 0xF79B9154EA3D2137191ABA64736F6C634300060C003300 ", | |
| "sourceMap": "148:1449:0:-:0;;;1163:1:2;1132:32;;861:206:0;;;;;;;;;;892:25;:23;;;:25;;:::i;:::-;936:42;927:6;;:51;;;;;;;;;;;;;;;;;;988:42;:5;:42;;;;1046:14;1040:3;:20;;;;148:1449;;5051:123:2;5101:68;951:42;5119:47;;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5101:17;;;:68;;:::i;:::-;5051:123::o;4834:94::-;4917:5;4891:4;;:32;;;;;;;;;;;;;;;;;;4834:94;:::o;148:1449:0:-;;;;;;;" | |
| }, | |
| "deployedBytecode": { | |
| "immutableReferences": {}, | |
| "linkReferences": {}, | |
| "object": "608060405234801561001057600080fd5b50600436106100415760003560e01c80632f2bd8fe146100465780636537214714610101578063836facd41461011f575b600080fd5b6100ff6004803603602081101561005c57600080fd5b810190808035906020019064010000000081111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111640100000000831117156100ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610157565b005b6101096101f3565b6040518082815260200191505060405180910390f35b6101556004803603604081101561013557600080fd5b8101908080359060200190929190803590602001909291905050506101f9565b005b61015f610c08565b6101736007543063836facd460e01b610320565b90506101bf6040518060400160405280600481526020017f636974790000000000000000000000000000000000000000000000000000000081525083836103519092919063ffffffff16565b6101ee600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600854610384565b505050565b60095481565b816005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102b1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610cb36028913960400191505060405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055807f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a60405160405180910390a281600981905550505050565b610328610c08565b610330610c08565b6103478585858461060d909392919063ffffffff16565b9150509392505050565b6103688284608001516106bd90919063ffffffff16565b61037f8184608001516106bd90919063ffffffff16565b505050565b600030600454604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600454836060018181525050836005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550807fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af960405160405180910390a2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634000aea085846104a6876106e2565b6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105175780820151818401526020810190506104fc565b50505050905090810190601f1680156105445780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561056557600080fd5b505af1158015610579573d6000803e3d6000fd5b505050506040513d602081101561058f57600080fd5b81019080805190602001909291905050506105f5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610c906023913960400191505060405180910390fd5b60016004600082825401925050819055509392505050565b610615610c08565b6106258560800151610100610863565b508385600001818152505082856020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508185604001907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050849050949350505050565b6106ca82600383516108b7565b6106dd81836109fc90919063ffffffff16565b505050565b6060634042994660e01b60008084600001518560200151866040015187606001516001896080015160000151604051602401808973ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107c65780820151818401526020810190506107ab565b50505050905090810190601f1680156107f35780820380516001836020036101000a031916815260200191505b509950505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050919050565b61086b610c75565b60006020838161087757fe5b0614610890576020828161088757fe5b06602003820191505b81836020018181525050604051808452600081528281016020016040525082905092915050565b601781116108e4576108de8160058460ff16901b60ff161784610a1e90919063ffffffff16565b506109f7565b60ff811161092657610909601860058460ff16901b1784610a1e90919063ffffffff16565b5061092081600185610a3e9092919063ffffffff16565b506109f6565b61ffff81116109695761094c601960058460ff16901b1784610a1e90919063ffffffff16565b5061096381600285610a3e9092919063ffffffff16565b506109f5565b63ffffffff81116109ae57610991601a60058460ff16901b1784610a1e90919063ffffffff16565b506109a881600485610a3e9092919063ffffffff16565b506109f4565b67ffffffffffffffff81116109f3576109da601b60058460ff16901b1784610a1e90919063ffffffff16565b506109f181600885610a3e9092919063ffffffff16565b505b5b5b5b5b505050565b610a04610c75565b610a1683846000015151848551610a60565b905092915050565b610a26610c75565b610a368384600001515184610b19565b905092915050565b610a46610c75565b610a57848560000151518585610b67565b90509392505050565b610a68610c75565b8251821115610a7657600080fd5b84602001518285011115610aa157610aa0856002610a9a8860200151888701610bc8565b02610be4565b5b600080865180518760208301019350808887011115610ac05787860182525b60208701925050505b60208410610aec5780518252602082019150602081019050602084039350610ac9565b60006001856020036101000a03905080198251168184511681811785525050879350505050949350505050565b610b21610c75565b83602001518310610b3e57610b3d846002866020015102610be4565b5b8351805160208583010184815381861415610b5a576001820183525b5050508390509392505050565b610b6f610c75565b84602001518483011115610b8d57610b8c85600286850102610be4565b5b60006001836101000a0390508551838682010185831982511617815281518588011115610bba5784870182525b505085915050949350505050565b600081831115610bda57829050610bde565b8190505b92915050565b606082600001519050610bf78383610863565b50610c0283826109fc565b50505050565b6040518060a0016040528060008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200160008152602001610c6f610c75565b81525090565b60405180604001604052806060815260200160008152509056fe756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374a2646970667358221220f60dc712a63f1e2605549cd40ed84b885115185d76f79b9154ea3d2137191aba64736f6c634300060c0033", | |
| "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2F2BD8FE EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x65372147 EQ PUSH2 0x101 JUMPI DUP1 PUSH4 0x836FACD4 EQ PUSH2 0x11F JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xFF PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0x79 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP SWAP2 SWAP3 SWAP2 SWAP3 SWAP1 POP POP POP PUSH2 0x157 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x109 PUSH2 0x1F3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x155 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x135 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x1F9 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x15F PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x7 SLOAD ADDRESS PUSH4 0x836FACD4 PUSH1 0xE0 SHL PUSH2 0x320 JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6369747900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP4 DUP4 PUSH2 0x351 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x1EE PUSH1 0x6 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH1 0x8 SLOAD PUSH2 0x384 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x9 SLOAD DUP2 JUMP JUMPDEST DUP2 PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x2B1 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCB3 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 SSTORE DUP1 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 DUP2 PUSH1 0x9 DUP2 SWAP1 SSTORE POP POP POP POP JUMP JUMPDEST PUSH2 0x328 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x330 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x347 DUP6 DUP6 DUP6 DUP5 PUSH2 0x60D SWAP1 SWAP4 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x368 DUP3 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x6BD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH2 0x37F DUP2 DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x6BD SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH1 0x4 SLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 SHL DUP2 MSTORE PUSH1 0x14 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x4 SLOAD DUP4 PUSH1 0x60 ADD DUP2 DUP2 MSTORE POP POP DUP4 PUSH1 0x5 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x4A6 DUP8 PUSH2 0x6E2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x517 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x4FC JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x544 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x565 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x579 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 SWAP3 SWAP2 SWAP1 POP POP POP PUSH2 0x5F5 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xC90 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 PUSH1 0x0 DUP3 DUP3 SLOAD ADD SWAP3 POP POP DUP2 SWAP1 SSTORE POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x615 PUSH2 0xC08 JUMP JUMPDEST PUSH2 0x625 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0x863 JUMP JUMPDEST POP DUP4 DUP6 PUSH1 0x0 ADD DUP2 DUP2 MSTORE POP POP DUP3 DUP6 PUSH1 0x20 ADD SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP2 DUP6 PUSH1 0x40 ADD SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 DUP2 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE POP POP DUP5 SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x6CA DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x6DD DUP2 DUP4 PUSH2 0x9FC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 SHL PUSH1 0x0 DUP1 DUP5 PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD PUSH1 0x1 DUP10 PUSH1 0x80 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x24 ADD DUP1 DUP10 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x7C6 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x7AB JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7F3 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x86B PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 DUP2 PUSH2 0x877 JUMPI INVALID JUMPDEST MOD EQ PUSH2 0x890 JUMPI PUSH1 0x20 DUP3 DUP2 PUSH2 0x887 JUMPI INVALID JUMPDEST MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP4 PUSH1 0x20 ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x40 MLOAD DUP1 DUP5 MSTORE PUSH1 0x0 DUP2 MSTORE DUP3 DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE POP DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0x8E4 JUMPI PUSH2 0x8DE DUP2 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL PUSH1 0xFF AND OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F7 JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0x926 JUMPI PUSH2 0x909 PUSH1 0x18 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x920 DUP2 PUSH1 0x1 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F6 JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0x969 JUMPI PUSH2 0x94C PUSH1 0x19 PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x963 DUP2 PUSH1 0x2 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F5 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0x9AE JUMPI PUSH2 0x991 PUSH1 0x1A PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9A8 DUP2 PUSH1 0x4 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F4 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0x9F3 JUMPI PUSH2 0x9DA PUSH1 0x1B PUSH1 0x5 DUP5 PUSH1 0xFF AND SWAP1 SHL OR DUP5 PUSH2 0xA1E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP PUSH2 0x9F1 DUP2 PUSH1 0x8 DUP6 PUSH2 0xA3E SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP JUMPDEST JUMPDEST JUMPDEST JUMPDEST JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xA04 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA16 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xA60 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xA26 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA36 DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xB19 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xA46 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA57 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xB67 JUMP JUMPDEST SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xA68 PUSH2 0xC75 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xA76 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xAA1 JUMPI PUSH2 0xAA0 DUP6 PUSH1 0x2 PUSH2 0xA9A DUP9 PUSH1 0x20 ADD MLOAD DUP9 DUP8 ADD PUSH2 0xBC8 JUMP JUMPDEST MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xAC0 JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST PUSH1 0x20 DUP8 ADD SWAP3 POP POP POP JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xAEC JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH1 0x20 DUP5 SUB SWAP4 POP PUSH2 0xAC9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP6 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB SWAP1 POP DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP2 DUP2 OR DUP6 MSTORE POP POP DUP8 SWAP4 POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xB21 PUSH2 0xC75 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xB3E JUMPI PUSH2 0xB3D DUP5 PUSH1 0x2 DUP7 PUSH1 0x20 ADD MLOAD MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 DUP2 DUP7 EQ ISZERO PUSH2 0xB5A JUMPI PUSH1 0x1 DUP3 ADD DUP4 MSTORE JUMPDEST POP POP POP DUP4 SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xB6F PUSH2 0xC75 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xB8D JUMPI PUSH2 0xB8C DUP6 PUSH1 0x2 DUP7 DUP6 ADD MUL PUSH2 0xBE4 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP4 PUSH2 0x100 EXP SUB SWAP1 POP DUP6 MLOAD DUP4 DUP7 DUP3 ADD ADD DUP6 DUP4 NOT DUP3 MLOAD AND OR DUP2 MSTORE DUP2 MLOAD DUP6 DUP9 ADD GT ISZERO PUSH2 0xBBA JUMPI DUP5 DUP8 ADD DUP3 MSTORE JUMPDEST POP POP DUP6 SWAP2 POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xBDA JUMPI DUP3 SWAP1 POP PUSH2 0xBDE JUMP JUMPDEST DUP2 SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 DUP3 PUSH1 0x0 ADD MLOAD SWAP1 POP PUSH2 0xBF7 DUP4 DUP4 PUSH2 0x863 JUMP JUMPDEST POP PUSH2 0xC02 DUP4 DUP3 PUSH2 0x9FC JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6F PUSH2 0xC75 JUMP JUMPDEST DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP INVALID PUSH22 0x6E61626C6520746F207472616E73666572416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374A26469 PUSH17 0x667358221220F60DC712A63F1E2605549C 0xD4 0xE 0xD8 0x4B DUP9 MLOAD ISZERO XOR 0x5D PUSH23 0xF79B9154EA3D2137191ABA64736F6C634300060C003300 ", | |
| "sourceMap": "148:1449:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1116:277;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;287:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1444:151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1116:277;1189:28;;:::i;:::-;1220:84;1242:5;;1257:4;1264:39;;;1220:21;:84::i;:::-;1189:115;;1314:22;;;;;;;;;;;;;;;;;;1330:5;1314:3;:7;;:22;;;;;:::i;:::-;1346:40;1369:6;;;;;;;;;;;1377:3;1382;;1346:22;:40::i;:::-;;1116:277;;:::o;287:21::-;;;;:::o;1444:151::-;1550:10;8743:15:2;:27;8759:10;8743:27;;;;;;;;;;;;;;;;;;;;;8729:41;;:10;:41;;;8721:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8840:15;:27;8856:10;8840:27;;;;;;;;;;;;8833:34;;;;;;;;;;;8897:10;8878:30;;;;;;;;;;1581:7:0::1;1572:6;:16;;;;1444:151:::0;;;:::o;1767:295:2:-;1915:24;;:::i;:::-;1947:28;;:::i;:::-;1988:69;2003:7;2012:16;2030:26;1988:3;:14;;:69;;;;;;:::i;:::-;1981:76;;;1767:295;;;;;:::o;1988:169:1:-;2090:27;2112:4;2090;:8;;;:21;;:27;;;;:::i;:::-;2123:29;2145:6;2123:4;:8;;;:21;;:29;;;;:::i;:::-;1988:169;;;:::o;3072:488:2:-;3196:17;3262:4;3268:12;;3245:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3235:47;;;;;;3223:59;;3301:12;;3288:4;:10;;:25;;;;;3348:7;3319:15;:26;3335:9;3319:26;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;3385:9;3366:29;;;;;;;;;;3409:4;;;;;;;;;;;:20;;;3430:7;3439:8;3449:19;3463:4;3449:13;:19::i;:::-;3409:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3401:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3531:1;3515:12;;:17;;;;;;;;;;;3072:488;;;;;:::o;998:365:1:-;1147:24;;:::i;:::-;1179:49;1200:4;:8;;;365:3;1179:20;:49::i;:::-;;1244:3;1234:4;:7;;:13;;;;;1276:16;1253:4;:20;;:39;;;;;;;;;;;1324:17;1298:4;:23;;:43;;;;;;;;;;;;;1354:4;1347:11;;998:365;;;;;;:::o;2793:210:8:-;2913:55;2924:3;386:1;2954:5;2948:19;2913:10;:55::i;:::-;2974:24;2991:5;2974:3;:10;;:24;;;;:::i;:::-;;2793:210;;:::o;7564:527:2:-;7652:12;7711:29;;;719:1;663;7961:4;:7;;;7976:4;:20;;;8004:4;:23;;;8035:4;:10;;;765:1;8073:4;:8;;;:12;;;7681:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7674:412;;7564:527;;;:::o;982:395:7:-;1052:13;;:::i;:::-;1094:1;1088:2;1077:8;:13;;;;;;:18;1073:71;;1134:2;1123:8;:13;;;;;;1117:2;:20;1105:32;;;;1073:71;1206:8;1191:3;:12;;:23;;;;;1254:4;1248:11;1278:3;1273;1266:16;1301:1;1296:3;1289:14;1340:8;1335:3;1331:18;1327:2;1323:27;1317:4;1310:41;1229:128;1369:3;1362:10;;982:395;;;;:::o;685:670:8:-;822:2;813:5;:11;810:541;;834:44;871:5;866:1;857:5;:10;;;;856:20;;;834:3;:15;;:44;;;;:::i;:::-;;810:541;;;903:4;894:5;:13;891:460;;917:41;954:2;949:1;940:5;:10;;;;939:17;917:3;:15;;:41;;;;:::i;:::-;;966:23;980:5;987:1;966:3;:13;;:23;;;;;:::i;:::-;;891:460;;;1014:6;1005:5;:15;1002:349;;1030:41;1067:2;1062:1;1053:5;:10;;;;1052:17;1030:3;:15;;:41;;;;:::i;:::-;;1079:23;1093:5;1100:1;1079:3;:13;;:23;;;;;:::i;:::-;;1002:349;;;1127:10;1118:5;:19;1115:236;;1147:41;1184:2;1179:1;1170:5;:10;;;;1169:17;1147:3;:15;;:41;;;;:::i;:::-;;1196:23;1210:5;1217:1;1196:3;:13;;:23;;;;;:::i;:::-;;1115:236;;;1244:18;1235:5;:27;1232:119;;1272:41;1309:2;1304:1;1295:5;:10;;;;1294:17;1272:3;:15;;:41;;;;:::i;:::-;;1321:23;1335:5;1342:1;1321:3;:13;;:23;;;;;:::i;:::-;;1232:119;1115:236;1002:349;891:460;810:541;685:670;;;:::o;4536:155:7:-;4613:13;;:::i;:::-;4641:45;4647:3;4652;:7;;;:14;4668:4;4674;:11;4641:5;:45::i;:::-;4634:52;;4536:155;;;;:::o;5851:144::-;5925:13;;:::i;:::-;5953:37;5964:3;5969;:7;;;:14;5985:4;5953:10;:37::i;:::-;5946:44;;5851:144;;;;:::o;9543:154::-;9624:13;;:::i;:::-;9652:40;9661:3;9666;:7;;;:14;9682:4;9688:3;9652:8;:40::i;:::-;9645:47;;9543:154;;;;;:::o;2691:1140::-;2786:13;;:::i;:::-;2822:4;:11;2815:3;:18;;2807:27;;;;;;2857:3;:12;;;2851:3;2845;:9;:24;2841:90;;;2879:45;2886:3;2922:1;2891:28;2895:3;:12;;;2915:3;2909;:9;2891:3;:28::i;:::-;:32;2879:6;:45::i;:::-;2841:90;2937:9;2952:8;3046:3;3040:10;3117:6;3111:13;3233:3;3228:2;3220:6;3216:15;3212:25;3204:33;;3317:6;3311:3;3306;3302:13;3299:25;3296:2;;;3359:3;3354;3350:13;3342:6;3335:29;3296:2;3396;3390:4;3386:13;3379:20;;2975:430;;3457:129;3471:2;3464:3;:9;3457:129;;3532:3;3526:10;3520:4;3513:24;3560:2;3552:10;;;;3577:2;3570:9;;;;3482:2;3475:9;;;;3457:129;;;3620:9;3652:1;3645:3;3640:2;:8;3632:3;:17;:21;3620:33;;3711:4;3707:9;3701:3;3695:10;3691:26;3757:4;3750;3744:11;3740:22;3795:7;3785:8;3782:21;3776:4;3769:35;3668:142;;3823:3;3816:10;;;;;2691:1140;;;;;;:::o;4985:619::-;5068:13;;:::i;:::-;5100:3;:12;;;5093:3;:19;5089:69;;5122:29;5129:3;5149:1;5134:3;:12;;;:16;5122:6;:29::i;:::-;5089:69;5244:3;5238:10;5315:6;5309:13;5427:2;5421:3;5413:6;5409:16;5405:25;5451:4;5445;5437:19;5522:6;5517:3;5514:15;5511:2;;;5567:1;5559:6;5555:14;5547:6;5540:30;5511:2;5173:411;;;5596:3;5589:10;;4985:619;;;;;:::o;8650:642::-;8739:13;;:::i;:::-;8776:3;:12;;;8770:3;8764;:9;:24;8760:73;;;8798:28;8805:3;8824:1;8817:3;8811;:9;8810:15;8798:6;:28::i;:::-;8760:73;8839:9;8864:1;8858:3;8851;:10;:14;8839:26;;8951:3;8945:10;9066:3;9060;9052:6;9048:16;9044:26;9122:4;9114;9110:9;9103:4;9097:11;9093:27;9090:37;9084:4;9077:51;9210:6;9204:13;9198:3;9193;9189:13;9186:32;9183:2;;;9253:3;9248;9244:13;9236:6;9229:29;9183:2;8880:392;;9284:3;9277:10;;;8650:642;;;;;;:::o;1929:114::-;1979:4;1999:1;1995;:5;1991:34;;;2017:1;2010:8;;;;1991:34;2037:1;2030:8;;1929:114;;;;;:::o;1772:153::-;1841:19;1863:3;:7;;;1841:29;;1876:19;1881:3;1886:8;1876:4;:19::i;:::-;;1901;1908:3;1913:6;1901;:19::i;:::-;;1772:153;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o" | |
| }, | |
| "gasEstimates": { | |
| "creation": { | |
| "codeDepositCost": "668800", | |
| "executionCost": "infinite", | |
| "totalCost": "infinite" | |
| }, | |
| "external": { | |
| "fulfillWeatherTemperature(bytes32,uint256)": "infinite", | |
| "requestWeatherTemperature(string)": "infinite", | |
| "result()": "1005" | |
| } | |
| }, | |
| "methodIdentifiers": { | |
| "fulfillWeatherTemperature(bytes32,uint256)": "836facd4", | |
| "requestWeatherTemperature(string)": "2f2bd8fe", | |
| "result()": "65372147" | |
| } | |
| }, | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_result", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfillWeatherTemperature", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "_city", | |
| "type": "string" | |
| } | |
| ], | |
| "name": "requestWeatherTemperature", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "result", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "compiler": { | |
| "version": "0.6.12+commit.27d51765" | |
| }, | |
| "language": "Solidity", | |
| "output": { | |
| "abi": [ | |
| { | |
| "inputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "constructor" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkCancelled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkFulfilled", | |
| "type": "event" | |
| }, | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "bytes32", | |
| "name": "id", | |
| "type": "bytes32" | |
| } | |
| ], | |
| "name": "ChainlinkRequested", | |
| "type": "event" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "bytes32", | |
| "name": "_requestId", | |
| "type": "bytes32" | |
| }, | |
| { | |
| "internalType": "uint256", | |
| "name": "_result", | |
| "type": "uint256" | |
| } | |
| ], | |
| "name": "fulfillWeatherTemperature", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [ | |
| { | |
| "internalType": "string", | |
| "name": "_city", | |
| "type": "string" | |
| } | |
| ], | |
| "name": "requestWeatherTemperature", | |
| "outputs": [], | |
| "stateMutability": "nonpayable", | |
| "type": "function" | |
| }, | |
| { | |
| "inputs": [], | |
| "name": "result", | |
| "outputs": [ | |
| { | |
| "internalType": "uint256", | |
| "name": "", | |
| "type": "uint256" | |
| } | |
| ], | |
| "stateMutability": "view", | |
| "type": "function" | |
| } | |
| ], | |
| "devdoc": { | |
| "kind": "dev", | |
| "methods": {}, | |
| "version": 1 | |
| }, | |
| "userdoc": { | |
| "kind": "user", | |
| "methods": { | |
| "constructor": "Network: Kovan Oracle: Name: Alpha Chain - Kovan Listing URL: https://market.link/nodes/ef076e87-49f4-486b-9878-c4806781c7a0?start=1614168653&end=1614773453 Address: 0xAA1DC356dc4B18f30C347798FD5379F3D77ABC5b Job: Name: OpenWeather Data Listing URL: https://market.link/jobs/e10388e6-1a8a-4ff5-bad6-dd930049a65f ID: 235f8b1eeb364efc83c26d0bef2d0c01 Fee: 0.1 LINK", | |
| "fulfillWeatherTemperature(bytes32,uint256)": { | |
| "notice": "Callback function" | |
| }, | |
| "requestWeatherTemperature(string)": { | |
| "notice": "Initial request" | |
| } | |
| }, | |
| "version": 1 | |
| } | |
| }, | |
| "settings": { | |
| "compilationTarget": { | |
| "contracts/Openweather.sol": "OpenWeatherConsumer" | |
| }, | |
| "evmVersion": "istanbul", | |
| "libraries": {}, | |
| "metadata": { | |
| "bytecodeHash": "ipfs" | |
| }, | |
| "optimizer": { | |
| "enabled": false, | |
| "runs": 200 | |
| }, | |
| "remappings": [] | |
| }, | |
| "sources": { | |
| "contracts/Openweather.sol": { | |
| "keccak256": "0x243a4d715bdb2e75c2dfdcc116ec666306d010e352e6aa4efb2d3cb5ea3049d0", | |
| "urls": [ | |
| "bzz-raw://43f21b3c57f4b7d2df067b58166a6032cc4dbd76108a1b5c0e82709ad06eeac2", | |
| "dweb:/ipfs/QmbgxLnCp1rUYBrEDzTF52bWwSQcMMGrKhpoQNRU34fsMW" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/Chainlink.sol": { | |
| "keccak256": "0x7bef34fd97f611103c6113025e3d6af755f326069767e72266698f64258e62b6", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://82125916319b872093aa8599d2c00bd07d363386a74a4d0268c6edf25c366f82", | |
| "dweb:/ipfs/QmXTnVy1XEw387NduvHHFQNmnzYTwFUhVz95kRvRrcwdHd" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/ChainlinkClient.sol": { | |
| "keccak256": "0x9f8883b8b5b76bba151e5f30d4c353b8a3f15ee3d97117deee4cccd91fe8640f", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ee9b132779ac24df4f8a5e45dfc256acc70eb5e43f715de36593e488f20a44ff", | |
| "dweb:/ipfs/QmagJ1htVpP2ZYLAdHEpSEMx1Xd3csbUHAhLctryVDsNFg" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol": { | |
| "keccak256": "0xe513c0f60edf13da7d82625489cf2008c7b66170f3b1ed1606b84c73f95b17ad", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://78e083ef252b80bb63a5aa126bc7283cd9b88767dfdf0190d46802bc32756ecf", | |
| "dweb:/ipfs/QmdTyEQwX5ecoXR1rBh8DLDJpCYVDM85JjjR2sEJdE9wAA" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/interfaces/ENSInterface.sol": { | |
| "keccak256": "0xdef864af6e516477773ea246b73531b1836de5bea4ac1cfd8be6e7f4b3f3c3fd", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://ad3346f5a393cd62d8de678a77d8dc323d8f9e21f0aaa504d0d0b990c8b61477", | |
| "dweb:/ipfs/QmQ2n8329Fzb7Zbzk5wqYvAfKJ9QPwTdCUmm9zUqhL67a1" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { | |
| "keccak256": "0xe245a7be950c94d87bb775ae9ee9fbd693fbe2987778e6ce0b04605ea44b7b68", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://bd2c3165d949fc66fe407b96eb3dc2092c7e800f4c073b411bf7b96de3e156c9", | |
| "dweb:/ipfs/QmcfJhR1Np4GsLWnww2Duqks2wEzYk8VDTvCAYy7MisG1r" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/interfaces/PointerInterface.sol": { | |
| "keccak256": "0x08aed19c3bef1ae2d90fc0d9d28a497fd7f312991ed08fedfe545de6b9a476e4", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://b2e7b4acfbd4cfbd4c3e266011955954ec0f5a2323647e81b936c66cb35e1b5e", | |
| "dweb:/ipfs/QmXVrpdo76r2WhxE7gJPj3dGycZYKKvK39VNVaB7HyhAbT" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/vendor/BufferChainlink.sol": { | |
| "keccak256": "0x14f13139229a2fef8f705f29f91de0bc81bcd5070ec75b4bd3fd82c1536ca685", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://9a403d7f17b316c7b8837a25df0563de2a1c3121b7cd43473abce8ce6742bd29", | |
| "dweb:/ipfs/QmWZYi4xJGjPt1pEM7mS7XsA1eF2zpcxiiuGHuiTndXHo7" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/vendor/CBORChainlink.sol": { | |
| "keccak256": "0xe7c6e4290ac2a41a138e6bd89d89a2779f66847a5ee6fb5a6f2a3386e5ce589d", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://1eb0e7821c4963b125b47c93e31cd6e073d2b87550651054fc526e63915d92ab", | |
| "dweb:/ipfs/QmVJq2sNTzX4Hfyway8JiY4RoQw4vQRSbzJWbsC7JsiyUs" | |
| ] | |
| }, | |
| "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/vendor/ENSResolver.sol": { | |
| "keccak256": "0xfd992937d215ad669f69e91fefbe62cad8973ae329b4e810ca9b26a1ae0b6bb7", | |
| "license": "MIT", | |
| "urls": [ | |
| "bzz-raw://afb189e69fb705795bf41dea9ff20bab191164fc4876803168372f9bf1a1a0f1", | |
| "dweb:/ipfs/QmUBbNkFiJh9BrPepNVYMpxnEk1a5xqun8VT6Zb2jC3FtV" | |
| ] | |
| } | |
| }, | |
| "version": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This example code is designed to quickly deploy an example contract using Remix. | |
| pragma solidity ^0.6.0; | |
| import "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
| contract APIConsumer is ChainlinkClient { | |
| uint256 public volume; | |
| address private oracle; | |
| bytes32 private jobId; | |
| uint256 private fee; | |
| /** | |
| * Network: Kovan | |
| * Chainlink - 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e | |
| * Chainlink - 29fa9aa13bf1468788b7cc4a500a45b8 | |
| * Fee: 0.1 LINK | |
| */ | |
| constructor() public { | |
| setPublicChainlinkToken(); | |
| oracle = 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e; | |
| jobId = "29fa9aa13bf1468788b7cc4a500a45b8"; | |
| fee = 0.1 * 10 ** 18; // 0.1 LINK | |
| } | |
| /** | |
| * Create a Chainlink request to retrieve API response, find the target | |
| * data, then multiply by 1000000000000000000 (to remove decimal places from data). | |
| ************************************************************************************ | |
| * STOP! * | |
| * THIS FUNCTION WILL FAIL IF THIS CONTRACT DOES NOT OWN LINK * | |
| * ---------------------------------------------------------- * | |
| * Learn how to obtain testnet LINK and fund this contract: * | |
| * ------- https://docs.chain.link/docs/acquire-link -------- * | |
| * ---- https://docs.chain.link/docs/fund-your-contract ----- * | |
| * * | |
| ************************************************************************************/ | |
| function requestVolumeData() public returns (bytes32 requestId) | |
| { | |
| Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); | |
| // Set the URL to perform the GET request on | |
| request.add("get", "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD"); | |
| // Set the path to find the desired data in the API response, where the response format is: | |
| // {"RAW": | |
| // {"ETH": | |
| // {"USD": | |
| // { | |
| // ..., | |
| // "VOLUME24HOUR": xxx.xxx, | |
| // ... | |
| // } | |
| // } | |
| // } | |
| // } | |
| request.add("path", "RAW.ETH.USD.VOLUME24HOUR"); | |
| // Multiply the result by 1000000000000000000 to remove decimals | |
| int timesAmount = 10**18; | |
| request.addInt("times", timesAmount); | |
| // Sends the request | |
| return sendChainlinkRequestTo(oracle, request, fee); | |
| } | |
| /** | |
| * Receive the response in the form of uint256 | |
| */ | |
| function fulfill(bytes32 _requestId, uint256 _volume) public recordChainlinkFulfillment(_requestId) | |
| { | |
| volume = _volume; | |
| } | |
| /** | |
| * Withdraw LINK from this contract | |
| * | |
| * NOTE: DO NOT USE THIS IN PRODUCTION AS IT CAN BE CALLED BY ANY ADDRESS. | |
| * THIS IS PURELY FOR EXAMPLE PURPOSES ONLY. | |
| */ | |
| function withdrawLink() external { | |
| LinkTokenInterface linkToken = LinkTokenInterface(chainlinkTokenAddress()); | |
| require(linkToken.transfer(msg.sender, linkToken.balanceOf(address(this))), "Unable to transfer"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Submitted for verification at BscScan.com on 2021-02-25 | |
| */ | |
| pragma solidity 0.6.6; | |
| /* | |
| * @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 GSN 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. | |
| */ | |
| contract Context { | |
| // Empty internal constructor, to prevent people from mistakenly deploying | |
| // an instance of this contract, which should be used via inheritance. | |
| constructor() internal {} | |
| function _msgSender() internal view returns (address payable) { | |
| return msg.sender; | |
| } | |
| function _msgData() internal view returns (bytes memory) { | |
| this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 | |
| return msg.data; | |
| } | |
| } | |
| // | |
| /** | |
| * @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. | |
| */ | |
| 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() internal { | |
| address msgSender = _msgSender(); | |
| _owner = msgSender; | |
| emit OwnershipTransferred(address(0), msgSender); | |
| } | |
| /** | |
| * @dev Returns the address of the current owner. | |
| */ | |
| function owner() public view returns (address) { | |
| return _owner; | |
| } | |
| /** | |
| * @dev Throws if called by any account other than the owner. | |
| */ | |
| modifier onlyOwner() { | |
| 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 onlyOwner { | |
| emit OwnershipTransferred(_owner, address(0)); | |
| _owner = 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 onlyOwner { | |
| _transferOwnership(newOwner); | |
| } | |
| /** | |
| * @dev Transfers ownership of the contract to a new account (`newOwner`). | |
| */ | |
| function _transferOwnership(address newOwner) internal { | |
| require(newOwner != address(0), 'Ownable: new owner is the zero address'); | |
| emit OwnershipTransferred(_owner, newOwner); | |
| _owner = newOwner; | |
| } | |
| } | |
| // | |
| interface IBEP20 { | |
| /** | |
| * @dev Returns the amount of tokens in existence. | |
| */ | |
| function totalSupply() external view returns (uint256); | |
| /** | |
| * @dev Returns the token decimals. | |
| */ | |
| function decimals() external view returns (uint8); | |
| /** | |
| * @dev Returns the token symbol. | |
| */ | |
| function symbol() external view returns (string memory); | |
| /** | |
| * @dev Returns the token name. | |
| */ | |
| function name() external view returns (string memory); | |
| /** | |
| * @dev Returns the bep token owner. | |
| */ | |
| function getOwner() external view returns (address); | |
| /** | |
| * @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 `recipient`. | |
| * | |
| * Returns a boolean value indicating whether the operation succeeded. | |
| * | |
| * Emits a {Transfer} event. | |
| */ | |
| function transfer(address recipient, 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 `sender` to `recipient` 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 sender, | |
| address recipient, | |
| uint256 amount | |
| ) external returns (bool); | |
| /** | |
| * @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 Wrappers over Solidity's arithmetic operations with added overflow | |
| * checks. | |
| * | |
| * Arithmetic operations in Solidity wrap on overflow. This can easily result | |
| * in bugs, because programmers usually assume that an overflow raises an | |
| * error, which is the standard behavior in high level programming languages. | |
| * `SafeMath` restores this intuition by reverting the transaction when an | |
| * operation overflows. | |
| * | |
| * Using this library instead of the unchecked operations eliminates an entire | |
| * class of bugs, so it's recommended to use it always. | |
| */ | |
| library SafeMath { | |
| /** | |
| * @dev Returns the addition of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `+` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Addition cannot overflow. | |
| */ | |
| function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
| uint256 c = a + b; | |
| require(c >= a, 'SafeMath: addition overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return sub(a, b, 'SafeMath: subtraction overflow'); | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting with custom message on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b <= a, errorMessage); | |
| uint256 c = a - b; | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the multiplication of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `*` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Multiplication cannot overflow. | |
| */ | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| // Gas optimization: this is cheaper than requiring 'a' not being zero, but the | |
| // benefit is lost if 'b' is also tested. | |
| // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 | |
| if (a == 0) { | |
| return 0; | |
| } | |
| uint256 c = a * b; | |
| require(c / a == b, 'SafeMath: multiplication overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return div(a, b, 'SafeMath: division by zero'); | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts with custom message on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b > 0, errorMessage); | |
| uint256 c = a / b; | |
| // assert(a == b * c + a % b); // There is no case in which this doesn't hold | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return mod(a, b, 'SafeMath: modulo by zero'); | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts with custom message when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b != 0, errorMessage); | |
| return a % b; | |
| } | |
| function min(uint256 x, uint256 y) internal pure returns (uint256 z) { | |
| z = x < y ? x : y; | |
| } | |
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | |
| function sqrt(uint256 y) internal pure returns (uint256 z) { | |
| if (y > 3) { | |
| z = y; | |
| uint256 x = y / 2 + 1; | |
| while (x < z) { | |
| z = x; | |
| x = (y / x + x) / 2; | |
| } | |
| } else if (y != 0) { | |
| z = 1; | |
| } | |
| } | |
| } | |
| // | |
| /** | |
| * @dev Collection of functions related to the address type | |
| */ | |
| library Address { | |
| /** | |
| * @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 | |
| * ==== | |
| */ | |
| function isContract(address account) internal view returns (bool) { | |
| // According to EIP-1052, 0x0 is the value returned for not-yet created accounts | |
| // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned | |
| // for accounts without code, i.e. `keccak256('')` | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| codehash := extcodehash(account) | |
| } | |
| return (codehash != accountHash && codehash != 0x0); | |
| } | |
| /** | |
| * @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'); | |
| // solhint-disable-next-line avoid-low-level-calls, avoid-call-value | |
| (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'); | |
| return _functionCallWithValue(target, data, value, errorMessage); | |
| } | |
| function _functionCallWithValue( | |
| address target, | |
| bytes memory data, | |
| uint256 weiValue, | |
| string memory errorMessage | |
| ) private returns (bytes memory) { | |
| require(isContract(target), 'Address: call to non-contract'); | |
| // solhint-disable-next-line avoid-low-level-calls | |
| (bool success, bytes memory returndata) = target.call{value: weiValue}(data); | |
| 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 | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| let returndata_size := mload(returndata) | |
| revert(add(32, returndata), returndata_size) | |
| } | |
| } else { | |
| revert(errorMessage); | |
| } | |
| } | |
| } | |
| } | |
| // | |
| /** | |
| * @dev Implementation of the {IBEP20} interface. | |
| * | |
| * This implementation is agnostic to the way tokens are created. This means | |
| * that a supply mechanism has to be added in a derived contract using {_mint}. | |
| * For a generic mechanism see {BEP20PresetMinterPauser}. | |
| * | |
| * TIP: For a detailed writeup see our guide | |
| * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How | |
| * to implement supply mechanisms]. | |
| * | |
| * We have followed general OpenZeppelin guidelines: functions revert instead | |
| * of returning `false` on failure. This behavior is nonetheless conventional | |
| * and does not conflict with the expectations of BEP20 applications. | |
| * | |
| * Additionally, an {Approval} event is emitted on calls to {transferFrom}. | |
| * This allows applications to reconstruct the allowance for all accounts just | |
| * by listening to said events. Other implementations of the EIP may not emit | |
| * these events, as it isn't required by the specification. | |
| * | |
| * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} | |
| * functions have been added to mitigate the well-known issues around setting | |
| * allowances. See {IBEP20-approve}. | |
| */ | |
| contract BEP20 is Context, IBEP20, Ownable { | |
| using SafeMath for uint256; | |
| using Address for address; | |
| mapping(address => uint256) private _balances; | |
| mapping(address => mapping(address => uint256)) private _allowances; | |
| uint256 private _totalSupply; | |
| string private _name; | |
| string private _symbol; | |
| uint8 private _decimals; | |
| /** | |
| * @dev Sets the values for {name} and {symbol}, initializes {decimals} with | |
| * a default value of 18. | |
| * | |
| * To select a different value for {decimals}, use {_setupDecimals}. | |
| * | |
| * All three of these values are immutable: they can only be set once during | |
| * construction. | |
| */ | |
| constructor(string memory name, string memory symbol) public { | |
| _name = name; | |
| _symbol = symbol; | |
| _decimals = 18; | |
| } | |
| /** | |
| * @dev Returns the bep token owner. | |
| */ | |
| function getOwner() external override view returns (address) { | |
| return owner(); | |
| } | |
| /** | |
| * @dev Returns the token name. | |
| */ | |
| function name() public override view returns (string memory) { | |
| return _name; | |
| } | |
| /** | |
| * @dev Returns the token decimals. | |
| */ | |
| function decimals() public override view returns (uint8) { | |
| return _decimals; | |
| } | |
| /** | |
| * @dev Returns the token symbol. | |
| */ | |
| function symbol() public override view returns (string memory) { | |
| return _symbol; | |
| } | |
| /** | |
| * @dev See {BEP20-totalSupply}. | |
| */ | |
| function totalSupply() public override view returns (uint256) { | |
| return _totalSupply; | |
| } | |
| /** | |
| * @dev See {BEP20-balanceOf}. | |
| */ | |
| function balanceOf(address account) public override view returns (uint256) { | |
| return _balances[account]; | |
| } | |
| /** | |
| * @dev See {BEP20-transfer}. | |
| * | |
| * Requirements: | |
| * | |
| * - `recipient` cannot be the zero address. | |
| * - the caller must have a balance of at least `amount`. | |
| */ | |
| function transfer(address recipient, uint256 amount) public override returns (bool) { | |
| _transfer(_msgSender(), recipient, amount); | |
| return true; | |
| } | |
| /** | |
| * @dev See {BEP20-allowance}. | |
| */ | |
| function allowance(address owner, address spender) public override view returns (uint256) { | |
| return _allowances[owner][spender]; | |
| } | |
| /** | |
| * @dev See {BEP20-approve}. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function approve(address spender, uint256 amount) public override returns (bool) { | |
| _approve(_msgSender(), spender, amount); | |
| return true; | |
| } | |
| /** | |
| * @dev See {BEP20-transferFrom}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. This is not | |
| * required by the EIP. See the note at the beginning of {BEP20}; | |
| * | |
| * Requirements: | |
| * - `sender` and `recipient` cannot be the zero address. | |
| * - `sender` must have a balance of at least `amount`. | |
| * - the caller must have allowance for `sender`'s tokens of at least | |
| * `amount`. | |
| */ | |
| function transferFrom( | |
| address sender, | |
| address recipient, | |
| uint256 amount | |
| ) public override returns (bool) { | |
| _transfer(sender, recipient, amount); | |
| _approve( | |
| sender, | |
| _msgSender(), | |
| _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance') | |
| ); | |
| return true; | |
| } | |
| /** | |
| * @dev Atomically increases the allowance granted to `spender` by the caller. | |
| * | |
| * This is an alternative to {approve} that can be used as a mitigation for | |
| * problems described in {BEP20-approve}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { | |
| _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); | |
| return true; | |
| } | |
| /** | |
| * @dev Atomically decreases the allowance granted to `spender` by the caller. | |
| * | |
| * This is an alternative to {approve} that can be used as a mitigation for | |
| * problems described in {BEP20-approve}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| * - `spender` must have allowance for the caller of at least | |
| * `subtractedValue`. | |
| */ | |
| function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { | |
| _approve( | |
| _msgSender(), | |
| spender, | |
| _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero') | |
| ); | |
| return true; | |
| } | |
| /** | |
| * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing | |
| * the total supply. | |
| * | |
| * Requirements | |
| * | |
| * - `msg.sender` must be the token owner | |
| */ | |
| function mint(uint256 amount) public onlyOwner returns (bool) { | |
| _mint(_msgSender(), amount); | |
| return true; | |
| } | |
| /** | |
| * @dev Moves tokens `amount` from `sender` to `recipient`. | |
| * | |
| * This is internal function is equivalent to {transfer}, and can be used to | |
| * e.g. implement automatic token fees, slashing mechanisms, etc. | |
| * | |
| * Emits a {Transfer} event. | |
| * | |
| * Requirements: | |
| * | |
| * - `sender` cannot be the zero address. | |
| * - `recipient` cannot be the zero address. | |
| * - `sender` must have a balance of at least `amount`. | |
| */ | |
| function _transfer( | |
| address sender, | |
| address recipient, | |
| uint256 amount | |
| ) internal { | |
| require(sender != address(0), 'BEP20: transfer from the zero address'); | |
| require(recipient != address(0), 'BEP20: transfer to the zero address'); | |
| _balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance'); | |
| _balances[recipient] = _balances[recipient].add(amount); | |
| emit Transfer(sender, recipient, amount); | |
| } | |
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing | |
| * the total supply. | |
| * | |
| * Emits a {Transfer} event with `from` set to the zero address. | |
| * | |
| * Requirements | |
| * | |
| * - `to` cannot be the zero address. | |
| */ | |
| function _mint(address account, uint256 amount) internal { | |
| require(account != address(0), 'BEP20: mint to the zero address'); | |
| _totalSupply = _totalSupply.add(amount); | |
| _balances[account] = _balances[account].add(amount); | |
| emit Transfer(address(0), account, amount); | |
| } | |
| /** | |
| * @dev Destroys `amount` tokens from `account`, reducing the | |
| * total supply. | |
| * | |
| * Emits a {Transfer} event with `to` set to the zero address. | |
| * | |
| * Requirements | |
| * | |
| * - `account` cannot be the zero address. | |
| * - `account` must have at least `amount` tokens. | |
| */ | |
| function _burn(address account, uint256 amount) internal { | |
| require(account != address(0), 'BEP20: burn from the zero address'); | |
| _balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance'); | |
| _totalSupply = _totalSupply.sub(amount); | |
| emit Transfer(account, address(0), amount); | |
| } | |
| /** | |
| * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. | |
| * | |
| * This is internal function is equivalent to `approve`, and can be used to | |
| * e.g. set automatic allowances for certain subsystems, etc. | |
| * | |
| * Emits an {Approval} event. | |
| * | |
| * Requirements: | |
| * | |
| * - `owner` cannot be the zero address. | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function _approve( | |
| address owner, | |
| address spender, | |
| uint256 amount | |
| ) internal { | |
| require(owner != address(0), 'BEP20: approve from the zero address'); | |
| require(spender != address(0), 'BEP20: approve to the zero address'); | |
| _allowances[owner][spender] = amount; | |
| emit Approval(owner, spender, amount); | |
| } | |
| /** | |
| * @dev Destroys `amount` tokens from `account`.`amount` is then deducted | |
| * from the caller's allowance. | |
| * | |
| * See {_burn} and {_approve}. | |
| */ | |
| function _burnFrom(address account, uint256 amount) internal { | |
| _burn(account, amount); | |
| _approve( | |
| account, | |
| _msgSender(), | |
| _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance') | |
| ); | |
| } | |
| } | |
| // ManyToken with Governance. | |
| contract ManyToken is BEP20('ManySwap Token', 'MANY') { | |
| /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). | |
| function mint(address _to, uint256 _amount) public onlyOwner { | |
| _mint(_to, _amount); | |
| _moveDelegates(address(0), _delegates[_to], _amount); | |
| } | |
| // Copied and modified from YAM code: | |
| // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol | |
| // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol | |
| // Which is copied and modified from COMPOUND: | |
| // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol | |
| /// @notice A record of each accounts delegate | |
| mapping (address => address) internal _delegates; | |
| /// @notice A checkpoint for marking number of votes from a given block | |
| struct Checkpoint { | |
| uint32 fromBlock; | |
| uint256 votes; | |
| } | |
| /// @notice A record of votes checkpoints for each account, by index | |
| mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; | |
| /// @notice The number of checkpoints for each account | |
| mapping (address => uint32) public numCheckpoints; | |
| /// @notice The EIP-712 typehash for the contract's domain | |
| bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); | |
| /// @notice The EIP-712 typehash for the delegation struct used by the contract | |
| bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); | |
| /// @notice A record of states for signing / validating signatures | |
| mapping (address => uint) public nonces; | |
| /// @notice An event thats emitted when an account changes its delegate | |
| event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); | |
| /// @notice An event thats emitted when a delegate account's vote balance changes | |
| event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); | |
| /** | |
| * @notice Delegate votes from `msg.sender` to `delegatee` | |
| * @param delegator The address to get delegatee for | |
| */ | |
| function delegates(address delegator) | |
| external | |
| view | |
| returns (address) | |
| { | |
| return _delegates[delegator]; | |
| } | |
| /** | |
| * @notice Delegate votes from `msg.sender` to `delegatee` | |
| * @param delegatee The address to delegate votes to | |
| */ | |
| function delegate(address delegatee) external { | |
| return _delegate(msg.sender, delegatee); | |
| } | |
| /** | |
| * @notice Delegates votes from signatory to `delegatee` | |
| * @param delegatee The address to delegate votes to | |
| * @param nonce The contract state required to match the signature | |
| * @param expiry The time at which to expire the signature | |
| * @param v The recovery byte of the signature | |
| * @param r Half of the ECDSA signature pair | |
| * @param s Half of the ECDSA signature pair | |
| */ | |
| function delegateBySig( | |
| address delegatee, | |
| uint nonce, | |
| uint expiry, | |
| uint8 v, | |
| bytes32 r, | |
| bytes32 s | |
| ) | |
| external | |
| { | |
| bytes32 domainSeparator = keccak256( | |
| abi.encode( | |
| DOMAIN_TYPEHASH, | |
| keccak256(bytes(name())), | |
| getChainId(), | |
| address(this) | |
| ) | |
| ); | |
| bytes32 structHash = keccak256( | |
| abi.encode( | |
| DELEGATION_TYPEHASH, | |
| delegatee, | |
| nonce, | |
| expiry | |
| ) | |
| ); | |
| bytes32 digest = keccak256( | |
| abi.encodePacked( | |
| "\x19\x01", | |
| domainSeparator, | |
| structHash | |
| ) | |
| ); | |
| address signatory = ecrecover(digest, v, r, s); | |
| require(signatory != address(0), "MANY::delegateBySig: invalid signature"); | |
| require(nonce == nonces[signatory]++, "MANY::delegateBySig: invalid nonce"); | |
| require(now <= expiry, "MANY::delegateBySig: signature expired"); | |
| return _delegate(signatory, delegatee); | |
| } | |
| /** | |
| * @notice Gets the current votes balance for `account` | |
| * @param account The address to get votes balance | |
| * @return The number of current votes for `account` | |
| */ | |
| function getCurrentVotes(address account) | |
| external | |
| view | |
| returns (uint256) | |
| { | |
| uint32 nCheckpoints = numCheckpoints[account]; | |
| return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; | |
| } | |
| /** | |
| * @notice Determine the prior number of votes for an account as of a block number | |
| * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. | |
| * @param account The address of the account to check | |
| * @param blockNumber The block number to get the vote balance at | |
| * @return The number of votes the account had as of the given block | |
| */ | |
| function getPriorVotes(address account, uint blockNumber) | |
| external | |
| view | |
| returns (uint256) | |
| { | |
| require(blockNumber < block.number, "MANY::getPriorVotes: not yet determined"); | |
| uint32 nCheckpoints = numCheckpoints[account]; | |
| if (nCheckpoints == 0) { | |
| return 0; | |
| } | |
| // First check most recent balance | |
| if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { | |
| return checkpoints[account][nCheckpoints - 1].votes; | |
| } | |
| // Next check implicit zero balance | |
| if (checkpoints[account][0].fromBlock > blockNumber) { | |
| return 0; | |
| } | |
| uint32 lower = 0; | |
| uint32 upper = nCheckpoints - 1; | |
| while (upper > lower) { | |
| uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow | |
| Checkpoint memory cp = checkpoints[account][center]; | |
| if (cp.fromBlock == blockNumber) { | |
| return cp.votes; | |
| } else if (cp.fromBlock < blockNumber) { | |
| lower = center; | |
| } else { | |
| upper = center - 1; | |
| } | |
| } | |
| return checkpoints[account][lower].votes; | |
| } | |
| function _delegate(address delegator, address delegatee) | |
| internal | |
| { | |
| address currentDelegate = _delegates[delegator]; | |
| uint256 delegatorBalance = balanceOf(delegator); // balance of underlying MANYs (not scaled); | |
| _delegates[delegator] = delegatee; | |
| emit DelegateChanged(delegator, currentDelegate, delegatee); | |
| _moveDelegates(currentDelegate, delegatee, delegatorBalance); | |
| } | |
| function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { | |
| if (srcRep != dstRep && amount > 0) { | |
| if (srcRep != address(0)) { | |
| // decrease old representative | |
| uint32 srcRepNum = numCheckpoints[srcRep]; | |
| uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; | |
| uint256 srcRepNew = srcRepOld.sub(amount); | |
| _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); | |
| } | |
| if (dstRep != address(0)) { | |
| // increase new representative | |
| uint32 dstRepNum = numCheckpoints[dstRep]; | |
| uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; | |
| uint256 dstRepNew = dstRepOld.add(amount); | |
| _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); | |
| } | |
| } | |
| } | |
| function _writeCheckpoint( | |
| address delegatee, | |
| uint32 nCheckpoints, | |
| uint256 oldVotes, | |
| uint256 newVotes | |
| ) | |
| internal | |
| { | |
| uint32 blockNumber = safe32(block.number, "MANY::_writeCheckpoint: block number exceeds 32 bits"); | |
| if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { | |
| checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; | |
| } else { | |
| checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); | |
| numCheckpoints[delegatee] = nCheckpoints + 1; | |
| } | |
| emit DelegateVotesChanged(delegatee, oldVotes, newVotes); | |
| } | |
| function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { | |
| require(n < 2**32, errorMessage); | |
| return uint32(n); | |
| } | |
| function getChainId() internal pure returns (uint) { | |
| uint256 chainId; | |
| assembly { chainId := chainid() } | |
| return chainId; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Submitted for verification at BscScan.com on 2021-03-01 | |
| */ | |
| pragma solidity 0.6.6; | |
| // | |
| /** | |
| * @dev Wrappers over Solidity's arithmetic operations with added overflow | |
| * checks. | |
| * | |
| * Arithmetic operations in Solidity wrap on overflow. This can easily result | |
| * in bugs, because programmers usually assume that an overflow raises an | |
| * error, which is the standard behavior in high level programming languages. | |
| * `SafeMath` restores this intuition by reverting the transaction when an | |
| * operation overflows. | |
| * | |
| * Using this library instead of the unchecked operations eliminates an entire | |
| * class of bugs, so it's recommended to use it always. | |
| */ | |
| library SafeMath { | |
| /** | |
| * @dev Returns the addition of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `+` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Addition cannot overflow. | |
| */ | |
| function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
| uint256 c = a + b; | |
| require(c >= a, 'SafeMath: addition overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return sub(a, b, 'SafeMath: subtraction overflow'); | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting with custom message on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b <= a, errorMessage); | |
| uint256 c = a - b; | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the multiplication of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `*` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Multiplication cannot overflow. | |
| */ | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| // Gas optimization: this is cheaper than requiring 'a' not being zero, but the | |
| // benefit is lost if 'b' is also tested. | |
| // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 | |
| if (a == 0) { | |
| return 0; | |
| } | |
| uint256 c = a * b; | |
| require(c / a == b, 'SafeMath: multiplication overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return div(a, b, 'SafeMath: division by zero'); | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts with custom message on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b > 0, errorMessage); | |
| uint256 c = a / b; | |
| // assert(a == b * c + a % b); // There is no case in which this doesn't hold | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return mod(a, b, 'SafeMath: modulo by zero'); | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts with custom message when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b != 0, errorMessage); | |
| return a % b; | |
| } | |
| function min(uint256 x, uint256 y) internal pure returns (uint256 z) { | |
| z = x < y ? x : y; | |
| } | |
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | |
| function sqrt(uint256 y) internal pure returns (uint256 z) { | |
| if (y > 3) { | |
| z = y; | |
| uint256 x = y / 2 + 1; | |
| while (x < z) { | |
| z = x; | |
| x = (y / x + x) / 2; | |
| } | |
| } else if (y != 0) { | |
| z = 1; | |
| } | |
| } | |
| } | |
| // | |
| interface IBEP20 { | |
| /** | |
| * @dev Returns the amount of tokens in existence. | |
| */ | |
| function totalSupply() external view returns (uint256); | |
| /** | |
| * @dev Returns the token decimals. | |
| */ | |
| function decimals() external view returns (uint8); | |
| /** | |
| * @dev Returns the token symbol. | |
| */ | |
| function symbol() external view returns (string memory); | |
| /** | |
| * @dev Returns the token name. | |
| */ | |
| function name() external view returns (string memory); | |
| /** | |
| * @dev Returns the bep token owner. | |
| */ | |
| function getOwner() external view returns (address); | |
| /** | |
| * @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 `recipient`. | |
| * | |
| * Returns a boolean value indicating whether the operation succeeded. | |
| * | |
| * Emits a {Transfer} event. | |
| */ | |
| function transfer(address recipient, 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 `sender` to `recipient` 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 sender, | |
| address recipient, | |
| uint256 amount | |
| ) external returns (bool); | |
| /** | |
| * @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 Collection of functions related to the address type | |
| */ | |
| library Address { | |
| /** | |
| * @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 | |
| * ==== | |
| */ | |
| function isContract(address account) internal view returns (bool) { | |
| // According to EIP-1052, 0x0 is the value returned for not-yet created accounts | |
| // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned | |
| // for accounts without code, i.e. `keccak256('')` | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| codehash := extcodehash(account) | |
| } | |
| return (codehash != accountHash && codehash != 0x0); | |
| } | |
| /** | |
| * @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'); | |
| // solhint-disable-next-line avoid-low-level-calls, avoid-call-value | |
| (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'); | |
| return _functionCallWithValue(target, data, value, errorMessage); | |
| } | |
| function _functionCallWithValue( | |
| address target, | |
| bytes memory data, | |
| uint256 weiValue, | |
| string memory errorMessage | |
| ) private returns (bytes memory) { | |
| require(isContract(target), 'Address: call to non-contract'); | |
| // solhint-disable-next-line avoid-low-level-calls | |
| (bool success, bytes memory returndata) = target.call{value: weiValue}(data); | |
| 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 | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| let returndata_size := mload(returndata) | |
| revert(add(32, returndata), returndata_size) | |
| } | |
| } else { | |
| revert(errorMessage); | |
| } | |
| } | |
| } | |
| } | |
| // | |
| /** | |
| * @title SafeBEP20 | |
| * @dev Wrappers around BEP20 operations that throw on failure (when the token | |
| * contract returns false). Tokens that return no value (and instead revert or | |
| * throw on failure) are also supported, non-reverting calls are assumed to be | |
| * successful. | |
| * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract, | |
| * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. | |
| */ | |
| library SafeBEP20 { | |
| using SafeMath for uint256; | |
| using Address for address; | |
| function safeTransfer( | |
| IBEP20 token, | |
| address to, | |
| uint256 value | |
| ) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); | |
| } | |
| function safeTransferFrom( | |
| IBEP20 token, | |
| address from, | |
| address to, | |
| uint256 value | |
| ) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); | |
| } | |
| /** | |
| * @dev Deprecated. This function has issues similar to the ones found in | |
| * {IBEP20-approve}, and its usage is discouraged. | |
| * | |
| * Whenever possible, use {safeIncreaseAllowance} and | |
| * {safeDecreaseAllowance} instead. | |
| */ | |
| function safeApprove( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| // safeApprove should only be called when setting an initial allowance, | |
| // or when resetting it to zero. To increase and decrease it, use | |
| // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' | |
| // solhint-disable-next-line max-line-length | |
| require( | |
| (value == 0) || (token.allowance(address(this), spender) == 0), | |
| 'SafeBEP20: approve from non-zero to non-zero allowance' | |
| ); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); | |
| } | |
| function safeIncreaseAllowance( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).add(value); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| function safeDecreaseAllowance( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).sub( | |
| value, | |
| 'SafeBEP20: decreased allowance below zero' | |
| ); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| /** | |
| * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement | |
| * on the return value: the return value is optional (but if data is returned, it must not be false). | |
| * @param token The token targeted by the call. | |
| * @param data The call data (encoded using abi.encode or one of its variants). | |
| */ | |
| function _callOptionalReturn(IBEP20 token, bytes memory data) private { | |
| // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since | |
| // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that | |
| // the target address contains contract code and also asserts for success in the low-level call. | |
| bytes memory returndata = address(token).functionCall(data, 'SafeBEP20: low-level call failed'); | |
| if (returndata.length > 0) { | |
| // Return data is optional | |
| // solhint-disable-next-line max-line-length | |
| require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed'); | |
| } | |
| } | |
| } | |
| // | |
| /* | |
| * @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 GSN 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. | |
| */ | |
| contract Context { | |
| // Empty internal constructor, to prevent people from mistakenly deploying | |
| // an instance of this contract, which should be used via inheritance. | |
| constructor() internal {} | |
| function _msgSender() internal view returns (address payable) { | |
| return msg.sender; | |
| } | |
| function _msgData() internal view returns (bytes memory) { | |
| this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 | |
| return msg.data; | |
| } | |
| } | |
| // | |
| /** | |
| * @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. | |
| */ | |
| 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() internal { | |
| address msgSender = _msgSender(); | |
| _owner = msgSender; | |
| emit OwnershipTransferred(address(0), msgSender); | |
| } | |
| /** | |
| * @dev Returns the address of the current owner. | |
| */ | |
| function owner() public view returns (address) { | |
| return _owner; | |
| } | |
| /** | |
| * @dev Throws if called by any account other than the owner. | |
| */ | |
| modifier onlyOwner() { | |
| 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 onlyOwner { | |
| emit OwnershipTransferred(_owner, address(0)); | |
| _owner = 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 onlyOwner { | |
| _transferOwnership(newOwner); | |
| } | |
| /** | |
| * @dev Transfers ownership of the contract to a new account (`newOwner`). | |
| */ | |
| function _transferOwnership(address newOwner) internal { | |
| require(newOwner != address(0), 'Ownable: new owner is the zero address'); | |
| emit OwnershipTransferred(_owner, newOwner); | |
| _owner = newOwner; | |
| } | |
| } | |
| // | |
| /** | |
| * @dev Implementation of the {IBEP20} interface. | |
| * | |
| * This implementation is agnostic to the way tokens are created. This means | |
| * that a supply mechanism has to be added in a derived contract using {_mint}. | |
| * For a generic mechanism see {BEP20PresetMinterPauser}. | |
| * | |
| * TIP: For a detailed writeup see our guide | |
| * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How | |
| * to implement supply mechanisms]. | |
| * | |
| * We have followed general OpenZeppelin guidelines: functions revert instead | |
| * of returning `false` on failure. This behavior is nonetheless conventional | |
| * and does not conflict with the expectations of BEP20 applications. | |
| * | |
| * Additionally, an {Approval} event is emitted on calls to {transferFrom}. | |
| * This allows applications to reconstruct the allowance for all accounts just | |
| * by listening to said events. Other implementations of the EIP may not emit | |
| * these events, as it isn't required by the specification. | |
| * | |
| * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} | |
| * functions have been added to mitigate the well-known issues around setting | |
| * allowances. See {IBEP20-approve}. | |
| */ | |
| contract BEP20 is Context, IBEP20, Ownable { | |
| using SafeMath for uint256; | |
| using Address for address; | |
| mapping(address => uint256) private _balances; | |
| mapping(address => mapping(address => uint256)) private _allowances; | |
| uint256 private _totalSupply; | |
| string private _name; | |
| string private _symbol; | |
| uint8 private _decimals; | |
| /** | |
| * @dev Sets the values for {name} and {symbol}, initializes {decimals} with | |
| * a default value of 18. | |
| * | |
| * To select a different value for {decimals}, use {_setupDecimals}. | |
| * | |
| * All three of these values are immutable: they can only be set once during | |
| * construction. | |
| */ | |
| constructor(string memory name, string memory symbol) public { | |
| _name = name; | |
| _symbol = symbol; | |
| _decimals = 18; | |
| } | |
| /** | |
| * @dev Returns the bep token owner. | |
| */ | |
| function getOwner() external override view returns (address) { | |
| return owner(); | |
| } | |
| /** | |
| * @dev Returns the token name. | |
| */ | |
| function name() public override view returns (string memory) { | |
| return _name; | |
| } | |
| /** | |
| * @dev Returns the token decimals. | |
| */ | |
| function decimals() public override view returns (uint8) { | |
| return _decimals; | |
| } | |
| /** | |
| * @dev Returns the token symbol. | |
| */ | |
| function symbol() public override view returns (string memory) { | |
| return _symbol; | |
| } | |
| /** | |
| * @dev See {BEP20-totalSupply}. | |
| */ | |
| function totalSupply() public override view returns (uint256) { | |
| return _totalSupply; | |
| } | |
| /** | |
| * @dev See {BEP20-balanceOf}. | |
| */ | |
| function balanceOf(address account) public override view returns (uint256) { | |
| return _balances[account]; | |
| } | |
| /** | |
| * @dev See {BEP20-transfer}. | |
| * | |
| * Requirements: | |
| * | |
| * - `recipient` cannot be the zero address. | |
| * - the caller must have a balance of at least `amount`. | |
| */ | |
| function transfer(address recipient, uint256 amount) public override returns (bool) { | |
| _transfer(_msgSender(), recipient, amount); | |
| return true; | |
| } | |
| /** | |
| * @dev See {BEP20-allowance}. | |
| */ | |
| function allowance(address owner, address spender) public override view returns (uint256) { | |
| return _allowances[owner][spender]; | |
| } | |
| /** | |
| * @dev See {BEP20-approve}. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function approve(address spender, uint256 amount) public override returns (bool) { | |
| _approve(_msgSender(), spender, amount); | |
| return true; | |
| } | |
| /** | |
| * @dev See {BEP20-transferFrom}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. This is not | |
| * required by the EIP. See the note at the beginning of {BEP20}; | |
| * | |
| * Requirements: | |
| * - `sender` and `recipient` cannot be the zero address. | |
| * - `sender` must have a balance of at least `amount`. | |
| * - the caller must have allowance for `sender`'s tokens of at least | |
| * `amount`. | |
| */ | |
| function transferFrom( | |
| address sender, | |
| address recipient, | |
| uint256 amount | |
| ) public override returns (bool) { | |
| _transfer(sender, recipient, amount); | |
| _approve( | |
| sender, | |
| _msgSender(), | |
| _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance') | |
| ); | |
| return true; | |
| } | |
| /** | |
| * @dev Atomically increases the allowance granted to `spender` by the caller. | |
| * | |
| * This is an alternative to {approve} that can be used as a mitigation for | |
| * problems described in {BEP20-approve}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { | |
| _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); | |
| return true; | |
| } | |
| /** | |
| * @dev Atomically decreases the allowance granted to `spender` by the caller. | |
| * | |
| * This is an alternative to {approve} that can be used as a mitigation for | |
| * problems described in {BEP20-approve}. | |
| * | |
| * Emits an {Approval} event indicating the updated allowance. | |
| * | |
| * Requirements: | |
| * | |
| * - `spender` cannot be the zero address. | |
| * - `spender` must have allowance for the caller of at least | |
| * `subtractedValue`. | |
| */ | |
| function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { | |
| _approve( | |
| _msgSender(), | |
| spender, | |
| _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero') | |
| ); | |
| return true; | |
| } | |
| /** | |
| * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing | |
| * the total supply. | |
| * | |
| * Requirements | |
| * | |
| * - `msg.sender` must be the token owner | |
| */ | |
| function mint(uint256 amount) public onlyOwner returns (bool) { | |
| _mint(_msgSender(), amount); | |
| return true; | |
| } | |
| /** | |
| * @dev Moves tokens `amount` from `sender` to `recipient`. | |
| * | |
| * This is internal function is equivalent to {transfer}, and can be used to | |
| * e.g. implement automatic token fees, slashing mechanisms, etc. | |
| * | |
| * Emits a {Transfer} event. | |
| * | |
| * Requirements: | |
| * | |
| * - `sender` cannot be the zero address. | |
| * - `recipient` cannot be the zero address. | |
| * - `sender` must have a balance of at least `amount`. | |
| */ | |
| function _transfer( | |
| address sender, | |
| address recipient, | |
| uint256 amount | |
| ) internal { | |
| require(sender != address(0), 'BEP20: transfer from the zero address'); | |
| require(recipient != address(0), 'BEP20: transfer to the zero address'); | |
| _balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance'); | |
| _balances[recipient] = _balances[recipient].add(amount); | |
| emit Transfer(sender, recipient, amount); | |
| } | |
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing | |
| * the total supply. | |
| * | |
| * Emits a {Transfer} event with `from` set to the zero address. | |
| * | |
| * Requirements | |
| * | |
| * - `to` cannot be the zero address. | |
| */ | |
| function _mint(address account, uint256 amount) internal { | |
| require(account != address(0), 'BEP20: mint to the zero address'); | |
| _totalSupply = _totalSupply.add(amount); | |
| _balances[account] = _balances[account].add(amount); | |
| emit Transfer(address(0), account, amount); | |
| } | |
| /** | |
| * @dev Destroys `amount` tokens from `account`, reducing the | |
| * total supply. | |
| * | |
| * Emits a {Transfer} event with `to` set to the zero address. | |
| * | |
| * Requirements | |
| * | |
| * - `account` cannot be the zero address. | |
| * - `account` must have at least `amount` tokens. | |
| */ | |
| function _burn(address account, uint256 amount) internal { | |
| require(account != address(0), 'BEP20: burn from the zero address'); | |
| _balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance'); | |
| _totalSupply = _totalSupply.sub(amount); | |
| emit Transfer(account, address(0), amount); | |
| } | |
| /** | |
| * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. | |
| * | |
| * This is internal function is equivalent to `approve`, and can be used to | |
| * e.g. set automatic allowances for certain subsystems, etc. | |
| * | |
| * Emits an {Approval} event. | |
| * | |
| * Requirements: | |
| * | |
| * - `owner` cannot be the zero address. | |
| * - `spender` cannot be the zero address. | |
| */ | |
| function _approve( | |
| address owner, | |
| address spender, | |
| uint256 amount | |
| ) internal { | |
| require(owner != address(0), 'BEP20: approve from the zero address'); | |
| require(spender != address(0), 'BEP20: approve to the zero address'); | |
| _allowances[owner][spender] = amount; | |
| emit Approval(owner, spender, amount); | |
| } | |
| /** | |
| * @dev Destroys `amount` tokens from `account`.`amount` is then deducted | |
| * from the caller's allowance. | |
| * | |
| * See {_burn} and {_approve}. | |
| */ | |
| function _burnFrom(address account, uint256 amount) internal { | |
| _burn(account, amount); | |
| _approve( | |
| account, | |
| _msgSender(), | |
| _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance') | |
| ); | |
| } | |
| } | |
| // ManyToken with Governance. | |
| contract ManyToken is BEP20('ManySwap Token', 'MANY') { | |
| /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). | |
| function mint(address _to, uint256 _amount) public onlyOwner { | |
| _mint(_to, _amount); | |
| _moveDelegates(address(0), _delegates[_to], _amount); | |
| } | |
| // Copied and modified from YAM code: | |
| // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol | |
| // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol | |
| // Which is copied and modified from COMPOUND: | |
| // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol | |
| /// @notice A record of each accounts delegate | |
| mapping (address => address) internal _delegates; | |
| /// @notice A checkpoint for marking number of votes from a given block | |
| struct Checkpoint { | |
| uint32 fromBlock; | |
| uint256 votes; | |
| } | |
| /// @notice A record of votes checkpoints for each account, by index | |
| mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; | |
| /// @notice The number of checkpoints for each account | |
| mapping (address => uint32) public numCheckpoints; | |
| /// @notice The EIP-712 typehash for the contract's domain | |
| bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); | |
| /// @notice The EIP-712 typehash for the delegation struct used by the contract | |
| bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); | |
| /// @notice A record of states for signing / validating signatures | |
| mapping (address => uint) public nonces; | |
| /// @notice An event thats emitted when an account changes its delegate | |
| event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); | |
| /// @notice An event thats emitted when a delegate account's vote balance changes | |
| event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); | |
| /** | |
| * @notice Delegate votes from `msg.sender` to `delegatee` | |
| * @param delegator The address to get delegatee for | |
| */ | |
| function delegates(address delegator) | |
| external | |
| view | |
| returns (address) | |
| { | |
| return _delegates[delegator]; | |
| } | |
| /** | |
| * @notice Delegate votes from `msg.sender` to `delegatee` | |
| * @param delegatee The address to delegate votes to | |
| */ | |
| function delegate(address delegatee) external { | |
| return _delegate(msg.sender, delegatee); | |
| } | |
| /** | |
| * @notice Delegates votes from signatory to `delegatee` | |
| * @param delegatee The address to delegate votes to | |
| * @param nonce The contract state required to match the signature | |
| * @param expiry The time at which to expire the signature | |
| * @param v The recovery byte of the signature | |
| * @param r Half of the ECDSA signature pair | |
| * @param s Half of the ECDSA signature pair | |
| */ | |
| function delegateBySig( | |
| address delegatee, | |
| uint nonce, | |
| uint expiry, | |
| uint8 v, | |
| bytes32 r, | |
| bytes32 s | |
| ) | |
| external | |
| { | |
| bytes32 domainSeparator = keccak256( | |
| abi.encode( | |
| DOMAIN_TYPEHASH, | |
| keccak256(bytes(name())), | |
| getChainId(), | |
| address(this) | |
| ) | |
| ); | |
| bytes32 structHash = keccak256( | |
| abi.encode( | |
| DELEGATION_TYPEHASH, | |
| delegatee, | |
| nonce, | |
| expiry | |
| ) | |
| ); | |
| bytes32 digest = keccak256( | |
| abi.encodePacked( | |
| "\x19\x01", | |
| domainSeparator, | |
| structHash | |
| ) | |
| ); | |
| address signatory = ecrecover(digest, v, r, s); | |
| require(signatory != address(0), "MANY::delegateBySig: invalid signature"); | |
| require(nonce == nonces[signatory]++, "MANY::delegateBySig: invalid nonce"); | |
| require(now <= expiry, "MANY::delegateBySig: signature expired"); | |
| return _delegate(signatory, delegatee); | |
| } | |
| /** | |
| * @notice Gets the current votes balance for `account` | |
| * @param account The address to get votes balance | |
| * @return The number of current votes for `account` | |
| */ | |
| function getCurrentVotes(address account) | |
| external | |
| view | |
| returns (uint256) | |
| { | |
| uint32 nCheckpoints = numCheckpoints[account]; | |
| return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; | |
| } | |
| /** | |
| * @notice Determine the prior number of votes for an account as of a block number | |
| * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. | |
| * @param account The address of the account to check | |
| * @param blockNumber The block number to get the vote balance at | |
| * @return The number of votes the account had as of the given block | |
| */ | |
| function getPriorVotes(address account, uint blockNumber) | |
| external | |
| view | |
| returns (uint256) | |
| { | |
| require(blockNumber < block.number, "MANY::getPriorVotes: not yet determined"); | |
| uint32 nCheckpoints = numCheckpoints[account]; | |
| if (nCheckpoints == 0) { | |
| return 0; | |
| } | |
| // First check most recent balance | |
| if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { | |
| return checkpoints[account][nCheckpoints - 1].votes; | |
| } | |
| // Next check implicit zero balance | |
| if (checkpoints[account][0].fromBlock > blockNumber) { | |
| return 0; | |
| } | |
| uint32 lower = 0; | |
| uint32 upper = nCheckpoints - 1; | |
| while (upper > lower) { | |
| uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow | |
| Checkpoint memory cp = checkpoints[account][center]; | |
| if (cp.fromBlock == blockNumber) { | |
| return cp.votes; | |
| } else if (cp.fromBlock < blockNumber) { | |
| lower = center; | |
| } else { | |
| upper = center - 1; | |
| } | |
| } | |
| return checkpoints[account][lower].votes; | |
| } | |
| function _delegate(address delegator, address delegatee) | |
| internal | |
| { | |
| address currentDelegate = _delegates[delegator]; | |
| uint256 delegatorBalance = balanceOf(delegator); // balance of underlying MANYs (not scaled); | |
| _delegates[delegator] = delegatee; | |
| emit DelegateChanged(delegator, currentDelegate, delegatee); | |
| _moveDelegates(currentDelegate, delegatee, delegatorBalance); | |
| } | |
| function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { | |
| if (srcRep != dstRep && amount > 0) { | |
| if (srcRep != address(0)) { | |
| // decrease old representative | |
| uint32 srcRepNum = numCheckpoints[srcRep]; | |
| uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; | |
| uint256 srcRepNew = srcRepOld.sub(amount); | |
| _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); | |
| } | |
| if (dstRep != address(0)) { | |
| // increase new representative | |
| uint32 dstRepNum = numCheckpoints[dstRep]; | |
| uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; | |
| uint256 dstRepNew = dstRepOld.add(amount); | |
| _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); | |
| } | |
| } | |
| } | |
| function _writeCheckpoint( | |
| address delegatee, | |
| uint32 nCheckpoints, | |
| uint256 oldVotes, | |
| uint256 newVotes | |
| ) | |
| internal | |
| { | |
| uint32 blockNumber = safe32(block.number, "MANY::_writeCheckpoint: block number exceeds 32 bits"); | |
| if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { | |
| checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; | |
| } else { | |
| checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); | |
| numCheckpoints[delegatee] = nCheckpoints + 1; | |
| } | |
| emit DelegateVotesChanged(delegatee, oldVotes, newVotes); | |
| } | |
| function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { | |
| require(n < 2**32, errorMessage); | |
| return uint32(n); | |
| } | |
| function getChainId() internal pure returns (uint) { | |
| uint256 chainId; | |
| assembly { chainId := chainid() } | |
| return chainId; | |
| } | |
| } | |
| // MasterChef is the master of MANY. He can make MANY and he is a fair guy. | |
| // | |
| // Note that it's ownable and the owner wields tremendous power. The ownership | |
| // will be transferred to a governance smart contract once MANY is sufficiently | |
| // distributed and the community can show to govern itself. | |
| // | |
| // Have fun reading it. Hopefully it's bug-free. God bless. | |
| contract MasterChef is Ownable { | |
| using SafeMath for uint256; | |
| using SafeBEP20 for IBEP20; | |
| // Info of each user. | |
| struct UserInfo { | |
| uint256 amount; // How many LP tokens the user has provided. | |
| uint256 rewardDebt; // Reward debt. See explanation below. | |
| // | |
| // We do some fancy math here. Basically, any point in time, the amount of MANYs | |
| // entitled to a user but is pending to be distributed is: | |
| // | |
| // pending reward = (user.amount * pool.accMANYPerShare) - user.rewardDebt | |
| // | |
| // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: | |
| // 1. The pool's `accMANYPerShare` (and `lastRewardBlock`) gets updated. | |
| // 2. User receives the pending reward sent to his/her address. | |
| // 3. User's `amount` gets updated. | |
| // 4. User's `rewardDebt` gets updated. | |
| } | |
| // Info of each pool. | |
| struct PoolInfo { | |
| IBEP20 lpToken; // Address of LP token contract. | |
| uint256 allocPoint; // How many allocation points assigned to this pool. MANYs to distribute per block. | |
| uint256 lastRewardBlock; // Last block number that MANYs distribution occurs. | |
| uint256 accMANYPerShare; // Accumulated MANYs per share, times 1e12. See below. | |
| } | |
| // The MANY TOKEN! | |
| ManyToken public many; | |
| // Dev address. | |
| address public devaddr; | |
| // MANY tokens created per block. | |
| uint256 public manyPerBlock; | |
| // Bonus muliplier for early many makers. | |
| uint256 public BONUS_MULTIPLIER = 1; | |
| // Info of each pool. | |
| PoolInfo[] public poolInfo; | |
| // Info of each user that stakes LP tokens. | |
| mapping (uint256 => mapping (address => UserInfo)) public userInfo; | |
| // Total allocation poitns. Must be the sum of all allocation points in all pools. | |
| uint256 public totalAllocPoint = 0; | |
| // The block number when MANY mining starts. | |
| uint256 public startBlock; | |
| event Deposit(address indexed user, uint256 indexed pid, uint256 amount); | |
| event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); | |
| event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); | |
| constructor( | |
| ManyToken _many, | |
| address _devaddr, | |
| uint256 _manyPerBlock, | |
| uint256 _startBlock | |
| ) public { | |
| many = _many; | |
| devaddr = _devaddr; | |
| manyPerBlock = _manyPerBlock; | |
| startBlock = _startBlock; | |
| } | |
| function updateMultiplier(uint256 multiplierNumber) public onlyOwner { | |
| BONUS_MULTIPLIER = multiplierNumber; | |
| } | |
| function poolLength() external view returns (uint256) { | |
| return poolInfo.length; | |
| } | |
| // Add a new lp to the pool. Can only be called by the owner. | |
| // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | |
| function add(uint256 _allocPoint, IBEP20 _lpToken, bool _withUpdate) public onlyOwner { | |
| if (_withUpdate) { | |
| massUpdatePools(); | |
| } | |
| uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; | |
| totalAllocPoint = totalAllocPoint.add(_allocPoint); | |
| poolInfo.push(PoolInfo({ | |
| lpToken: _lpToken, | |
| allocPoint: _allocPoint, | |
| lastRewardBlock: lastRewardBlock, | |
| accMANYPerShare: 0 | |
| })); | |
| // updateStakingPool(); | |
| } | |
| // Update the given pool's MANY allocation point. Can only be called by the owner. | |
| function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner { | |
| if (_withUpdate) { | |
| massUpdatePools(); | |
| } | |
| totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); | |
| // uint256 prevAllocPoint = poolInfo[_pid].allocPoint; | |
| poolInfo[_pid].allocPoint = _allocPoint; | |
| // if (prevAllocPoint != _allocPoint) { | |
| // updateStakingPool(); | |
| // } | |
| } | |
| // function updateStakingPool() internal { | |
| // uint256 length = poolInfo.length; | |
| // uint256 points = 0; | |
| // for (uint256 pid = 1; pid < length; ++pid) { | |
| // points = points.add(poolInfo[pid].allocPoint); | |
| // } | |
| // if (points != 0) { | |
| // points = points.div(3); | |
| // totalAllocPoint = totalAllocPoint.sub(poolInfo[0].allocPoint).add(points); | |
| // poolInfo[0].allocPoint = points; | |
| // } | |
| // } | |
| // Return reward multiplier over the given _from to _to block. | |
| function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { | |
| return _to.sub(_from).mul(BONUS_MULTIPLIER); | |
| } | |
| // View function to see pending MANYs on frontend. | |
| function pendingMany(uint256 _pid, address _user) external view returns (uint256) { | |
| PoolInfo storage pool = poolInfo[_pid]; | |
| UserInfo storage user = userInfo[_pid][_user]; | |
| uint256 accMANYPerShare = pool.accMANYPerShare; | |
| uint256 lpSupply = pool.lpToken.balanceOf(address(this)); | |
| if (block.number > pool.lastRewardBlock && lpSupply != 0) { | |
| uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); | |
| uint256 manyReward = multiplier.mul(manyPerBlock).mul(pool.allocPoint).div(totalAllocPoint); | |
| accMANYPerShare = accMANYPerShare.add(manyReward.mul(1e12).div(lpSupply)); | |
| } | |
| return user.amount.mul(accMANYPerShare).div(1e12).sub(user.rewardDebt); | |
| } | |
| // Update reward variables for all pools. Be careful of gas spending! | |
| function massUpdatePools() public { | |
| uint256 length = poolInfo.length; | |
| for (uint256 pid = 0; pid < length; ++pid) { | |
| updatePool(pid); | |
| } | |
| } | |
| // Update reward variables of the given pool to be up-to-date. | |
| function updatePool(uint256 _pid) public { | |
| PoolInfo storage pool = poolInfo[_pid]; | |
| if (block.number <= pool.lastRewardBlock) { | |
| return; | |
| } | |
| uint256 lpSupply = pool.lpToken.balanceOf(address(this)); | |
| if (lpSupply == 0) { | |
| pool.lastRewardBlock = block.number; | |
| return; | |
| } | |
| uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); | |
| uint256 manyReward = multiplier.mul(manyPerBlock).mul(pool.allocPoint).div(totalAllocPoint); | |
| many.mint(devaddr, manyReward.div(10)); | |
| many.mint(address(this), manyReward); | |
| pool.accMANYPerShare = pool.accMANYPerShare.add(manyReward.mul(1e12).div(lpSupply)); | |
| pool.lastRewardBlock = block.number; | |
| } | |
| // Deposit LP tokens to MasterChef for MANY allocation. | |
| function deposit(uint256 _pid, uint256 _amount) public { | |
| PoolInfo storage pool = poolInfo[_pid]; | |
| UserInfo storage user = userInfo[_pid][msg.sender]; | |
| updatePool(_pid); | |
| if (user.amount > 0) { | |
| uint256 pending = user.amount.mul(pool.accMANYPerShare).div(1e12).sub(user.rewardDebt); | |
| if(pending > 0) { | |
| safeManyTransfer(msg.sender, pending); | |
| } | |
| } | |
| if (_amount > 0) { | |
| pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); | |
| user.amount = user.amount.add(_amount); | |
| } | |
| user.rewardDebt = user.amount.mul(pool.accMANYPerShare).div(1e12); | |
| emit Deposit(msg.sender, _pid, _amount); | |
| } | |
| // Withdraw LP tokens from MasterChef. | |
| function withdraw(uint256 _pid, uint256 _amount) public { | |
| PoolInfo storage pool = poolInfo[_pid]; | |
| UserInfo storage user = userInfo[_pid][msg.sender]; | |
| require(user.amount >= _amount, "withdraw: not good"); | |
| updatePool(_pid); | |
| uint256 pending = user.amount.mul(pool.accMANYPerShare).div(1e12).sub(user.rewardDebt); | |
| if(pending > 0) { | |
| safeManyTransfer(msg.sender, pending); | |
| } | |
| if(_amount > 0) { | |
| user.amount = user.amount.sub(_amount); | |
| pool.lpToken.safeTransfer(address(msg.sender), _amount); | |
| } | |
| user.rewardDebt = user.amount.mul(pool.accMANYPerShare).div(1e12); | |
| emit Withdraw(msg.sender, _pid, _amount); | |
| } | |
| // Withdraw without caring about rewards. EMERGENCY ONLY. | |
| function emergencyWithdraw(uint256 _pid) public { | |
| PoolInfo storage pool = poolInfo[_pid]; | |
| UserInfo storage user = userInfo[_pid][msg.sender]; | |
| pool.lpToken.safeTransfer(address(msg.sender), user.amount); | |
| emit EmergencyWithdraw(msg.sender, _pid, user.amount); | |
| user.amount = 0; | |
| user.rewardDebt = 0; | |
| } | |
| // Safe MANY transfer function, just in case if rounding error causes pool to not have enough MANYs. | |
| function safeManyTransfer(address _to, uint256 _amount) internal { | |
| uint256 manyBal = many.balanceOf(address(this)); | |
| if (_amount > manyBal) { | |
| many.transfer(_to, manyBal); | |
| } else { | |
| many.transfer(_to, _amount); | |
| } | |
| } | |
| // Update dev address by the previous dev. | |
| function dev(address _devaddr) public { | |
| require(msg.sender == devaddr, "dev: wut?"); | |
| devaddr = _devaddr; | |
| } | |
| //Pancake has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all. | |
| function updateEmissionRate(uint256 _manyPerBlock) public onlyOwner { | |
| massUpdatePools(); | |
| manyPerBlock = _manyPerBlock; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Submitted for verification at BscScan.com on 2020-09-28 | |
| */ | |
| pragma solidity 0.6.12; | |
| // | |
| /** | |
| * @dev Wrappers over Solidity's arithmetic operations with added overflow | |
| * checks. | |
| * | |
| * Arithmetic operations in Solidity wrap on overflow. This can easily result | |
| * in bugs, because programmers usually assume that an overflow raises an | |
| * error, which is the standard behavior in high level programming languages. | |
| * `SafeMath` restores this intuition by reverting the transaction when an | |
| * operation overflows. | |
| * | |
| * Using this library instead of the unchecked operations eliminates an entire | |
| * class of bugs, so it's recommended to use it always. | |
| */ | |
| library SafeMath { | |
| /** | |
| * @dev Returns the addition of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `+` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Addition cannot overflow. | |
| */ | |
| function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
| uint256 c = a + b; | |
| require(c >= a, 'SafeMath: addition overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return sub(a, b, 'SafeMath: subtraction overflow'); | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting with custom message on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b <= a, errorMessage); | |
| uint256 c = a - b; | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the multiplication of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `*` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Multiplication cannot overflow. | |
| */ | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| // Gas optimization: this is cheaper than requiring 'a' not being zero, but the | |
| // benefit is lost if 'b' is also tested. | |
| // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 | |
| if (a == 0) { | |
| return 0; | |
| } | |
| uint256 c = a * b; | |
| require(c / a == b, 'SafeMath: multiplication overflow'); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return div(a, b, 'SafeMath: division by zero'); | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts with custom message on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b > 0, errorMessage); | |
| uint256 c = a / b; | |
| // assert(a == b * c + a % b); // There is no case in which this doesn't hold | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return mod(a, b, 'SafeMath: modulo by zero'); | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts with custom message when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod( | |
| uint256 a, | |
| uint256 b, | |
| string memory errorMessage | |
| ) internal pure returns (uint256) { | |
| require(b != 0, errorMessage); | |
| return a % b; | |
| } | |
| function min(uint256 x, uint256 y) internal pure returns (uint256 z) { | |
| z = x < y ? x : y; | |
| } | |
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | |
| function sqrt(uint256 y) internal pure returns (uint256 z) { | |
| if (y > 3) { | |
| z = y; | |
| uint256 x = y / 2 + 1; | |
| while (x < z) { | |
| z = x; | |
| x = (y / x + x) / 2; | |
| } | |
| } else if (y != 0) { | |
| z = 1; | |
| } | |
| } | |
| } | |
| // | |
| interface IBEP20 { | |
| /** | |
| * @dev Returns the amount of tokens in existence. | |
| */ | |
| function totalSupply() external view returns (uint256); | |
| /** | |
| * @dev Returns the token decimals. | |
| */ | |
| function decimals() external view returns (uint8); | |
| /** | |
| * @dev Returns the token symbol. | |
| */ | |
| function symbol() external view returns (string memory); | |
| /** | |
| * @dev Returns the token name. | |
| */ | |
| function name() external view returns (string memory); | |
| /** | |
| * @dev Returns the bep token owner. | |
| */ | |
| function getOwner() external view returns (address); | |
| /** | |
| * @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 `recipient`. | |
| * | |
| * Returns a boolean value indicating whether the operation succeeded. | |
| * | |
| * Emits a {Transfer} event. | |
| */ | |
| function transfer(address recipient, 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 `sender` to `recipient` 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 sender, | |
| address recipient, | |
| uint256 amount | |
| ) external returns (bool); | |
| /** | |
| * @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 Collection of functions related to the address type | |
| */ | |
| library Address { | |
| /** | |
| * @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 | |
| * ==== | |
| */ | |
| function isContract(address account) internal view returns (bool) { | |
| // According to EIP-1052, 0x0 is the value returned for not-yet created accounts | |
| // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned | |
| // for accounts without code, i.e. `keccak256('')` | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| codehash := extcodehash(account) | |
| } | |
| return (codehash != accountHash && codehash != 0x0); | |
| } | |
| /** | |
| * @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'); | |
| // solhint-disable-next-line avoid-low-level-calls, avoid-call-value | |
| (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'); | |
| return _functionCallWithValue(target, data, value, errorMessage); | |
| } | |
| function _functionCallWithValue( | |
| address target, | |
| bytes memory data, | |
| uint256 weiValue, | |
| string memory errorMessage | |
| ) private returns (bytes memory) { | |
| require(isContract(target), 'Address: call to non-contract'); | |
| // solhint-disable-next-line avoid-low-level-calls | |
| (bool success, bytes memory returndata) = target.call{value: weiValue}(data); | |
| 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 | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| let returndata_size := mload(returndata) | |
| revert(add(32, returndata), returndata_size) | |
| } | |
| } else { | |
| revert(errorMessage); | |
| } | |
| } | |
| } | |
| } | |
| // | |
| /** | |
| * @title SafeBEP20 | |
| * @dev Wrappers around BEP20 operations that throw on failure (when the token | |
| * contract returns false). Tokens that return no value (and instead revert or | |
| * throw on failure) are also supported, non-reverting calls are assumed to be | |
| * successful. | |
| * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract, | |
| * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. | |
| */ | |
| library SafeBEP20 { | |
| using SafeMath for uint256; | |
| using Address for address; | |
| function safeTransfer( | |
| IBEP20 token, | |
| address to, | |
| uint256 value | |
| ) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); | |
| } | |
| function safeTransferFrom( | |
| IBEP20 token, | |
| address from, | |
| address to, | |
| uint256 value | |
| ) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); | |
| } | |
| /** | |
| * @dev Deprecated. This function has issues similar to the ones found in | |
| * {IBEP20-approve}, and its usage is discouraged. | |
| * | |
| * Whenever possible, use {safeIncreaseAllowance} and | |
| * {safeDecreaseAllowance} instead. | |
| */ | |
| function safeApprove( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| // safeApprove should only be called when setting an initial allowance, | |
| // or when resetting it to zero. To increase and decrease it, use | |
| // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' | |
| // solhint-disable-next-line max-line-length | |
| require( | |
| (value == 0) || (token.allowance(address(this), spender) == 0), | |
| 'SafeBEP20: approve from non-zero to non-zero allowance' | |
| ); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); | |
| } | |
| function safeIncreaseAllowance( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).add(value); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| function safeDecreaseAllowance( | |
| IBEP20 token, | |
| address spender, | |
| uint256 value | |
| ) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).sub( | |
| value, | |
| 'SafeBEP20: decreased allowance below zero' | |
| ); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| /** | |
| * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement | |
| * on the return value: the return value is optional (but if data is returned, it must not be false). | |
| * @param token The token targeted by the call. | |
| * @param data The call data (encoded using abi.encode or one of its variants). | |
| */ | |
| function _callOptionalReturn(IBEP20 token, bytes memory data) private { | |
| // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since | |
| // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that | |
| // the target address contains contract code and also asserts for success in the low-level call. | |
| bytes memory returndata = address(token).functionCall(data, 'SafeBEP20: low-level call failed'); | |
| if (returndata.length > 0) { | |
| // Return data is optional | |
| // solhint-disable-next-line max-line-length | |
| require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed'); | |
| } | |
| } | |
| } | |
| // import "@nomiclabs/buidler/console.sol"; | |
| // SousChef is the chef of new tokens. He can make yummy food and he is a fair guy as well as MasterChef. | |
| contract SousChef { | |
| using SafeMath for uint256; | |
| using SafeBEP20 for IBEP20; | |
| // Info of each user. | |
| struct UserInfo { | |
| uint256 amount; | |
| uint256 rewardDebt; | |
| uint256 rewardPending; | |
| } | |
| // Info of Pool | |
| struct PoolInfo { | |
| uint256 lastRewardBlock; // Last block number that Rewards distribution occurs. | |
| uint256 accRewardPerShare; // Accumulated reward per share, times 1e12. See below. | |
| } | |
| // The SYRUP TOKEN! | |
| IBEP20 public syrup; | |
| // rewards created per block. | |
| uint256 public rewardPerBlock; | |
| // Info. | |
| PoolInfo public poolInfo; | |
| // Info of each user that stakes Syrup tokens. | |
| mapping (address => UserInfo) public userInfo; | |
| // addresses list | |
| address[] public addressList; | |
| // The block number when mining starts. | |
| uint256 public startBlock; | |
| // The block number when mining ends. | |
| uint256 public bonusEndBlock; | |
| event Deposit(address indexed user, uint256 amount); | |
| event Withdraw(address indexed user, uint256 amount); | |
| event EmergencyWithdraw(address indexed user, uint256 amount); | |
| constructor( | |
| IBEP20 _syrup, | |
| uint256 _rewardPerBlock, | |
| uint256 _startBlock, | |
| uint256 _endBlock | |
| ) public { | |
| syrup = _syrup; | |
| rewardPerBlock = _rewardPerBlock; | |
| startBlock = _startBlock; | |
| bonusEndBlock = _endBlock; | |
| // staking pool | |
| poolInfo = PoolInfo({ | |
| lastRewardBlock: startBlock, | |
| accRewardPerShare: 0 | |
| }); | |
| } | |
| function addressLength() external view returns (uint256) { | |
| return addressList.length; | |
| } | |
| // Return reward multiplier over the given _from to _to block. | |
| function getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) { | |
| if (_to <= bonusEndBlock) { | |
| return _to.sub(_from); | |
| } else if (_from >= bonusEndBlock) { | |
| return 0; | |
| } else { | |
| return bonusEndBlock.sub(_from); | |
| } | |
| } | |
| // View function to see pending Tokens on frontend. | |
| function pendingReward(address _user) external view returns (uint256) { | |
| PoolInfo storage pool = poolInfo; | |
| UserInfo storage user = userInfo[_user]; | |
| uint256 accRewardPerShare = pool.accRewardPerShare; | |
| uint256 stakedSupply = syrup.balanceOf(address(this)); | |
| if (block.number > pool.lastRewardBlock && stakedSupply != 0) { | |
| uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); | |
| uint256 tokenReward = multiplier.mul(rewardPerBlock); | |
| accRewardPerShare = accRewardPerShare.add(tokenReward.mul(1e12).div(stakedSupply)); | |
| } | |
| return user.amount.mul(accRewardPerShare).div(1e12).sub(user.rewardDebt).add(user.rewardPending); | |
| } | |
| // Update reward variables of the given pool to be up-to-date. | |
| function updatePool() public { | |
| if (block.number <= poolInfo.lastRewardBlock) { | |
| return; | |
| } | |
| uint256 syrupSupply = syrup.balanceOf(address(this)); | |
| if (syrupSupply == 0) { | |
| poolInfo.lastRewardBlock = block.number; | |
| return; | |
| } | |
| uint256 multiplier = getMultiplier(poolInfo.lastRewardBlock, block.number); | |
| uint256 tokenReward = multiplier.mul(rewardPerBlock); | |
| poolInfo.accRewardPerShare = poolInfo.accRewardPerShare.add(tokenReward.mul(1e12).div(syrupSupply)); | |
| poolInfo.lastRewardBlock = block.number; | |
| } | |
| // Deposit Syrup tokens to SousChef for Reward allocation. | |
| function deposit(uint256 _amount) public { | |
| require (_amount > 0, 'amount 0'); | |
| UserInfo storage user = userInfo[msg.sender]; | |
| updatePool(); | |
| syrup.safeTransferFrom(address(msg.sender), address(this), _amount); | |
| if (user.amount == 0 && user.rewardDebt == 0 && user.rewardPending ==0) { | |
| addressList.push(address(msg.sender)); | |
| } | |
| user.rewardPending = user.amount.mul(poolInfo.accRewardPerShare).div(1e12).sub(user.rewardDebt).add(user.rewardPending); | |
| user.amount = user.amount.add(_amount); | |
| user.rewardDebt = user.amount.mul(poolInfo.accRewardPerShare).div(1e12); | |
| emit Deposit(msg.sender, _amount); | |
| } | |
| // Withdraw Syrup tokens from SousChef. | |
| function withdraw(uint256 _amount) public { | |
| require (_amount > 0, 'amount 0'); | |
| UserInfo storage user = userInfo[msg.sender]; | |
| require(user.amount >= _amount, "withdraw: not enough"); | |
| updatePool(); | |
| syrup.safeTransfer(address(msg.sender), _amount); | |
| user.rewardPending = user.amount.mul(poolInfo.accRewardPerShare).div(1e12).sub(user.rewardDebt).add(user.rewardPending); | |
| user.amount = user.amount.sub(_amount); | |
| user.rewardDebt = user.amount.mul(poolInfo.accRewardPerShare).div(1e12); | |
| emit Withdraw(msg.sender, _amount); | |
| } | |
| // Withdraw without caring about rewards. EMERGENCY ONLY. | |
| function emergencyWithdraw() public { | |
| UserInfo storage user = userInfo[msg.sender]; | |
| syrup.safeTransfer(address(msg.sender), user.amount); | |
| emit EmergencyWithdraw(msg.sender, user.amount); | |
| user.amount = 0; | |
| user.rewardDebt = 0; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Submitted for verification at BscScan.com on 2021-02-25 | |
| */ | |
| // SPDX-License-Identifier: No License | |
| pragma solidity 0.6.6; | |
| /** | |
| * @dev Wrappers over Solidity's arithmetic operations with added overflow | |
| * checks. | |
| * | |
| * Arithmetic operations in Solidity wrap on overflow. This can easily result | |
| * in bugs, because programmers usually assume that an overflow raises an | |
| * error, which is the standard behavior in high level programming languages. | |
| * `SafeMath` restores this intuition by reverting the transaction when an | |
| * operation overflows. | |
| * | |
| * Using this library instead of the unchecked operations eliminates an entire | |
| * class of bugs, so it's recommended to use it always. | |
| */ | |
| library SafeMath { | |
| /** | |
| * @dev Returns the addition of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `+` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Addition cannot overflow. | |
| */ | |
| function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
| uint256 c = a + b; | |
| require(c >= a, "SafeMath: addition overflow"); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return sub(a, b, "SafeMath: subtraction overflow"); | |
| } | |
| /** | |
| * @dev Returns the subtraction of two unsigned integers, reverting with custom message on | |
| * overflow (when the result is negative). | |
| * | |
| * Counterpart to Solidity's `-` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Subtraction cannot overflow. | |
| */ | |
| function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
| require(b <= a, errorMessage); | |
| uint256 c = a - b; | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the multiplication of two unsigned integers, reverting on | |
| * overflow. | |
| * | |
| * Counterpart to Solidity's `*` operator. | |
| * | |
| * Requirements: | |
| * | |
| * - Multiplication cannot overflow. | |
| */ | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| // Gas optimization: this is cheaper than requiring 'a' not being zero, but the | |
| // benefit is lost if 'b' is also tested. | |
| // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 | |
| if (a == 0) { | |
| return 0; | |
| } | |
| uint256 c = a * b; | |
| require(c / a == b, "SafeMath: multiplication overflow"); | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return div(a, b, "SafeMath: division by zero"); | |
| } | |
| /** | |
| * @dev Returns the integer division of two unsigned integers. Reverts with custom message on | |
| * division by zero. The result is rounded towards zero. | |
| * | |
| * Counterpart to Solidity's `/` operator. Note: this function uses a | |
| * `revert` opcode (which leaves remaining gas untouched) while Solidity | |
| * uses an invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
| require(b > 0, errorMessage); | |
| uint256 c = a / b; | |
| // assert(a == b * c + a % b); // There is no case in which this doesn't hold | |
| return c; | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod(uint256 a, uint256 b) internal pure returns (uint256) { | |
| return mod(a, b, "SafeMath: modulo by zero"); | |
| } | |
| /** | |
| * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), | |
| * Reverts with custom message when dividing by zero. | |
| * | |
| * Counterpart to Solidity's `%` operator. This function uses a `revert` | |
| * opcode (which leaves remaining gas untouched) while Solidity uses an | |
| * invalid opcode to revert (consuming all remaining gas). | |
| * | |
| * Requirements: | |
| * | |
| * - The divisor cannot be zero. | |
| */ | |
| function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { | |
| require(b != 0, errorMessage); | |
| return a % b; | |
| } | |
| } | |
| /** | |
| * @title SafeERC20 | |
| * @dev Wrappers around ERC20 operations that throw on failure (when the token | |
| * contract returns false). Tokens that return no value (and instead revert or | |
| * throw on failure) are also supported, non-reverting calls are assumed to be | |
| * successful. | |
| * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, | |
| * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. | |
| */ | |
| library SafeERC20 { | |
| using SafeMath for uint256; | |
| using Address for address; | |
| function safeTransfer(IERC20 token, address to, uint256 value) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); | |
| } | |
| function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); | |
| } | |
| /** | |
| * @dev Deprecated. This function has issues similar to the ones found in | |
| * {IERC20-approve}, and its usage is discouraged. | |
| * | |
| * Whenever possible, use {safeIncreaseAllowance} and | |
| * {safeDecreaseAllowance} instead. | |
| */ | |
| function safeApprove(IERC20 token, address spender, uint256 value) internal { | |
| // safeApprove should only be called when setting an initial allowance, | |
| // or when resetting it to zero. To increase and decrease it, use | |
| // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' | |
| // solhint-disable-next-line max-line-length | |
| require((value == 0) || (token.allowance(address(this), spender) == 0), | |
| "SafeERC20: approve from non-zero to non-zero allowance" | |
| ); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); | |
| } | |
| function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).add(value); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { | |
| uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); | |
| _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); | |
| } | |
| /** | |
| * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement | |
| * on the return value: the return value is optional (but if data is returned, it must not be false). | |
| * @param token The token targeted by the call. | |
| * @param data The call data (encoded using abi.encode or one of its variants). | |
| */ | |
| function _callOptionalReturn(IERC20 token, bytes memory data) private { | |
| // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since | |
| // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that | |
| // the target address contains contract code and also asserts for success in the low-level call. | |
| bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); | |
| if (returndata.length > 0) { // Return data is optional | |
| // solhint-disable-next-line max-line-length | |
| require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); | |
| } | |
| } | |
| } | |
| /** | |
| * @title Ownable | |
| * @dev The Ownable contract has an owner address, and provides basic authorization control | |
| * functions, this simplifies the implementation of "user permissions". | |
| */ | |
| contract Ownable { | |
| address public owner; | |
| event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
| /** | |
| * @dev The Ownable constructor sets the original `owner` of the contract to the sender | |
| * account. | |
| */ | |
| constructor () public { | |
| owner = msg.sender; | |
| } | |
| /** | |
| * @dev Throws if called by any account other than the owner. | |
| */ | |
| modifier onlyOwner() { | |
| require(msg.sender == owner); | |
| _; | |
| } | |
| /** | |
| * @dev Allows the current owner to transfer control of the contract to a newOwner. | |
| * @param newOwner The address to transfer ownership to. | |
| */ | |
| function transferOwnership(address newOwner) public onlyOwner { | |
| require(newOwner != address(0)); | |
| emit OwnershipTransferred(owner, newOwner); | |
| owner = newOwner; | |
| } | |
| } | |
| /** | |
| * @dev Collection of functions related to the address type | |
| */ | |
| library Address { | |
| /** | |
| * @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 | |
| * ==== | |
| */ | |
| function isContract(address account) internal view returns (bool) { | |
| // According to EIP-1052, 0x0 is the value returned for not-yet created accounts | |
| // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned | |
| // for accounts without code, i.e. `keccak256('')` | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { codehash := extcodehash(account) } | |
| return (codehash != accountHash && codehash != 0x0); | |
| } | |
| /** | |
| * @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"); | |
| // solhint-disable-next-line avoid-low-level-calls, avoid-call-value | |
| (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"); | |
| return _functionCallWithValue(target, data, value, errorMessage); | |
| } | |
| function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { | |
| require(isContract(target), "Address: call to non-contract"); | |
| // solhint-disable-next-line avoid-low-level-calls | |
| (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); | |
| 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 | |
| // solhint-disable-next-line no-inline-assembly | |
| assembly { | |
| let returndata_size := mload(returndata) | |
| revert(add(32, returndata), returndata_size) | |
| } | |
| } else { | |
| revert(errorMessage); | |
| } | |
| } | |
| } | |
| } | |
| /** | |
| * @dev Interface of the ERC20 standard as defined in the EIP. | |
| */ | |
| interface IERC20 { | |
| /** | |
| * @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 `recipient`. | |
| * | |
| * Returns a boolean value indicating whether the operation succeeded. | |
| * | |
| * Emits a {Transfer} event. | |
| */ | |
| function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); | |
| /** | |
| * @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); | |
| } | |
| contract ManyswapCrowdsale is Ownable { | |
| using SafeMath for uint256; | |
| using SafeERC20 for IERC20; | |
| //===============================================// | |
| // Contract Variables // | |
| //===============================================// | |
| // Start time 02/25/2021 @ 4:00pm (GMT) // | |
| uint256 public constant CROWDSALE_START_TIME = 1614268800; | |
| //Minimum contribution is 0.1 BNB | |
| uint256 public constant MIN_CONTRIBUTION = 100000000000000000; | |
| //Maximum contribution is 100 BNB | |
| uint256 public constant MAX_CONTRIBUTION = 100000000000000000000; | |
| // Contributions state | |
| mapping(address => uint256) public contributions; | |
| // Total wei raised (BNB) | |
| uint256 public weiRaised; | |
| // Pointer to the ManyToken | |
| IERC20 public manyToken; | |
| // How many manys do we send per BNB contributed. | |
| uint256 public manysPerBnb; | |
| //===============================================// | |
| // Constructor // | |
| //===============================================// | |
| constructor( | |
| IERC20 _manyToken, | |
| uint256 _manysPerBnb | |
| ) public Ownable() { | |
| manyToken = _manyToken; | |
| manysPerBnb = _manysPerBnb; | |
| } | |
| //===============================================// | |
| // Events // | |
| //===============================================// | |
| event TokenPurchase( | |
| address indexed beneficiary, | |
| uint256 weiAmount, | |
| uint256 tokenAmount | |
| ); | |
| //===============================================// | |
| // Methods // | |
| //===============================================// | |
| // Main entry point for buying into the Pre-Sale. Contract Receives $BNB | |
| function purchaseMANYTokens() external payable { | |
| // Validations. | |
| require( | |
| msg.sender != address(0), | |
| "ManysCrowdsale: beneficiary is the zero address" | |
| ); | |
| require(isOpen() == true, "Crowdsale has not yet started"); | |
| require(msg.value >= MIN_CONTRIBUTION, "ManysCrowdsale: minimum contribution is 0.1 BNB"); | |
| require(msg.value <= MAX_CONTRIBUTION, "ManysCrowdsale: maximum contribution is 100 BNB"); | |
| // If we've passed validations, let's get them $MANYs | |
| _buyTokens(msg.sender); | |
| } | |
| /** | |
| * Function to calculate how many `weiAmount` can the sender purchase | |
| * based on total available cap for this round, and how many eth they've contributed. | |
| * | |
| * At the end of the function we refund the remaining ETH not used for purchase. | |
| */ | |
| function _buyTokens(address beneficiary) internal { | |
| _buyTokens(beneficiary, msg.value); | |
| } | |
| /** | |
| * Function that perform the actual transfer of $MANYs | |
| */ | |
| function _buyTokens(address beneficiary, uint256 weiAmount) internal { | |
| // Update how much wei we have raised | |
| weiRaised = weiRaised.add(weiAmount); | |
| // Update how much wei has this address contributed | |
| contributions[beneficiary] = contributions[beneficiary].add(weiAmount); | |
| // Calculate how many $MANYs can be bought with that wei amount | |
| uint256 tokenAmount = _getTokenAmount(weiAmount); | |
| // Transfer the $MANYs to the beneficiary | |
| manyToken.safeTransfer(beneficiary, tokenAmount); | |
| // Create an event for this purchase | |
| emit TokenPurchase(beneficiary, weiAmount, tokenAmount); | |
| } | |
| // Calculate how many MANYs do they get given the amount of wei | |
| function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) | |
| { | |
| return weiAmount.mul(manysPerBnb); | |
| } | |
| // CONTROL FUNCTIONS | |
| // Is the sale open now? | |
| function isOpen() public view returns (bool) { | |
| return now >= CROWDSALE_START_TIME; | |
| } | |
| function changeManyBnbRate(uint256 _newRate) public onlyOwner returns(bool) { | |
| require(_newRate != 0, "New Rate can't be 0"); | |
| manysPerBnb = _newRate; | |
| return true; | |
| } | |
| function takeOutRemainingTokens() public onlyOwner { | |
| manyToken.safeTransfer(msg.sender, manyToken.balanceOf(address(this))); | |
| } | |
| function takeOutFundingRaised()public onlyOwner { | |
| payable(owner).transfer(address(this).balance); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Submitted for verification at BscScan.com on 2021-02-28 | |
| */ | |
| pragma solidity >=0.5.0; | |
| interface IManyswapFactory { | |
| event PairCreated(address indexed token0, address indexed token1, address pair, uint); | |
| function feeTo() external view returns (address); | |
| function feeToSetter() external view returns (address); | |
| function getPair(address tokenA, address tokenB) external view returns (address pair); | |
| function allPairs(uint) external view returns (address pair); | |
| function allPairsLength() external view returns (uint); | |
| function createPair(address tokenA, address tokenB) external returns (address pair); | |
| function setFeeTo(address) external; | |
| function setFeeToSetter(address) external; | |
| } | |
| // File: contracts/interfaces/IManyswapPair.sol | |
| pragma solidity >=0.5.0; | |
| interface IManyswapPair { | |
| event Approval(address indexed owner, address indexed spender, uint value); | |
| event Transfer(address indexed from, address indexed to, uint value); | |
| function name() external pure returns (string memory); | |
| function symbol() external pure returns (string memory); | |
| function decimals() external pure returns (uint8); | |
| function totalSupply() external view returns (uint); | |
| function balanceOf(address owner) external view returns (uint); | |
| function allowance(address owner, address spender) external view returns (uint); | |
| function approve(address spender, uint value) external returns (bool); | |
| function transfer(address to, uint value) external returns (bool); | |
| function transferFrom(address from, address to, uint value) external returns (bool); | |
| function DOMAIN_SEPARATOR() external view returns (bytes32); | |
| function PERMIT_TYPEHASH() external pure returns (bytes32); | |
| function nonces(address owner) external view returns (uint); | |
| function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; | |
| event Mint(address indexed sender, uint amount0, uint amount1); | |
| event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); | |
| event Swap( | |
| address indexed sender, | |
| uint amount0In, | |
| uint amount1In, | |
| uint amount0Out, | |
| uint amount1Out, | |
| address indexed to | |
| ); | |
| event Sync(uint112 reserve0, uint112 reserve1); | |
| function MINIMUM_LIQUIDITY() external pure returns (uint); | |
| function factory() external view returns (address); | |
| function token0() external view returns (address); | |
| function token1() external view returns (address); | |
| function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); | |
| function price0CumulativeLast() external view returns (uint); | |
| function price1CumulativeLast() external view returns (uint); | |
| function kLast() external view returns (uint); | |
| function mint(address to) external returns (uint liquidity); | |
| function burn(address to) external returns (uint amount0, uint amount1); | |
| function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; | |
| function skim(address to) external; | |
| function sync() external; | |
| function initialize(address, address) external; | |
| } | |
| // File: contracts/interfaces/IManyswapERC20.sol | |
| pragma solidity >=0.5.0; | |
| interface IManyswapERC20 { | |
| event Approval(address indexed owner, address indexed spender, uint value); | |
| event Transfer(address indexed from, address indexed to, uint value); | |
| function name() external pure returns (string memory); | |
| function symbol() external pure returns (string memory); | |
| function decimals() external pure returns (uint8); | |
| function totalSupply() external view returns (uint); | |
| function balanceOf(address owner) external view returns (uint); | |
| function allowance(address owner, address spender) external view returns (uint); | |
| function approve(address spender, uint value) external returns (bool); | |
| function transfer(address to, uint value) external returns (bool); | |
| function transferFrom(address from, address to, uint value) external returns (bool); | |
| function DOMAIN_SEPARATOR() external view returns (bytes32); | |
| function PERMIT_TYPEHASH() external pure returns (bytes32); | |
| function nonces(address owner) external view returns (uint); | |
| function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; | |
| } | |
| // File: contracts/libraries/SafeMath.sol | |
| pragma solidity =0.5.16; | |
| // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) | |
| library SafeMath { | |
| function add(uint x, uint y) internal pure returns (uint z) { | |
| require((z = x + y) >= x, 'ds-math-add-overflow'); | |
| } | |
| function sub(uint x, uint y) internal pure returns (uint z) { | |
| require((z = x - y) <= x, 'ds-math-sub-underflow'); | |
| } | |
| function mul(uint x, uint y) internal pure returns (uint z) { | |
| require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); | |
| } | |
| } | |
| // File: contracts/ManyswapERC20.sol | |
| pragma solidity =0.5.16; | |
| contract ManyswapERC20 is IManyswapERC20 { | |
| using SafeMath for uint; | |
| string public constant name = 'Manyswap LPs'; | |
| string public constant symbol = 'Many-LP'; | |
| uint8 public constant decimals = 18; | |
| uint public totalSupply; | |
| mapping(address => uint) public balanceOf; | |
| mapping(address => mapping(address => uint)) public allowance; | |
| bytes32 public DOMAIN_SEPARATOR; | |
| // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); | |
| bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; | |
| mapping(address => uint) public nonces; | |
| event Approval(address indexed owner, address indexed spender, uint value); | |
| event Transfer(address indexed from, address indexed to, uint value); | |
| constructor() public { | |
| uint chainId; | |
| assembly { | |
| chainId := chainid | |
| } | |
| DOMAIN_SEPARATOR = keccak256( | |
| abi.encode( | |
| keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), | |
| keccak256(bytes(name)), | |
| keccak256(bytes('1')), | |
| chainId, | |
| address(this) | |
| ) | |
| ); | |
| } | |
| function _mint(address to, uint value) internal { | |
| totalSupply = totalSupply.add(value); | |
| balanceOf[to] = balanceOf[to].add(value); | |
| emit Transfer(address(0), to, value); | |
| } | |
| function _burn(address from, uint value) internal { | |
| balanceOf[from] = balanceOf[from].sub(value); | |
| totalSupply = totalSupply.sub(value); | |
| emit Transfer(from, address(0), value); | |
| } | |
| function _approve(address owner, address spender, uint value) private { | |
| allowance[owner][spender] = value; | |
| emit Approval(owner, spender, value); | |
| } | |
| function _transfer(address from, address to, uint value) private { | |
| balanceOf[from] = balanceOf[from].sub(value); | |
| balanceOf[to] = balanceOf[to].add(value); | |
| emit Transfer(from, to, value); | |
| } | |
| function approve(address spender, uint value) external returns (bool) { | |
| _approve(msg.sender, spender, value); | |
| return true; | |
| } | |
| function transfer(address to, uint value) external returns (bool) { | |
| _transfer(msg.sender, to, value); | |
| return true; | |
| } | |
| function transferFrom(address from, address to, uint value) external returns (bool) { | |
| if (allowance[from][msg.sender] != uint(-1)) { | |
| allowance[from][msg.sender] = allowance[from][msg.sender].sub(value); | |
| } | |
| _transfer(from, to, value); | |
| return true; | |
| } | |
| function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external { | |
| require(deadline >= block.timestamp, 'Manyswap: EXPIRED'); | |
| bytes32 digest = keccak256( | |
| abi.encodePacked( | |
| '\x19\x01', | |
| DOMAIN_SEPARATOR, | |
| keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)) | |
| ) | |
| ); | |
| address recoveredAddress = ecrecover(digest, v, r, s); | |
| require(recoveredAddress != address(0) && recoveredAddress == owner, 'Manyswap: INVALID_SIGNATURE'); | |
| _approve(owner, spender, value); | |
| } | |
| } | |
| // File: contracts/libraries/Math.sol | |
| pragma solidity =0.5.16; | |
| // a library for performing various math operations | |
| library Math { | |
| function min(uint x, uint y) internal pure returns (uint z) { | |
| z = x < y ? x : y; | |
| } | |
| // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) | |
| function sqrt(uint y) internal pure returns (uint z) { | |
| if (y > 3) { | |
| z = y; | |
| uint x = y / 2 + 1; | |
| while (x < z) { | |
| z = x; | |
| x = (y / x + x) / 2; | |
| } | |
| } else if (y != 0) { | |
| z = 1; | |
| } | |
| } | |
| } | |
| // File: contracts/libraries/UQ112x112.sol | |
| pragma solidity =0.5.16; | |
| // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) | |
| // range: [0, 2**112 - 1] | |
| // resolution: 1 / 2**112 | |
| library UQ112x112 { | |
| uint224 constant Q112 = 2**112; | |
| // encode a uint112 as a UQ112x112 | |
| function encode(uint112 y) internal pure returns (uint224 z) { | |
| z = uint224(y) * Q112; // never overflows | |
| } | |
| // divide a UQ112x112 by a uint112, returning a UQ112x112 | |
| function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) { | |
| z = x / uint224(y); | |
| } | |
| } | |
| // File: contracts/interfaces/IERC20.sol | |
| pragma solidity >=0.5.0; | |
| interface IERC20 { | |
| event Approval(address indexed owner, address indexed spender, uint value); | |
| event Transfer(address indexed from, address indexed to, uint value); | |
| function name() external view returns (string memory); | |
| function symbol() external view returns (string memory); | |
| function decimals() external view returns (uint8); | |
| function totalSupply() external view returns (uint); | |
| function balanceOf(address owner) external view returns (uint); | |
| function allowance(address owner, address spender) external view returns (uint); | |
| function approve(address spender, uint value) external returns (bool); | |
| function transfer(address to, uint value) external returns (bool); | |
| function transferFrom(address from, address to, uint value) external returns (bool); | |
| } | |
| // File: contracts/interfaces/IManyswapCallee.sol | |
| pragma solidity >=0.5.0; | |
| interface IManyswapCallee { | |
| function manyswapCall(address sender, uint amount0, uint amount1, bytes calldata data) external; | |
| } | |
| // File: contracts/ManyswapPair.sol | |
| pragma solidity =0.5.16; | |
| contract ManyswapPair is IManyswapPair, ManyswapERC20 { | |
| using SafeMath for uint; | |
| using UQ112x112 for uint224; | |
| uint public constant MINIMUM_LIQUIDITY = 10**3; | |
| bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)'))); | |
| address public factory; | |
| address public token0; | |
| address public token1; | |
| uint112 private reserve0; // uses single storage slot, accessible via getReserves | |
| uint112 private reserve1; // uses single storage slot, accessible via getReserves | |
| uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves | |
| uint public price0CumulativeLast; | |
| uint public price1CumulativeLast; | |
| uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event | |
| uint private unlocked = 1; | |
| modifier lock() { | |
| require(unlocked == 1, 'Manyswap: LOCKED'); | |
| unlocked = 0; | |
| _; | |
| unlocked = 1; | |
| } | |
| function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) { | |
| _reserve0 = reserve0; | |
| _reserve1 = reserve1; | |
| _blockTimestampLast = blockTimestampLast; | |
| } | |
| function _safeTransfer(address token, address to, uint value) private { | |
| (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value)); | |
| require(success && (data.length == 0 || abi.decode(data, (bool))), 'Manyswap: TRANSFER_FAILED'); | |
| } | |
| event Mint(address indexed sender, uint amount0, uint amount1); | |
| event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); | |
| event Swap( | |
| address indexed sender, | |
| uint amount0In, | |
| uint amount1In, | |
| uint amount0Out, | |
| uint amount1Out, | |
| address indexed to | |
| ); | |
| event Sync(uint112 reserve0, uint112 reserve1); | |
| constructor() public { | |
| factory = msg.sender; | |
| } | |
| // called once by the factory at time of deployment | |
| function initialize(address _token0, address _token1) external { | |
| require(msg.sender == factory, 'Manyswap: FORBIDDEN'); // sufficient check | |
| token0 = _token0; | |
| token1 = _token1; | |
| } | |
| // update reserves and, on the first call per block, price accumulators | |
| function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private { | |
| require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'Manyswap: OVERFLOW'); | |
| uint32 blockTimestamp = uint32(block.timestamp % 2**32); | |
| uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired | |
| if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) { | |
| // * never overflows, and + overflow is desired | |
| price0CumulativeLast += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed; | |
| price1CumulativeLast += uint(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed; | |
| } | |
| reserve0 = uint112(balance0); | |
| reserve1 = uint112(balance1); | |
| blockTimestampLast = blockTimestamp; | |
| emit Sync(reserve0, reserve1); | |
| } | |
| // if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k) | |
| function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) { | |
| address feeTo = IManyswapFactory(factory).feeTo(); | |
| feeOn = feeTo != address(0); | |
| uint _kLast = kLast; // gas savings | |
| if (feeOn) { | |
| if (_kLast != 0) { | |
| uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1)); | |
| uint rootKLast = Math.sqrt(_kLast); | |
| if (rootK > rootKLast) { | |
| uint numerator = totalSupply.mul(rootK.sub(rootKLast)); | |
| uint denominator = rootK.mul(3).add(rootKLast); | |
| uint liquidity = numerator / denominator; | |
| if (liquidity > 0) _mint(feeTo, liquidity); | |
| } | |
| } | |
| } else if (_kLast != 0) { | |
| kLast = 0; | |
| } | |
| } | |
| // this low-level function should be called from a contract which performs important safety checks | |
| function mint(address to) external lock returns (uint liquidity) { | |
| (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings | |
| uint balance0 = IERC20(token0).balanceOf(address(this)); | |
| uint balance1 = IERC20(token1).balanceOf(address(this)); | |
| uint amount0 = balance0.sub(_reserve0); | |
| uint amount1 = balance1.sub(_reserve1); | |
| bool feeOn = _mintFee(_reserve0, _reserve1); | |
| uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee | |
| if (_totalSupply == 0) { | |
| liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY); | |
| _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens | |
| } else { | |
| liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1); | |
| } | |
| require(liquidity > 0, 'Manyswap: INSUFFICIENT_LIQUIDITY_MINTED'); | |
| _mint(to, liquidity); | |
| _update(balance0, balance1, _reserve0, _reserve1); | |
| if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date | |
| emit Mint(msg.sender, amount0, amount1); | |
| } | |
| // this low-level function should be called from a contract which performs important safety checks | |
| function burn(address to) external lock returns (uint amount0, uint amount1) { | |
| (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings | |
| address _token0 = token0; // gas savings | |
| address _token1 = token1; // gas savings | |
| uint balance0 = IERC20(_token0).balanceOf(address(this)); | |
| uint balance1 = IERC20(_token1).balanceOf(address(this)); | |
| uint liquidity = balanceOf[address(this)]; | |
| bool feeOn = _mintFee(_reserve0, _reserve1); | |
| uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee | |
| amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution | |
| amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution | |
| require(amount0 > 0 && amount1 > 0, 'Manyswap: INSUFFICIENT_LIQUIDITY_BURNED'); | |
| _burn(address(this), liquidity); | |
| _safeTransfer(_token0, to, amount0); | |
| _safeTransfer(_token1, to, amount1); | |
| balance0 = IERC20(_token0).balanceOf(address(this)); | |
| balance1 = IERC20(_token1).balanceOf(address(this)); | |
| _update(balance0, balance1, _reserve0, _reserve1); | |
| if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date | |
| emit Burn(msg.sender, amount0, amount1, to); | |
| } | |
| // this low-level function should be called from a contract which performs important safety checks | |
| function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock { | |
| require(amount0Out > 0 || amount1Out > 0, 'Manyswap: INSUFFICIENT_OUTPUT_AMOUNT'); | |
| (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings | |
| require(amount0Out < _reserve0 && amount1Out < _reserve1, 'Manyswap: INSUFFICIENT_LIQUIDITY'); | |
| uint balance0; | |
| uint balance1; | |
| { // scope for _token{0,1}, avoids stack too deep errors | |
| address _token0 = token0; | |
| address _token1 = token1; | |
| require(to != _token0 && to != _token1, 'Manyswap: INVALID_TO'); | |
| if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens | |
| if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens | |
| if (data.length > 0) IManyswapCallee(to).manyswapCall(msg.sender, amount0Out, amount1Out, data); | |
| balance0 = IERC20(_token0).balanceOf(address(this)); | |
| balance1 = IERC20(_token1).balanceOf(address(this)); | |
| } | |
| uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0; | |
| uint amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0; | |
| require(amount0In > 0 || amount1In > 0, 'Manyswap: INSUFFICIENT_INPUT_AMOUNT'); | |
| { // scope for reserve{0,1}Adjusted, avoids stack too deep errors | |
| uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(2)); | |
| uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(2)); | |
| require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(1000**2), 'Manyswap: K'); | |
| } | |
| _update(balance0, balance1, _reserve0, _reserve1); | |
| emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to); | |
| } | |
| // force balances to match reserves | |
| function skim(address to) external lock { | |
| address _token0 = token0; // gas savings | |
| address _token1 = token1; // gas savings | |
| _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0)); | |
| _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1)); | |
| } | |
| // force reserves to match balances | |
| function sync() external lock { | |
| _update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1); | |
| } | |
| } | |
| // File: contracts/ManyswapFactory.sol | |
| pragma solidity =0.5.16; | |
| contract ManyswapFactory is IManyswapFactory { | |
| bytes32 public constant INIT_CODE_PAIR_HASH = keccak256(abi.encodePacked(type(ManyswapPair).creationCode)); | |
| address public feeTo; | |
| address public feeToSetter; | |
| mapping(address => mapping(address => address)) public getPair; | |
| address[] public allPairs; | |
| event PairCreated(address indexed token0, address indexed token1, address pair, uint); | |
| constructor(address _feeToSetter) public { | |
| feeToSetter = _feeToSetter; | |
| } | |
| function allPairsLength() external view returns (uint) { | |
| return allPairs.length; | |
| } | |
| function createPair(address tokenA, address tokenB) external returns (address pair) { | |
| require(tokenA != tokenB, 'Manyswap: IDENTICAL_ADDRESSES'); | |
| (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); | |
| require(token0 != address(0), 'Manyswap: ZERO_ADDRESS'); | |
| require(getPair[token0][token1] == address(0), 'Manyswap: PAIR_EXISTS'); // single check is sufficient | |
| bytes memory bytecode = type(ManyswapPair).creationCode; | |
| bytes32 salt = keccak256(abi.encodePacked(token0, token1)); | |
| assembly { | |
| pair := create2(0, add(bytecode, 32), mload(bytecode), salt) | |
| } | |
| IManyswapPair(pair).initialize(token0, token1); | |
| getPair[token0][token1] = pair; | |
| getPair[token1][token0] = pair; // populate mapping in the reverse direction | |
| allPairs.push(pair); | |
| emit PairCreated(token0, token1, pair, allPairs.length); | |
| } | |
| function setFeeTo(address _feeTo) external { | |
| require(msg.sender == feeToSetter, 'Manyswap: FORBIDDEN'); | |
| feeTo = _feeTo; | |
| } | |
| function setFeeToSetter(address _feeToSetter) external { | |
| require(msg.sender == feeToSetter, 'Manyswap: FORBIDDEN'); | |
| feeToSetter = _feeToSetter; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.6.0; | |
| import "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
| contract OpenWeatherConsumer is ChainlinkClient { | |
| address private oracle; | |
| bytes32 private jobId; | |
| uint256 private fee; | |
| uint256 public result; | |
| /** | |
| * Network: Kovan | |
| * Oracle: | |
| * Name: Alpha Chain - Kovan | |
| * Listing URL: https://market.link/nodes/ef076e87-49f4-486b-9878-c4806781c7a0?start=1614168653&end=1614773453 | |
| * Address: 0xAA1DC356dc4B18f30C347798FD5379F3D77ABC5b | |
| * Job: | |
| * Name: OpenWeather Data | |
| * Listing URL: https://market.link/jobs/e10388e6-1a8a-4ff5-bad6-dd930049a65f | |
| * ID: 235f8b1eeb364efc83c26d0bef2d0c01 | |
| * Fee: 0.1 LINK | |
| */ | |
| constructor() public { | |
| setPublicChainlinkToken(); | |
| oracle = 0xAA1DC356dc4B18f30C347798FD5379F3D77ABC5b; | |
| jobId = "235f8b1eeb364efc83c26d0bef2d0c01"; | |
| fee = 0.1 * 10 ** 18; | |
| } | |
| /** | |
| * Initial request | |
| */ | |
| function requestWeatherTemperature(string memory _city) public { | |
| Chainlink.Request memory req = buildChainlinkRequest(jobId, address(this), this.fulfillWeatherTemperature.selector); | |
| req.add("city", _city); | |
| sendChainlinkRequestTo(oracle, req, fee); | |
| } | |
| /** | |
| * Callback function | |
| */ | |
| function fulfillWeatherTemperature(bytes32 _requestId, uint256 _result) public recordChainlinkFulfillment(_requestId) { | |
| result = _result; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Right click on the script name and hit "Run" to execute | |
| (async () => { | |
| try { | |
| console.log('Running deployWithEthers script...') | |
| const contractName = 'Storage' // Change this for other contract | |
| const constructorArgs = [] // Put constructor args (if any) here for your contract | |
| // Note that the script needs the ABI which is generated from the compilation artifact. | |
| // Make sure contract is compiled and artifacts are generated | |
| const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path | |
| const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) | |
| // 'web3Provider' is a remix global variable object | |
| const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() | |
| let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); | |
| let contract = await factory.deploy(...constructorArgs); | |
| console.log('Contract Address: ', contract.address); | |
| // The contract is NOT deployed yet; we must wait until it is mined | |
| await contract.deployed() | |
| console.log('Deployment successful.') | |
| } catch (e) { | |
| console.log(e.message) | |
| } | |
| })() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Right click on the script name and hit "Run" to execute | |
| (async () => { | |
| try { | |
| console.log('Running deployWithWeb3 script...') | |
| const contractName = 'Storage' // Change this for other contract | |
| const constructorArgs = [] // Put constructor args (if any) here for your contract | |
| // Note that the script needs the ABI which is generated from the compilation artifact. | |
| // Make sure contract is compiled and artifacts are generated | |
| const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path | |
| const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) | |
| const accounts = await web3.eth.getAccounts() | |
| let contract = new web3.eth.Contract(metadata.abi) | |
| contract = contract.deploy({ | |
| data: metadata.data.bytecode.object, | |
| arguments: constructorArgs | |
| }) | |
| const newContractInstance = await contract.send({ | |
| from: accounts[0], | |
| gas: 1500000, | |
| gasPrice: '30000000000' | |
| }) | |
| console.log('Contract deployed at address: ', newContractInstance.options.address) | |
| } catch (e) { | |
| console.log(e.message) | |
| } | |
| })() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| import "remix_tests.sol"; // this import is automatically injected by Remix. | |
| import "../contracts/3_Ballot.sol"; | |
| contract BallotTest { | |
| bytes32[] proposalNames; | |
| Ballot ballotToTest; | |
| function beforeAll () public { | |
| proposalNames.push(bytes32("candidate1")); | |
| ballotToTest = new Ballot(proposalNames); | |
| } | |
| function checkWinningProposal () public { | |
| ballotToTest.vote(0); | |
| Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal"); | |
| Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); | |
| } | |
| function checkWinninProposalWithReturnValue () public view returns (bool) { | |
| return ballotToTest.winningProposal() == 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment