Created
April 18, 2021 19:29
-
-
Save christoph2806/6563f132f5a253e2d7547432d9fdf0be 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.11+commit.5ef660b1.js&optimize=true&runs=200&gist=
This file contains 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 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 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 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 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 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 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 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 < 0.7.0; | |
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 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 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 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. | |
* | |
* This module is used through inheritance. It will make available the modifier | |
* `onlyOwner`, which can be aplied to your functions to restrict their use to | |
* the owner. | |
* | |
* This contract has been modified to remove the revokeOwnership function | |
*/ | |
contract Ownable { | |
address private _owner; | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
/** | |
* @dev Initializes the contract setting the deployer as the initial owner. | |
*/ | |
constructor () internal { | |
_owner = msg.sender; | |
emit OwnershipTransferred(address(0), _owner); | |
} | |
/** | |
* @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(isOwner(), "Ownable: caller is not the owner"); | |
_; | |
} | |
/** | |
* @dev Returns true if the caller is the current owner. | |
*/ | |
function isOwner() public view returns (bool) { | |
return msg.sender == _owner; | |
} | |
/** | |
* @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; | |
} | |
} |
This file contains 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": "6080604052600160045560078054600160a060020a03191673a68bc2d344f69f34f5a7cbb5233f9bf1a270b2f617905534801561003b57600080fd5b5060068054600160a060020a031916331790819055604051600160a060020a0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100ae73e2e73a1c69ecf83f464efce6a5be353a37ca09b26401000000006100b3810204565b6100d5565b60028054600160a060020a031916600160a060020a0392909216919091179055565b610d36806100e46000396000f3fe608060405234801561001057600080fd5b50600436106100655760e060020a600035046336a9fc12811461006a57806381d5b132146100845780638da5cb5b1461008e5780638f32d59b146100b2578063bbc3d75a146100ce578063f2fde38b146100f1575b600080fd5b610072610117565b60408051918252519081900360200190f35b61008c61011d565b005b610096610286565b60408051600160a060020a039092168252519081900360200190f35b6100ba610295565b604080519115158252519081900360200190f35b61008c600480360360408110156100e457600080fd5b50803590602001356102a6565b61008c6004803603602081101561010757600080fd5b5035600160a060020a0316610390565b60085481565b610125610295565b610179576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610181610c40565b6101e96101c26040518060400160405280602081526020017f64363263613334356162393434336464626539303837353630663765383333628152506103f8565b307fbbc3d75a0000000000000000000000000000000000000000000000000000000061041a565b905061026a6040518060400160405280600781526020017f65787450617468000000000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f4c482f3131370000000000000000000000000000000000000000000000000000815250836104459092919063ffffffff16565b60075461028290600160a060020a0316826000610474565b5050565b600654600160a060020a031690565b600654600160a060020a0316331490565b6000828152600560205260409020548290600160a060020a031633146103005760405160e560020a62461bcd028152600401808060200182810382526028815260200180610cd96028913960400191505060405180910390fd5b600081815260056020526040808220805473ffffffffffffffffffffffffffffffffffffffff191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a2600882905560408051838152905184917fb9627ed68e9fe80db6d5016fec88427e3093a744f2fb23c0876823efffa13de3919081900360200190a2505050565b610398610295565b6103ec576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103f581610669565b50565b8051600090829061040d575060009050610415565b505060208101515b919050565b610422610c40565b61042a610c40565b61043c8186868663ffffffff61071a16565b95945050505050565b608083015161045a908363ffffffff61076c16565b608083015161046f908263ffffffff61076c16565b505050565b60045460408051306c010000000000000000000000000260208083019190915260348083018590528351808403909101815260549092018352815191810191909120606086019390935260008381526005909152818120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816179055905182917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af991a2600254600160a060020a0316634000aea0858461053487610789565b6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105a1578181015183820152602001610589565b50505050905090810190601f1680156105ce5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156105ef57600080fd5b505af1158015610603573d6000803e3d6000fd5b505050506040513d602081101561061957600080fd5b50516106595760405160e560020a62461bcd028152600401808060200182810382526023815260200180610cb66023913960400191505060405180910390fd5b6004805460010190559392505050565b600160a060020a0381166106b15760405160e560020a62461bcd028152600401808060200182810382526026815260200180610c906026913960400191505060405180910390fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610722610c40565b6107328560800151610100610920565b5050918352600160a060020a031660208301527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916604082015290565b6107798260038351610960565b61046f828263ffffffff610a6316565b6060634042994660e060020a02600080846000015185602001518660400151876060015160018960800151600001516040516024018089600160a060020a0316600160a060020a0316815260200188815260200187815260200186600160a060020a0316600160a060020a03168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561088457818101518382015260200161086c565b50505050905090810190601f1680156108b15780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19909d169c909c17909b5250989950505050505050505050919050565b610928610c75565b602082061561093d5760208206602003820191505b506020808301829052604080518085526000815283019091019052815b92915050565b601781116109825761097c8360ff848116602002168317610a84565b5061046f565b60ff81116109b6576109a3836018602060ff8616021763ffffffff610a8416565b5061097c8382600163ffffffff610a9c16565b61ffff81116109eb576109d8836019602060ff8616021763ffffffff610a8416565b5061097c8382600263ffffffff610a9c16565b63ffffffff8111610a2257610a0f83601a602060ff8616021763ffffffff610a8416565b5061097c8382600463ffffffff610a9c16565b67ffffffffffffffff811161046f57610a4a83601b602060ff8616021763ffffffff610a8416565b50610a5d8382600863ffffffff610a9c16565b50505050565b610a6b610c75565b610a7d83846000015151848551610abd565b9392505050565b610a8c610c75565b610a7d8384600001515184610b69565b610aa4610c75565b610ab5848560000151518585610bb4565b949350505050565b610ac5610c75565b8251821115610ad357600080fd5b84602001518285011115610afd57610afd85610af58760200151878601610c12565b600202610c29565b600080865180518760208301019350808887011115610b1c5787860182525b505050602084015b60208410610b435780518252601f199093019260209182019101610b24565b51815160001960208690036101000a019081169019919091161790525083949350505050565b610b71610c75565b83602001518310610b8d57610b8d848560200151600202610c29565b835180516020858301018481535080851415610baa576001810182525b5093949350505050565b610bbc610c75565b84602001518483011115610bd957610bd985858401600202610c29565b60006001836101000a039050855183868201018583198251161781525080518487011115610c075783860181525b509495945050505050565b600081831115610c2357508161095a565b50919050565b8151610c358383610920565b50610a5d8382610a63565b6040805160a081018252600080825260208201819052918101829052606081019190915260808101610c70610c75565b905290565b60405180604001604052806060815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374a264697066735822122013df46ab7b87ace7b7c0ed71718c49422f51ac740b8688983c80d39c2dc106e164736f6c634300060b0033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE PUSH1 0x7 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH20 0xA68BC2D344F69F34F5A7CBB5233F9BF1A270B2F6 OR SWAP1 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x3B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x6 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND CALLER OR SWAP1 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 SWAP1 SWAP2 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 DUP3 SWAP1 LOG3 PUSH2 0xAE PUSH20 0xE2E73A1C69ECF83F464EFCE6A5BE353A37CA09B2 PUSH5 0x100000000 PUSH2 0xB3 DUP2 MUL DIV JUMP JUMPDEST PUSH2 0xD5 JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0xD36 DUP1 PUSH2 0xE4 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 0x65 JUMPI PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV PUSH4 0x36A9FC12 DUP2 EQ PUSH2 0x6A JUMPI DUP1 PUSH4 0x81D5B132 EQ PUSH2 0x84 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x8E JUMPI DUP1 PUSH4 0x8F32D59B EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0xBBC3D75A EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xF1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x72 PUSH2 0x117 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x8C PUSH2 0x11D JUMP JUMPDEST STOP JUMPDEST PUSH2 0x96 PUSH2 0x286 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xBA PUSH2 0x295 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x8C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xE4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x2A6 JUMP JUMPDEST PUSH2 0x8C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x107 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x390 JUMP JUMPDEST PUSH1 0x8 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x125 PUSH2 0x295 JUMP JUMPDEST PUSH2 0x179 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x181 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x1E9 PUSH2 0x1C2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6436326361333435616239343433646462653930383735363066376538333362 DUP2 MSTORE POP PUSH2 0x3F8 JUMP JUMPDEST ADDRESS PUSH32 0xBBC3D75A00000000000000000000000000000000000000000000000000000000 PUSH2 0x41A JUMP JUMPDEST SWAP1 POP PUSH2 0x26A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6578745061746800000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x6 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4C482F3131370000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x445 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x282 SWAP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 PUSH1 0x0 PUSH2 0x474 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0x300 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCD9 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SSTORE MLOAD DUP3 SWAP2 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A SWAP2 LOG2 PUSH1 0x8 DUP3 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP4 DUP2 MSTORE SWAP1 MLOAD DUP5 SWAP2 PUSH32 0xB9627ED68E9FE80DB6D5016FEC88427E3093A744F2FB23C0876823EFFFA13DE3 SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 POP POP POP JUMP JUMPDEST PUSH2 0x398 PUSH2 0x295 JUMP JUMPDEST PUSH2 0x3EC JUMPI PUSH1 0x40 DUP1 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x3F5 DUP2 PUSH2 0x669 JUMP JUMPDEST POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP3 SWAP1 PUSH2 0x40D JUMPI POP PUSH1 0x0 SWAP1 POP PUSH2 0x415 JUMP JUMPDEST POP POP PUSH1 0x20 DUP2 ADD MLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x422 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x42A PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x43C DUP2 DUP7 DUP7 DUP7 PUSH4 0xFFFFFFFF PUSH2 0x71A AND JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0x45A SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x76C AND JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0x46F SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x76C AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x40 DUP1 MLOAD ADDRESS PUSH13 0x1000000000000000000000000 MUL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x34 DUP1 DUP4 ADD DUP6 SWAP1 MSTORE DUP4 MLOAD DUP1 DUP5 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x54 SWAP1 SWAP3 ADD DUP4 MSTORE DUP2 MLOAD SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x60 DUP7 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x5 SWAP1 SWAP2 MSTORE DUP2 DUP2 KECCAK256 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP9 AND OR SWAP1 SSTORE SWAP1 MLOAD DUP3 SWAP2 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 SWAP2 LOG2 PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x534 DUP8 PUSH2 0x789 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB 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 0x5A1 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x589 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x5CE 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 0x5EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x603 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 0x619 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH2 0x659 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCB6 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND PUSH2 0x6B1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xC90 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP5 AND SWAP3 AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0x6 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x722 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x732 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0x920 JUMP JUMPDEST POP POP SWAP2 DUP4 MSTORE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x20 DUP4 ADD MSTORE PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x40 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x779 DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0x960 JUMP JUMPDEST PUSH2 0x46F DUP3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xA63 AND JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 PUSH1 0x2 EXP MUL 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 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB 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 0x884 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x86C JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x8B1 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 PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT SWAP1 SWAP14 AND SWAP13 SWAP1 SWAP13 OR SWAP1 SWAP12 MSTORE POP SWAP9 SWAP10 POP POP POP POP POP POP POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x928 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x20 DUP3 MOD ISZERO PUSH2 0x93D JUMPI PUSH1 0x20 DUP3 MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST POP PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x40 DUP1 MLOAD DUP1 DUP6 MSTORE PUSH1 0x0 DUP2 MSTORE DUP4 ADD SWAP1 SWAP2 ADD SWAP1 MSTORE DUP2 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0x982 JUMPI PUSH2 0x97C DUP4 PUSH1 0xFF DUP5 DUP2 AND PUSH1 0x20 MUL AND DUP4 OR PUSH2 0xA84 JUMP JUMPDEST POP PUSH2 0x46F JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0x9B6 JUMPI PUSH2 0x9A3 DUP4 PUSH1 0x18 PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x1 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0x9EB JUMPI PUSH2 0x9D8 DUP4 PUSH1 0x19 PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x2 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xA22 JUMPI PUSH2 0xA0F DUP4 PUSH1 0x1A PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x4 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0x46F JUMPI PUSH2 0xA4A DUP4 PUSH1 0x1B PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0xA5D DUP4 DUP3 PUSH1 0x8 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0xA6B PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA7D DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xABD JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xA8C PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA7D DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xB69 JUMP JUMPDEST PUSH2 0xAA4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xAB5 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xBB4 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xAC5 PUSH2 0xC75 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xAD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xAFD JUMPI PUSH2 0xAFD DUP6 PUSH2 0xAF5 DUP8 PUSH1 0x20 ADD MLOAD DUP8 DUP7 ADD PUSH2 0xC12 JUMP JUMPDEST PUSH1 0x2 MUL PUSH2 0xC29 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xB1C JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST POP POP POP PUSH1 0x20 DUP5 ADD JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xB43 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP4 ADD SWAP3 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xB24 JUMP JUMPDEST MLOAD DUP2 MLOAD PUSH1 0x0 NOT PUSH1 0x20 DUP7 SWAP1 SUB PUSH2 0x100 EXP ADD SWAP1 DUP2 AND SWAP1 NOT SWAP2 SWAP1 SWAP2 AND OR SWAP1 MSTORE POP DUP4 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xB71 PUSH2 0xC75 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xB8D JUMPI PUSH2 0xB8D DUP5 DUP6 PUSH1 0x20 ADD MLOAD PUSH1 0x2 MUL PUSH2 0xC29 JUMP JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 POP DUP1 DUP6 EQ ISZERO PUSH2 0xBAA JUMPI PUSH1 0x1 DUP2 ADD DUP3 MSTORE JUMPDEST POP SWAP4 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xBBC PUSH2 0xC75 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xBD9 JUMPI PUSH2 0xBD9 DUP6 DUP6 DUP5 ADD PUSH1 0x2 MUL PUSH2 0xC29 JUMP 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 POP DUP1 MLOAD DUP5 DUP8 ADD GT ISZERO PUSH2 0xC07 JUMPI DUP4 DUP7 ADD DUP2 MSTORE JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xC23 JUMPI POP DUP2 PUSH2 0x95A JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP2 MLOAD PUSH2 0xC35 DUP4 DUP4 PUSH2 0x920 JUMP JUMPDEST POP PUSH2 0xA5D DUP4 DUP3 PUSH2 0xA63 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 DUP2 ADD PUSH2 0xC70 PUSH2 0xC75 JUMP JUMPDEST SWAP1 MSTORE 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 0x4F PUSH24 0x6E61626C653A206E6577206F776E65722069732074686520 PUSH27 0x65726F2061646472657373756E61626C6520746F207472616E7366 PUSH6 0x72416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374A26469 PUSH17 0x66735822122013DF46AB7B87ACE7B7C0ED PUSH18 0x718C49422F51AC740B8688983C80D39C2DC1 MOD 0xE1 PUSH5 0x736F6C6343 STOP MOD SIGNEXTEND STOP CALLER ", | |
"sourceMap": "599:1470:0:-:0;;;1163:1:2;1132:32;;728:59:0;;;-1:-1:-1;;;;;;728:59:0;745:42;728:59;;;973:108;;;;;;;;;-1:-1:-1;750:6:10;:19;;-1:-1:-1;;;;;;750:19:10;759:10;750:19;;;;;780:40;;-1:-1:-1;;;;;813:6:10;;;;;750;;780:40;;750:6;;780:40;1010:61:0::1;1028:42;1010:17;;::::0;::::1;:61;:::i;:::-;599:1470:::0;;4834:94:2;4891:4;:32;;-1:-1:-1;;;;;;4891:32:2;-1:-1:-1;;;;;4891:32:2;;;;;;;;;;4834:94::o;599:1470:0:-;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b50600436106100655760e060020a600035046336a9fc12811461006a57806381d5b132146100845780638da5cb5b1461008e5780638f32d59b146100b2578063bbc3d75a146100ce578063f2fde38b146100f1575b600080fd5b610072610117565b60408051918252519081900360200190f35b61008c61011d565b005b610096610286565b60408051600160a060020a039092168252519081900360200190f35b6100ba610295565b604080519115158252519081900360200190f35b61008c600480360360408110156100e457600080fd5b50803590602001356102a6565b61008c6004803603602081101561010757600080fd5b5035600160a060020a0316610390565b60085481565b610125610295565b610179576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610181610c40565b6101e96101c26040518060400160405280602081526020017f64363263613334356162393434336464626539303837353630663765383333628152506103f8565b307fbbc3d75a0000000000000000000000000000000000000000000000000000000061041a565b905061026a6040518060400160405280600781526020017f65787450617468000000000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f4c482f3131370000000000000000000000000000000000000000000000000000815250836104459092919063ffffffff16565b60075461028290600160a060020a0316826000610474565b5050565b600654600160a060020a031690565b600654600160a060020a0316331490565b6000828152600560205260409020548290600160a060020a031633146103005760405160e560020a62461bcd028152600401808060200182810382526028815260200180610cd96028913960400191505060405180910390fd5b600081815260056020526040808220805473ffffffffffffffffffffffffffffffffffffffff191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a2600882905560408051838152905184917fb9627ed68e9fe80db6d5016fec88427e3093a744f2fb23c0876823efffa13de3919081900360200190a2505050565b610398610295565b6103ec576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103f581610669565b50565b8051600090829061040d575060009050610415565b505060208101515b919050565b610422610c40565b61042a610c40565b61043c8186868663ffffffff61071a16565b95945050505050565b608083015161045a908363ffffffff61076c16565b608083015161046f908263ffffffff61076c16565b505050565b60045460408051306c010000000000000000000000000260208083019190915260348083018590528351808403909101815260549092018352815191810191909120606086019390935260008381526005909152818120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816179055905182917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af991a2600254600160a060020a0316634000aea0858461053487610789565b6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105a1578181015183820152602001610589565b50505050905090810190601f1680156105ce5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156105ef57600080fd5b505af1158015610603573d6000803e3d6000fd5b505050506040513d602081101561061957600080fd5b50516106595760405160e560020a62461bcd028152600401808060200182810382526023815260200180610cb66023913960400191505060405180910390fd5b6004805460010190559392505050565b600160a060020a0381166106b15760405160e560020a62461bcd028152600401808060200182810382526026815260200180610c906026913960400191505060405180910390fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610722610c40565b6107328560800151610100610920565b5050918352600160a060020a031660208301527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916604082015290565b6107798260038351610960565b61046f828263ffffffff610a6316565b6060634042994660e060020a02600080846000015185602001518660400151876060015160018960800151600001516040516024018089600160a060020a0316600160a060020a0316815260200188815260200187815260200186600160a060020a0316600160a060020a03168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561088457818101518382015260200161086c565b50505050905090810190601f1680156108b15780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19909d169c909c17909b5250989950505050505050505050919050565b610928610c75565b602082061561093d5760208206602003820191505b506020808301829052604080518085526000815283019091019052815b92915050565b601781116109825761097c8360ff848116602002168317610a84565b5061046f565b60ff81116109b6576109a3836018602060ff8616021763ffffffff610a8416565b5061097c8382600163ffffffff610a9c16565b61ffff81116109eb576109d8836019602060ff8616021763ffffffff610a8416565b5061097c8382600263ffffffff610a9c16565b63ffffffff8111610a2257610a0f83601a602060ff8616021763ffffffff610a8416565b5061097c8382600463ffffffff610a9c16565b67ffffffffffffffff811161046f57610a4a83601b602060ff8616021763ffffffff610a8416565b50610a5d8382600863ffffffff610a9c16565b50505050565b610a6b610c75565b610a7d83846000015151848551610abd565b9392505050565b610a8c610c75565b610a7d8384600001515184610b69565b610aa4610c75565b610ab5848560000151518585610bb4565b949350505050565b610ac5610c75565b8251821115610ad357600080fd5b84602001518285011115610afd57610afd85610af58760200151878601610c12565b600202610c29565b600080865180518760208301019350808887011115610b1c5787860182525b505050602084015b60208410610b435780518252601f199093019260209182019101610b24565b51815160001960208690036101000a019081169019919091161790525083949350505050565b610b71610c75565b83602001518310610b8d57610b8d848560200151600202610c29565b835180516020858301018481535080851415610baa576001810182525b5093949350505050565b610bbc610c75565b84602001518483011115610bd957610bd985858401600202610c29565b60006001836101000a039050855183868201018583198251161781525080518487011115610c075783860181525b509495945050505050565b600081831115610c2357508161095a565b50919050565b8151610c358383610920565b50610a5d8382610a63565b6040805160a081018252600080825260208201819052918101829052606081019190915260808101610c70610c75565b905290565b60405180604001604052806060815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261636c65536f75726365206d75737420626520746865206f7261636c65206f66207468652072657175657374a264697066735822122013df46ab7b87ace7b7c0ed71718c49422f51ac740b8688983c80d39c2dc106e164736f6c634300060b0033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x65 JUMPI PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV PUSH4 0x36A9FC12 DUP2 EQ PUSH2 0x6A JUMPI DUP1 PUSH4 0x81D5B132 EQ PUSH2 0x84 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x8E JUMPI DUP1 PUSH4 0x8F32D59B EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0xBBC3D75A EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xF1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x72 PUSH2 0x117 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x8C PUSH2 0x11D JUMP JUMPDEST STOP JUMPDEST PUSH2 0x96 PUSH2 0x286 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xBA PUSH2 0x295 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x8C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xE4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x2A6 JUMP JUMPDEST PUSH2 0x8C PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x107 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x390 JUMP JUMPDEST PUSH1 0x8 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x125 PUSH2 0x295 JUMP JUMPDEST PUSH2 0x179 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x181 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x1E9 PUSH2 0x1C2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6436326361333435616239343433646462653930383735363066376538333362 DUP2 MSTORE POP PUSH2 0x3F8 JUMP JUMPDEST ADDRESS PUSH32 0xBBC3D75A00000000000000000000000000000000000000000000000000000000 PUSH2 0x41A JUMP JUMPDEST SWAP1 POP PUSH2 0x26A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x6578745061746800000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x6 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4C482F3131370000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP4 PUSH2 0x445 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x282 SWAP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 PUSH1 0x0 PUSH2 0x474 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0x300 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCD9 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SSTORE MLOAD DUP3 SWAP2 PUSH32 0x7CC135E0CEBB02C3480AE5D74D377283180A2601F8F644EDF7987B009316C63A SWAP2 LOG2 PUSH1 0x8 DUP3 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP4 DUP2 MSTORE SWAP1 MLOAD DUP5 SWAP2 PUSH32 0xB9627ED68E9FE80DB6D5016FEC88427E3093A744F2FB23C0876823EFFFA13DE3 SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 POP POP POP JUMP JUMPDEST PUSH2 0x398 PUSH2 0x295 JUMP JUMPDEST PUSH2 0x3EC JUMPI PUSH1 0x40 DUP1 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F776E61626C653A2063616C6C6572206973206E6F7420746865206F776E6572 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST PUSH2 0x3F5 DUP2 PUSH2 0x669 JUMP JUMPDEST POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP3 SWAP1 PUSH2 0x40D JUMPI POP PUSH1 0x0 SWAP1 POP PUSH2 0x415 JUMP JUMPDEST POP POP PUSH1 0x20 DUP2 ADD MLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x422 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x42A PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x43C DUP2 DUP7 DUP7 DUP7 PUSH4 0xFFFFFFFF PUSH2 0x71A AND JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0x45A SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x76C AND JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MLOAD PUSH2 0x46F SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x76C AND JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x40 DUP1 MLOAD ADDRESS PUSH13 0x1000000000000000000000000 MUL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x34 DUP1 DUP4 ADD DUP6 SWAP1 MSTORE DUP4 MLOAD DUP1 DUP5 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x54 SWAP1 SWAP3 ADD DUP4 MSTORE DUP2 MLOAD SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x60 DUP7 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x5 SWAP1 SWAP2 MSTORE DUP2 DUP2 KECCAK256 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP9 AND OR SWAP1 SSTORE SWAP1 MLOAD DUP3 SWAP2 PUSH32 0xB5E6E01E79F91267DC17B4E6314D5D4D03593D2CEEE0FBB452B750BD70EA5AF9 SWAP2 LOG2 PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x4000AEA0 DUP6 DUP5 PUSH2 0x534 DUP8 PUSH2 0x789 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB 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 0x5A1 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x589 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x5CE 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 0x5EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x603 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 0x619 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH2 0x659 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x23 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xCB6 PUSH1 0x23 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND PUSH2 0x6B1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0xC90 PUSH1 0x26 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP5 AND SWAP3 AND SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0x6 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x722 PUSH2 0xC40 JUMP JUMPDEST PUSH2 0x732 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x100 PUSH2 0x920 JUMP JUMPDEST POP POP SWAP2 DUP4 MSTORE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x20 DUP4 ADD MSTORE PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x40 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x779 DUP3 PUSH1 0x3 DUP4 MLOAD PUSH2 0x960 JUMP JUMPDEST PUSH2 0x46F DUP3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xA63 AND JUMP JUMPDEST PUSH1 0x60 PUSH4 0x40429946 PUSH1 0xE0 PUSH1 0x2 EXP MUL 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 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP2 MSTORE PUSH1 0x20 ADD DUP8 DUP2 MSTORE PUSH1 0x20 ADD DUP7 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB 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 0x884 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x86C JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x8B1 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 PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT SWAP1 SWAP14 AND SWAP13 SWAP1 SWAP13 OR SWAP1 SWAP12 MSTORE POP SWAP9 SWAP10 POP POP POP POP POP POP POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x928 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x20 DUP3 MOD ISZERO PUSH2 0x93D JUMPI PUSH1 0x20 DUP3 MOD PUSH1 0x20 SUB DUP3 ADD SWAP2 POP JUMPDEST POP PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x40 DUP1 MLOAD DUP1 DUP6 MSTORE PUSH1 0x0 DUP2 MSTORE DUP4 ADD SWAP1 SWAP2 ADD SWAP1 MSTORE DUP2 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x17 DUP2 GT PUSH2 0x982 JUMPI PUSH2 0x97C DUP4 PUSH1 0xFF DUP5 DUP2 AND PUSH1 0x20 MUL AND DUP4 OR PUSH2 0xA84 JUMP JUMPDEST POP PUSH2 0x46F JUMP JUMPDEST PUSH1 0xFF DUP2 GT PUSH2 0x9B6 JUMPI PUSH2 0x9A3 DUP4 PUSH1 0x18 PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x1 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH2 0xFFFF DUP2 GT PUSH2 0x9EB JUMPI PUSH2 0x9D8 DUP4 PUSH1 0x19 PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x2 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 GT PUSH2 0xA22 JUMPI PUSH2 0xA0F DUP4 PUSH1 0x1A PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0x97C DUP4 DUP3 PUSH1 0x4 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT PUSH2 0x46F JUMPI PUSH2 0xA4A DUP4 PUSH1 0x1B PUSH1 0x20 PUSH1 0xFF DUP7 AND MUL OR PUSH4 0xFFFFFFFF PUSH2 0xA84 AND JUMP JUMPDEST POP PUSH2 0xA5D DUP4 DUP3 PUSH1 0x8 PUSH4 0xFFFFFFFF PUSH2 0xA9C AND JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0xA6B PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA7D DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 DUP6 MLOAD PUSH2 0xABD JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xA8C PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xA7D DUP4 DUP5 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH2 0xB69 JUMP JUMPDEST PUSH2 0xAA4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xAB5 DUP5 DUP6 PUSH1 0x0 ADD MLOAD MLOAD DUP6 DUP6 PUSH2 0xBB4 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xAC5 PUSH2 0xC75 JUMP JUMPDEST DUP3 MLOAD DUP3 GT ISZERO PUSH2 0xAD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP3 DUP6 ADD GT ISZERO PUSH2 0xAFD JUMPI PUSH2 0xAFD DUP6 PUSH2 0xAF5 DUP8 PUSH1 0x20 ADD MLOAD DUP8 DUP7 ADD PUSH2 0xC12 JUMP JUMPDEST PUSH1 0x2 MUL PUSH2 0xC29 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 MLOAD DUP1 MLOAD DUP8 PUSH1 0x20 DUP4 ADD ADD SWAP4 POP DUP1 DUP9 DUP8 ADD GT ISZERO PUSH2 0xB1C JUMPI DUP8 DUP7 ADD DUP3 MSTORE JUMPDEST POP POP POP PUSH1 0x20 DUP5 ADD JUMPDEST PUSH1 0x20 DUP5 LT PUSH2 0xB43 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP4 ADD SWAP3 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xB24 JUMP JUMPDEST MLOAD DUP2 MLOAD PUSH1 0x0 NOT PUSH1 0x20 DUP7 SWAP1 SUB PUSH2 0x100 EXP ADD SWAP1 DUP2 AND SWAP1 NOT SWAP2 SWAP1 SWAP2 AND OR SWAP1 MSTORE POP DUP4 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xB71 PUSH2 0xC75 JUMP JUMPDEST DUP4 PUSH1 0x20 ADD MLOAD DUP4 LT PUSH2 0xB8D JUMPI PUSH2 0xB8D DUP5 DUP6 PUSH1 0x20 ADD MLOAD PUSH1 0x2 MUL PUSH2 0xC29 JUMP JUMPDEST DUP4 MLOAD DUP1 MLOAD PUSH1 0x20 DUP6 DUP4 ADD ADD DUP5 DUP2 MSTORE8 POP DUP1 DUP6 EQ ISZERO PUSH2 0xBAA JUMPI PUSH1 0x1 DUP2 ADD DUP3 MSTORE JUMPDEST POP SWAP4 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xBBC PUSH2 0xC75 JUMP JUMPDEST DUP5 PUSH1 0x20 ADD MLOAD DUP5 DUP4 ADD GT ISZERO PUSH2 0xBD9 JUMPI PUSH2 0xBD9 DUP6 DUP6 DUP5 ADD PUSH1 0x2 MUL PUSH2 0xC29 JUMP 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 POP DUP1 MLOAD DUP5 DUP8 ADD GT ISZERO PUSH2 0xC07 JUMPI DUP4 DUP7 ADD DUP2 MSTORE JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 GT ISZERO PUSH2 0xC23 JUMPI POP DUP2 PUSH2 0x95A JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP2 MLOAD PUSH2 0xC35 DUP4 DUP4 PUSH2 0x920 JUMP JUMPDEST POP PUSH2 0xA5D DUP4 DUP3 PUSH2 0xA63 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xA0 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 DUP2 ADD PUSH2 0xC70 PUSH2 0xC75 JUMP JUMPDEST SWAP1 MSTORE 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 0x4F PUSH24 0x6E61626C653A206E6577206F776E65722069732074686520 PUSH27 0x65726F2061646472657373756E61626C6520746F207472616E7366 PUSH6 0x72416E644361 PUSH13 0x6C20746F206F7261636C65536F PUSH22 0x726365206D75737420626520746865206F7261636C65 KECCAK256 PUSH16 0x66207468652072657175657374A26469 PUSH17 0x66735822122013DF46AB7B87ACE7B7C0ED PUSH18 0x718C49422F51AC740B8688983C80D39C2DC1 MOD 0xE1 PUSH5 0x736F6C6343 STOP MOD SIGNEXTEND STOP CALLER ", | |
"sourceMap": "599:1470:0:-:0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;599:1470:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;848:22;;;:::i;:::-;;;;;;;;;;;;;;;;1085:442;;;:::i;:::-;;893:71:10;;;:::i;:::-;;;;-1:-1:-1;;;;;893:71:10;;;;;;;;;;;;;;1212:84;;;:::i;:::-;;;;;;;;;;;;;;;;;;1532:215:0;;;;;;;;;;;;;;;;-1:-1:-1;1532:215:0;;;;;;;:::i;1435:101:10:-;;;;;;;;;;;;;;;;-1:-1:-1;1435:101:10;-1:-1:-1;;;;;1435:101:10;;:::i;848:22:0:-;;;;:::o;1085:442::-;1079:9:10;:7;:9::i;:::-;1071:54;;;;;-1:-1:-1;;;;;1071:54:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1155:28:0::1;;:::i;:::-;1186:161;1217:51;;;;;;;;;;;;;;;;;::::0;:15:::1;:51::i;:::-;1287:4;1303:34:::0;1186:21:::1;:161::i;:::-;1155:192;;1358:28;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;::::0;:3:::1;:7;;:28;;;;;:::i;:::-;1489:6;::::0;1466:51:::1;::::0;-1:-1:-1;;;;;1489:6:0::1;1497:3:::0;1489:6:::1;1466:22;:51::i;:::-;;1131:1:10;1085:442:0:o:0;893:71:10:-;953:6;;-1:-1:-1;;;;;953:6:10;893:71;:::o;1212:84::-;1285:6;;-1:-1:-1;;;;;1285:6:10;1271:10;:20;;1212:84::o;1532:215:0:-;8743:27:2;;;;:15;:27;;;;;;;;-1:-1:-1;;;;;8743:27:2;8729:10;:41;8721:106;;;;-1:-1:-1;;;;;8721:106:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8840:27;;;;:15;:27;;;;;;8833:34;;-1:-1:-1;;8833:34:2;;;8878:30;8856:10;;8878:30;;;1662:7:0::1;:18:::0;;;1691:51:::1;::::0;;;;;;;1721:10;;1691:51:::1;::::0;;;;;::::1;::::0;;::::1;1532:215:::0;;;:::o;1435:101:10:-;1079:9;:7;:9::i;:::-;1071:54;;;;;-1:-1:-1;;;;;1071:54:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1503:28:::1;1522:8;1503:18;:28::i;:::-;1435:101:::0;:::o;1751:315:0:-;1900:26;;1820:14;;1883:6;;1896:62;;-1:-1:-1;1948:3:0;;-1:-1:-1;1941:10:0;;1896:62;-1:-1:-1;;2052:2:0;2040:15;;2034:22;1973:89;;;;:::o;1767:295:2:-;1915:24;;:::i;:::-;1947:28;;:::i;:::-;1988:69;:3;2003:7;2012:16;2030:26;1988:69;:14;:69;:::i;:::-;1981:76;1767:295;-1:-1:-1;;;;;1767:295:2:o;1988:169:1:-;2090:8;;;;:27;;2112:4;2090:27;:21;:27;:::i;:::-;2123:8;;;;:29;;2145:6;2123:29;:21;:29;:::i;:::-;1988:169;;;:::o;3072:488:2:-;3268:12;;3245:36;;;3262:4;3245:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3235:47;;;;;;;;;3288:10;;;:25;;;;-1:-1:-1;3319:26:2;;;:15;:26;;;;;;:36;;-1:-1:-1;;3319:36:2;-1:-1:-1;;;;;3319:36:2;;;;;3366:29;;3235:47;;3366:29;;;3409:4;;-1:-1:-1;;;;;3409:4:2;:20;3430:7;3439:8;3449:19;3463:4;3449:13;:19::i;:::-;3409:60;;;;;-1:-1:-1;;;3409:60:2;;;;;;;-1:-1:-1;;;;;3409:60:2;-1:-1:-1;;;;;3409:60:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3409:60:2;3401:108;;;;-1:-1:-1;;;;;3401:108:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3515:12;:17;;3531:1;3515:17;;;3072:488;;;;;:::o;1629:211:10:-;-1:-1:-1;;;;;1698:22:10;;1690:73;;;;-1:-1:-1;;;;;1690:73:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1795:6;;1774:38;;-1:-1:-1;;;;;1774:38:10;;;;1795:6;;1774:38;;1795:6;;1774:38;1818:6;:17;;-1:-1:-1;;1818:17:10;-1:-1:-1;;;;;1818:17:10;;;;;;;;;;1629:211::o;998:365:1:-;1147:24;;:::i;:::-;1179:49;1200:4;:8;;;365:3;1179:20;:49::i;:::-;-1:-1:-1;;1234:13:1;;;-1:-1:-1;;;;;1253:39:1;:20;;;:39;-1:-1:-1;;1298:43:1;:23;;;:43;1234:13;998:365::o;2841:198:8:-;2943:55;2954:3;404:1;2984:5;2978:19;2943:10;:55::i;:::-;3008:24;:3;3025:5;3008:24;:10;:24;:::i;7564:527:2:-;7652:12;7711:29;-1:-1:-1;;;7711:29:2;719:1;663;7961:4;:7;;;7976:4;:20;;;8004:4;:23;;;8035:4;:10;;;765:1;8073:4;:8;;;:12;;;7681:405;;;;;;-1:-1:-1;;;;;7681:405:2;-1:-1:-1;;;;;7681:405:2;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7681:405:2;-1:-1:-1;;;;;7681:405:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7681:405:2;;;-1:-1:-1;;7681:405:2;;;;;;;;;;;;;;;;-1:-1:-1;;7681:405:2;;;;;;;;;;-1:-1:-1;7681:405:2;;-1:-1:-1;;;;;;;;;;7564:527:2;;;:::o;982:395:7:-;1052:13;;:::i;:::-;1088:2;1077:8;:13;:18;1073:71;;1134:2;1123:8;:13;1117:2;:20;1105:32;;;;1073:71;-1:-1:-1;1191:12:7;;;;:23;;;1254:4;1248:11;;1266:16;;;-1:-1:-1;1289:14:7;;1331:18;;1323:27;;;1310:41;;1191:3;982:395;;;;;:::o;717:724:8:-;832:2;823:5;:11;820:615;;850:44;:3;873:10;;;;;;872:20;;;850:15;:44::i;:::-;;820:615;;;923:4;914:5;:13;911:524;;943:41;:3;980:2;966:10;;;;;965:17;943:41;:15;:41;:::i;:::-;-1:-1:-1;998:23:8;:3;1012:5;1019:1;998:23;:13;:23;:::i;911:524::-;1050:6;1041:5;:15;1038:397;;1072:41;:3;1109:2;1095:10;;;;;1094:17;1072:41;:15;:41;:::i;:::-;-1:-1:-1;1127:23:8;:3;1141:5;1148:1;1127:23;:13;:23;:::i;1038:397::-;1179:10;1170:5;:19;1167:268;;1205:41;:3;1242:2;1228:10;;;;;1227:17;1205:41;:15;:41;:::i;:::-;-1:-1:-1;1260:23:8;:3;1274:5;1281:1;1260:23;:13;:23;:::i;1167:268::-;1312:18;1303:5;:27;1300:135;;1346:41;:3;1383:2;1369:10;;;;;1368:17;1346:41;:15;:41;:::i;:::-;-1:-1:-1;1401:23:8;:3;1415:5;1422:1;1401:23;:13;:23;:::i;:::-;;717:724;;;:::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;-1:-1:-1;;;4536:155:7:o;5851:144::-;5925:13;;:::i;:::-;5953:37;5964:3;5969;:7;;;:14;5985:4;5953:10;:37::i;9543:154::-;9624:13;;:::i;:::-;9652:40;9661:3;9666;:7;;;:14;9682:4;9688:3;9652:8;:40::i;:::-;9645:47;9543:154;-1:-1:-1;;;;9543:154:7: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;2891:28;2895:3;:12;;;2915:3;2909;:9;2891:3;:28::i;:::-;2922:1;2891:32;2879:6;:45::i;:::-;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;-1:-1:-1;;;3396:2:7;3386:13;;3457:129;3471:2;3464:3;:9;3457:129;;3526:10;;3513:24;;-1:-1:-1;;3475:9:7;;;;3560:2;3552:10;;;;3570:9;3457:129;;;3695:10;3744:11;;-1:-1:-1;;3640:2:7;:8;;;3632:3;:17;:21;3740:22;;;3707:9;;3691:26;;;;3782:21;3769:35;;-1:-1:-1;3823:3:7;2691:1140;;;;;;:::o;4985:619::-;5068:13;;:::i;:::-;5100:3;:12;;;5093:3;:19;5089:69;;5122:29;5129:3;5134;:12;;;5149:1;5134:16;5122:6;:29::i;:::-;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;-1:-1:-1;5596:3:7;;4985:619;-1:-1:-1;;;;4985:619:7:o;8650:642::-;8739:13;;:::i;:::-;8776:3;:12;;;8770:3;8764;:9;:24;8760:73;;;8798:28;8805:3;8817;8811;:9;8824:1;8810:15;8798:6;:28::i;:::-;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;-1:-1:-1;9284:3:7;;8650:642;-1:-1:-1;;;;;8650:642:7:o;1929:114::-;1979:4;1999:1;1995;:5;1991:34;;;-1:-1:-1;2017:1:7;2010:8;;1991:34;-1:-1:-1;2037:1:7;1929:114;-1:-1:-1;1929:114:7:o;1772:153::-;1863:7;;1876:19;1863:3;1886:8;1876:4;:19::i;:::-;;1901;1908:3;1913:6;1901;:19::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "676400", | |
"executionCost": "infinite", | |
"totalCost": "infinite" | |
}, | |
"external": { | |
"fulfillRatingsOracle(bytes32,bytes32)": "infinite", | |
"isOwner()": "593", | |
"owner()": "638", | |
"ratings()": "441", | |
"requestRatingsOracle()": "infinite", | |
"transferOwnership(address)": "infinite" | |
}, | |
"internal": { | |
"stringToBytes32(string memory)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"fulfillRatingsOracle(bytes32,bytes32)": "bbc3d75a", | |
"isOwner()": "8f32d59b", | |
"owner()": "8da5cb5b", | |
"ratings()": "36a9fc12", | |
"requestRatingsOracle()": "81d5b132", | |
"transferOwnership(address)": "f2fde38b" | |
} | |
}, | |
"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" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "previousOwner", | |
"type": "address" | |
}, | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "newOwner", | |
"type": "address" | |
} | |
], | |
"name": "OwnershipTransferred", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "bytes32", | |
"name": "requestId", | |
"type": "bytes32" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bytes32", | |
"name": "ratings", | |
"type": "bytes32" | |
} | |
], | |
"name": "RequestRatingsOracleFulfilled", | |
"type": "event" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "_requestId", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "bytes32", | |
"name": "_ratings", | |
"type": "bytes32" | |
} | |
], | |
"name": "fulfillRatingsOracle", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "isOwner", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "owner", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "ratings", | |
"outputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "", | |
"type": "bytes32" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "requestRatingsOracle", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "newOwner", | |
"type": "address" | |
} | |
], | |
"name": "transferOwnership", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains 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.11+commit.5ef660b1" | |
}, | |
"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" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "previousOwner", | |
"type": "address" | |
}, | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "newOwner", | |
"type": "address" | |
} | |
], | |
"name": "OwnershipTransferred", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "bytes32", | |
"name": "requestId", | |
"type": "bytes32" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bytes32", | |
"name": "ratings", | |
"type": "bytes32" | |
} | |
], | |
"name": "RequestRatingsOracleFulfilled", | |
"type": "event" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "_requestId", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "bytes32", | |
"name": "_ratings", | |
"type": "bytes32" | |
} | |
], | |
"name": "fulfillRatingsOracle", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "isOwner", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "owner", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "ratings", | |
"outputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "", | |
"type": "bytes32" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "requestRatingsOracle", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "newOwner", | |
"type": "address" | |
} | |
], | |
"name": "transferOwnership", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": { | |
"isOwner()": { | |
"details": "Returns true if the caller is the current owner." | |
}, | |
"owner()": { | |
"details": "Returns the address of the current owner." | |
}, | |
"transferOwnership(address)": { | |
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." | |
} | |
}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"contracts/ChainlinkFlightRatingsOracleDemo.sol": "ChainlinkFlightRatingsOracleDemo" | |
}, | |
"evmVersion": "byzantium", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": true, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"contracts/ChainlinkFlightRatingsOracleDemo.sol": { | |
"keccak256": "0x53378b9fb9d859cc48f58a1e2acc30b8ca37d00bbce3c8644ed97a7f7872a21c", | |
"license": "Apache-2.0", | |
"urls": [ | |
"bzz-raw://bd20c627c008322886d6bcccba3fd6fc76f748e0bb6794ca831537b96d10f9ea", | |
"dweb:/ipfs/QmfSpGUcwvMraW7Z5uVpQGDynmVfeST24ftjpH6rm7JgVG" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/Chainlink.sol": { | |
"keccak256": "0x7bef34fd97f611103c6113025e3d6af755f326069767e72266698f64258e62b6", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://82125916319b872093aa8599d2c00bd07d363386a74a4d0268c6edf25c366f82", | |
"dweb:/ipfs/QmXTnVy1XEw387NduvHHFQNmnzYTwFUhVz95kRvRrcwdHd" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/ChainlinkClient.sol": { | |
"keccak256": "0x9f8883b8b5b76bba151e5f30d4c353b8a3f15ee3d97117deee4cccd91fe8640f", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://ee9b132779ac24df4f8a5e45dfc256acc70eb5e43f715de36593e488f20a44ff", | |
"dweb:/ipfs/QmagJ1htVpP2ZYLAdHEpSEMx1Xd3csbUHAhLctryVDsNFg" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/interfaces/ChainlinkRequestInterface.sol": { | |
"keccak256": "0xe513c0f60edf13da7d82625489cf2008c7b66170f3b1ed1606b84c73f95b17ad", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://78e083ef252b80bb63a5aa126bc7283cd9b88767dfdf0190d46802bc32756ecf", | |
"dweb:/ipfs/QmdTyEQwX5ecoXR1rBh8DLDJpCYVDM85JjjR2sEJdE9wAA" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/interfaces/ENSInterface.sol": { | |
"keccak256": "0xdef864af6e516477773ea246b73531b1836de5bea4ac1cfd8be6e7f4b3f3c3fd", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://ad3346f5a393cd62d8de678a77d8dc323d8f9e21f0aaa504d0d0b990c8b61477", | |
"dweb:/ipfs/QmQ2n8329Fzb7Zbzk5wqYvAfKJ9QPwTdCUmm9zUqhL67a1" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol": { | |
"keccak256": "0xe245a7be950c94d87bb775ae9ee9fbd693fbe2987778e6ce0b04605ea44b7b68", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://bd2c3165d949fc66fe407b96eb3dc2092c7e800f4c073b411bf7b96de3e156c9", | |
"dweb:/ipfs/QmcfJhR1Np4GsLWnww2Duqks2wEzYk8VDTvCAYy7MisG1r" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/interfaces/PointerInterface.sol": { | |
"keccak256": "0x08aed19c3bef1ae2d90fc0d9d28a497fd7f312991ed08fedfe545de6b9a476e4", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://b2e7b4acfbd4cfbd4c3e266011955954ec0f5a2323647e81b936c66cb35e1b5e", | |
"dweb:/ipfs/QmXVrpdo76r2WhxE7gJPj3dGycZYKKvK39VNVaB7HyhAbT" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/vendor/BufferChainlink.sol": { | |
"keccak256": "0x14f13139229a2fef8f705f29f91de0bc81bcd5070ec75b4bd3fd82c1536ca685", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://9a403d7f17b316c7b8837a25df0563de2a1c3121b7cd43473abce8ce6742bd29", | |
"dweb:/ipfs/QmWZYi4xJGjPt1pEM7mS7XsA1eF2zpcxiiuGHuiTndXHo7" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/vendor/CBORChainlink.sol": { | |
"keccak256": "0xd4e84a8ade1a2dba213842fea48ca1c7ea5d0eb4105b06c603966b955834e105", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://1d5dde29effbd8bc604215034a01c0f00957b666a016b9e5e478e01c789f1b1b", | |
"dweb:/ipfs/QmTepdEiHcoxDKmodo5zqaZNc68r1zrdEhb3PAaGG4dhv8" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/vendor/ENSResolver.sol": { | |
"keccak256": "0xfd992937d215ad669f69e91fefbe62cad8973ae329b4e810ca9b26a1ae0b6bb7", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://afb189e69fb705795bf41dea9ff20bab191164fc4876803168372f9bf1a1a0f1", | |
"dweb:/ipfs/QmUBbNkFiJh9BrPepNVYMpxnEk1a5xqun8VT6Zb2jC3FtV" | |
] | |
}, | |
"https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/vendor/Ownable.sol": { | |
"keccak256": "0x20a325da437d524570c833519481749e6e33018fe899dfdad66e59e1f60f6192", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://921b292b3621c1728852040f7ce8853a827a0498517ea12c9f576959419f019a", | |
"dweb:/ipfs/QmXpqPMDshxmwfYMjcZiDNVJWecLz7ASnAQwHnmMgvxhXb" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains 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: Apache-2.0 | |
pragma solidity ^0.6.0; | |
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/vendor/Ownable.sol"; | |
/* | |
* This is a demo of the Chainlink FlightRatings Oracle. | |
* To demonstrate, follow these steps: | |
* | |
* 1) Compile the contract | |
* 2) Deploy the contract to xDai Chain | |
* 3) Call the requestRatingsOracle function | |
* 4) A short time later, the oracle will call back the fullfillRatingsOracle function with the result. | |
* | |
*/ | |
contract ChainlinkFlightRatingsOracleDemo is ChainlinkClient, Ownable { | |
uint256 constant private ORACLE_PAYMENT = 0 * LINK; | |
address oracle = 0xa68bC2d344f69F34f5A7cbb5233f9bF1a270B2f6; | |
// string jobId = "d62ca345ab9443ddbe9087560f7e833b"; | |
bytes32 public ratings; | |
event RequestRatingsOracleFulfilled( | |
bytes32 indexed requestId, | |
bytes32 ratings | |
); | |
constructor() public Ownable() { | |
setChainlinkToken(0xE2e73A1c69ecF83F464EFCE6A5be353a37cA09b2); | |
} | |
function requestRatingsOracle() | |
public | |
onlyOwner | |
{ | |
Chainlink.Request memory req = buildChainlinkRequest( | |
stringToBytes32('d62ca345ab9443ddbe9087560f7e833b'), | |
address(this), | |
this.fulfillRatingsOracle.selector | |
); | |
req.add("extPath", "LH/117"); // replace this with Carrier/FlightNumber combination of your choice | |
sendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT); | |
} | |
function fulfillRatingsOracle(bytes32 _requestId, bytes32 _ratings) | |
public | |
recordChainlinkFulfillment(_requestId) | |
{ | |
ratings = _ratings; | |
emit RequestRatingsOracleFulfilled(_requestId, _ratings); | |
} | |
function stringToBytes32(string memory source) private pure returns (bytes32 result) { | |
bytes memory tempEmptyStringTest = bytes(source); | |
if (tempEmptyStringTest.length == 0) { | |
return 0x0; | |
} | |
assembly { // solhint-disable-line no-inline-assembly | |
result := mload(add(source, 32)) | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment