Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 10 from a total of 10 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Send Request | 5683995 | 698 days ago | IN | 0 ETH | 0.00050406 | ||||
| Send Request | 5683967 | 698 days ago | IN | 0 ETH | 0.00061243 | ||||
| Send Request | 5683919 | 698 days ago | IN | 0 ETH | 0.00049739 | ||||
| Send Request | 5683869 | 698 days ago | IN | 0 ETH | 0.00055491 | ||||
| Send Request CBO... | 5683797 | 698 days ago | IN | 0 ETH | 0.00045242 | ||||
| Send Request | 5683484 | 698 days ago | IN | 0 ETH | 0.00050434 | ||||
| Send Request | 5683324 | 698 days ago | IN | 0 ETH | 0.00059223 | ||||
| Send Request | 5683226 | 698 days ago | IN | 0 ETH | 0.00047364 | ||||
| Send Request | 5683176 | 698 days ago | IN | 0 ETH | 0.00050988 | ||||
| Send Request | 5682998 | 698 days ago | IN | 0 ETH | 0.00048105 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x5481CB0d...7b48a1f33 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
FunctionsConsumerExample
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {FunctionsClient} from "@chainlink/[email protected]/src/v0.8/functions/v1_0_0/FunctionsClient.sol";
import {ConfirmedOwner} from "@chainlink/[email protected]/src/v0.8/shared/access/ConfirmedOwner.sol";
import {FunctionsRequest} from "@chainlink/[email protected]/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol";
/**
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY.
* THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE.
* DO NOT USE THIS CODE IN PRODUCTION.
*/
contract FunctionsConsumerExample is FunctionsClient, ConfirmedOwner {
using FunctionsRequest for FunctionsRequest.Request;
bytes32 public s_lastRequestId;
bytes public s_lastResponse;
bytes public s_lastError;
error UnexpectedRequestID(bytes32 requestId);
event Response(bytes32 indexed requestId, bytes response, bytes err);
constructor(
address router
) FunctionsClient(router) ConfirmedOwner(msg.sender) {}
/**
* @notice Send a simple request
* @param source JavaScript source code
* @param encryptedSecretsUrls Encrypted URLs where to fetch user secrets
* @param donHostedSecretsSlotID Don hosted secrets slotId
* @param donHostedSecretsVersion Don hosted secrets version
* @param args List of arguments accessible from within the source code
* @param bytesArgs Array of bytes arguments, represented as hex strings
* @param subscriptionId Billing ID
*/
function sendRequest(
string memory source,
bytes memory encryptedSecretsUrls,
uint8 donHostedSecretsSlotID,
uint64 donHostedSecretsVersion,
string[] memory args,
bytes[] memory bytesArgs,
uint64 subscriptionId,
uint32 gasLimit,
bytes32 donID
) external onlyOwner returns (bytes32 requestId) {
FunctionsRequest.Request memory req;
req.initializeRequestForInlineJavaScript(source);
if (encryptedSecretsUrls.length > 0)
req.addSecretsReference(encryptedSecretsUrls);
else if (donHostedSecretsVersion > 0) {
req.addDONHostedSecrets(
donHostedSecretsSlotID,
donHostedSecretsVersion
);
}
if (args.length > 0) req.setArgs(args);
if (bytesArgs.length > 0) req.setBytesArgs(bytesArgs);
s_lastRequestId = _sendRequest(
req.encodeCBOR(),
subscriptionId,
gasLimit,
donID
);
return s_lastRequestId;
}
/**
* @notice Send a pre-encoded CBOR request
* @param request CBOR-encoded request data
* @param subscriptionId Billing ID
* @param gasLimit The maximum amount of gas the request can consume
* @param donID ID of the job to be invoked
* @return requestId The ID of the sent request
*/
function sendRequestCBOR(
bytes memory request,
uint64 subscriptionId,
uint32 gasLimit,
bytes32 donID
) external onlyOwner returns (bytes32 requestId) {
s_lastRequestId = _sendRequest(
request,
subscriptionId,
gasLimit,
donID
);
return s_lastRequestId;
}
/**
* @notice Store latest result/error
* @param requestId The request ID, returned by sendRequest()
* @param response Aggregated response from the user code
* @param err Aggregated error from the user code or from the execution pipeline
* Either response or error parameter will be set, but never both
*/
function fulfillRequest(
bytes32 requestId,
bytes memory response,
bytes memory err
) internal override {
if (s_lastRequestId != requestId) {
revert UnexpectedRequestID(requestId);
}
s_lastResponse = response;
s_lastError = err;
emit Response(requestId, s_lastResponse, s_lastError);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {CBOR} from "../../../vendor/solidity-cborutils/v2.0.0/CBOR.sol";
/// @title Library for encoding the input data of a Functions request into CBOR
library FunctionsRequest {
using CBOR for CBOR.CBORBuffer;
uint16 public constant REQUEST_DATA_VERSION = 1;
uint256 internal constant DEFAULT_BUFFER_SIZE = 256;
enum Location {
Inline, // Provided within the Request
Remote, // Hosted through remote location that can be accessed through a provided URL
DONHosted // Hosted on the DON's storage
}
enum CodeLanguage {
JavaScript
// In future version we may add other languages
}
struct Request {
Location codeLocation; // ════════════╸ The location of the source code that will be executed on each node in the DON
Location secretsLocation; // ═════════╸ The location of secrets that will be passed into the source code. *Only Remote secrets are supported
CodeLanguage language; // ════════════╸ The coding language that the source code is written in
string source; // ════════════════════╸ Raw source code for Request.codeLocation of Location.Inline, URL for Request.codeLocation of Location.Remote, or slot decimal number for Request.codeLocation of Location.DONHosted
bytes encryptedSecretsReference; // ══╸ Encrypted URLs for Request.secretsLocation of Location.Remote (use addSecretsReference()), or CBOR encoded slotid+version for Request.secretsLocation of Location.DONHosted (use addDONHostedSecrets())
string[] args; // ════════════════════╸ String arguments that will be passed into the source code
bytes[] bytesArgs; // ════════════════╸ Bytes arguments that will be passed into the source code
}
error EmptySource();
error EmptySecrets();
error EmptyArgs();
error NoInlineSecrets();
/// @notice Encodes a Request to CBOR encoded bytes
/// @param self The request to encode
/// @return CBOR encoded bytes
function encodeCBOR(Request memory self) internal pure returns (bytes memory) {
CBOR.CBORBuffer memory buffer = CBOR.create(DEFAULT_BUFFER_SIZE);
buffer.writeString("codeLocation");
buffer.writeUInt256(uint256(self.codeLocation));
buffer.writeString("language");
buffer.writeUInt256(uint256(self.language));
buffer.writeString("source");
buffer.writeString(self.source);
if (self.args.length > 0) {
buffer.writeString("args");
buffer.startArray();
for (uint256 i = 0; i < self.args.length; ++i) {
buffer.writeString(self.args[i]);
}
buffer.endSequence();
}
if (self.encryptedSecretsReference.length > 0) {
if (self.secretsLocation == Location.Inline) {
revert NoInlineSecrets();
}
buffer.writeString("secretsLocation");
buffer.writeUInt256(uint256(self.secretsLocation));
buffer.writeString("secrets");
buffer.writeBytes(self.encryptedSecretsReference);
}
if (self.bytesArgs.length > 0) {
buffer.writeString("bytesArgs");
buffer.startArray();
for (uint256 i = 0; i < self.bytesArgs.length; ++i) {
buffer.writeBytes(self.bytesArgs[i]);
}
buffer.endSequence();
}
return buffer.buf.buf;
}
/// @notice Initializes a Chainlink Functions Request
/// @dev Sets the codeLocation and code on the request
/// @param self The uninitialized request
/// @param codeLocation The user provided source code location
/// @param language The programming language of the user code
/// @param source The user provided source code or a url
function initializeRequest(
Request memory self,
Location codeLocation,
CodeLanguage language,
string memory source
) internal pure {
if (bytes(source).length == 0) revert EmptySource();
self.codeLocation = codeLocation;
self.language = language;
self.source = source;
}
/// @notice Initializes a Chainlink Functions Request
/// @dev Simplified version of initializeRequest for PoC
/// @param self The uninitialized request
/// @param javaScriptSource The user provided JS code (must not be empty)
function initializeRequestForInlineJavaScript(Request memory self, string memory javaScriptSource) internal pure {
initializeRequest(self, Location.Inline, CodeLanguage.JavaScript, javaScriptSource);
}
/// @notice Adds Remote user encrypted secrets to a Request
/// @param self The initialized request
/// @param encryptedSecretsReference Encrypted comma-separated string of URLs pointing to off-chain secrets
function addSecretsReference(Request memory self, bytes memory encryptedSecretsReference) internal pure {
if (encryptedSecretsReference.length == 0) revert EmptySecrets();
self.secretsLocation = Location.Remote;
self.encryptedSecretsReference = encryptedSecretsReference;
}
/// @notice Adds DON-hosted secrets reference to a Request
/// @param self The initialized request
/// @param slotID Slot ID of the user's secrets hosted on DON
/// @param version User data version (for the slotID)
function addDONHostedSecrets(Request memory self, uint8 slotID, uint64 version) internal pure {
CBOR.CBORBuffer memory buffer = CBOR.create(DEFAULT_BUFFER_SIZE);
buffer.writeString("slotID");
buffer.writeUInt64(slotID);
buffer.writeString("version");
buffer.writeUInt64(version);
self.secretsLocation = Location.DONHosted;
self.encryptedSecretsReference = buffer.buf.buf;
}
/// @notice Sets args for the user run function
/// @param self The initialized request
/// @param args The array of string args (must not be empty)
function setArgs(Request memory self, string[] memory args) internal pure {
if (args.length == 0) revert EmptyArgs();
self.args = args;
}
/// @notice Sets bytes args for the user run function
/// @param self The initialized request
/// @param args The array of bytes args (must not be empty)
function setBytesArgs(Request memory self, bytes[] memory args) internal pure {
if (args.length == 0) revert EmptyArgs();
self.bytesArgs = args;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ConfirmedOwnerWithProposal} from "./ConfirmedOwnerWithProposal.sol";
/// @title The ConfirmedOwner contract
/// @notice A contract with helpers for basic contract ownership.
contract ConfirmedOwner is ConfirmedOwnerWithProposal {
constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {IFunctionsRouter} from "./interfaces/IFunctionsRouter.sol";
import {IFunctionsClient} from "./interfaces/IFunctionsClient.sol";
import {FunctionsRequest} from "./libraries/FunctionsRequest.sol";
/// @title The Chainlink Functions client contract
/// @notice Contract developers can inherit this contract in order to make Chainlink Functions requests
abstract contract FunctionsClient is IFunctionsClient {
using FunctionsRequest for FunctionsRequest.Request;
IFunctionsRouter internal immutable i_router;
event RequestSent(bytes32 indexed id);
event RequestFulfilled(bytes32 indexed id);
error OnlyRouterCanFulfill();
constructor(address router) {
i_router = IFunctionsRouter(router);
}
/// @notice Sends a Chainlink Functions request
/// @param data The CBOR encoded bytes data for a Functions request
/// @param subscriptionId The subscription ID that will be charged to service the request
/// @param callbackGasLimit the amount of gas that will be available for the fulfillment callback
/// @return requestId The generated request ID for this request
function _sendRequest(
bytes memory data,
uint64 subscriptionId,
uint32 callbackGasLimit,
bytes32 donId
) internal returns (bytes32) {
bytes32 requestId = i_router.sendRequest(
subscriptionId,
data,
FunctionsRequest.REQUEST_DATA_VERSION,
callbackGasLimit,
donId
);
emit RequestSent(requestId);
return requestId;
}
/// @notice User defined function to handle a response from the DON
/// @param requestId The request ID, returned by sendRequest()
/// @param response Aggregated response from the execution of the user's source code
/// @param err Aggregated error from the execution of the user code or from the execution pipeline
/// @dev Either response or error parameter will be set, but never both
function fulfillRequest(bytes32 requestId, bytes memory response, bytes memory err) internal virtual;
/// @inheritdoc IFunctionsClient
function handleOracleFulfillment(bytes32 requestId, bytes memory response, bytes memory err) external override {
if (msg.sender != address(i_router)) {
revert OnlyRouterCanFulfill();
}
fulfillRequest(requestId, response, err);
emit RequestFulfilled(requestId);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IOwnable} from "../interfaces/IOwnable.sol";
/// @title The ConfirmedOwner contract
/// @notice A contract with helpers for basic contract ownership.
contract ConfirmedOwnerWithProposal is IOwnable {
address private s_owner;
address private s_pendingOwner;
event OwnershipTransferRequested(address indexed from, address indexed to);
event OwnershipTransferred(address indexed from, address indexed to);
constructor(address newOwner, address pendingOwner) {
// solhint-disable-next-line custom-errors
require(newOwner != address(0), "Cannot set owner to zero");
s_owner = newOwner;
if (pendingOwner != address(0)) {
_transferOwnership(pendingOwner);
}
}
/// @notice Allows an owner to begin transferring ownership to a new address.
function transferOwnership(address to) public override onlyOwner {
_transferOwnership(to);
}
/// @notice Allows an ownership transfer to be completed by the recipient.
function acceptOwnership() external override {
// solhint-disable-next-line custom-errors
require(msg.sender == s_pendingOwner, "Must be proposed owner");
address oldOwner = s_owner;
s_owner = msg.sender;
s_pendingOwner = address(0);
emit OwnershipTransferred(oldOwner, msg.sender);
}
/// @notice Get the current owner
function owner() public view override returns (address) {
return s_owner;
}
/// @notice validate, transfer ownership, and emit relevant events
function _transferOwnership(address to) private {
// solhint-disable-next-line custom-errors
require(to != msg.sender, "Cannot transfer to self");
s_pendingOwner = to;
emit OwnershipTransferRequested(s_owner, to);
}
/// @notice validate access
function _validateOwnership() internal view {
// solhint-disable-next-line custom-errors
require(msg.sender == s_owner, "Only callable by owner");
}
/// @notice Reverts if called by anyone other than the contract owner.
modifier onlyOwner() {
_validateOwnership();
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "../../@ensdomains/buffer/v0.1.0/Buffer.sol";
/**
* @dev A library for populating CBOR encoded payload in Solidity.
*
* https://datatracker.ietf.org/doc/html/rfc7049
*
* The library offers various write* and start* methods to encode values of different types.
* The resulted buffer can be obtained with data() method.
* Encoding of primitive types is staightforward, whereas encoding of sequences can result
* in an invalid CBOR if start/write/end flow is violated.
* For the purpose of gas saving, the library does not verify start/write/end flow internally,
* except for nested start/end pairs.
*/
library CBOR {
using Buffer for Buffer.buffer;
struct CBORBuffer {
Buffer.buffer buf;
uint256 depth;
}
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;
uint8 private constant CBOR_FALSE = 20;
uint8 private constant CBOR_TRUE = 21;
uint8 private constant CBOR_NULL = 22;
uint8 private constant CBOR_UNDEFINED = 23;
function create(uint256 capacity) internal pure returns(CBORBuffer memory cbor) {
Buffer.init(cbor.buf, capacity);
cbor.depth = 0;
return cbor;
}
function data(CBORBuffer memory buf) internal pure returns(bytes memory) {
require(buf.depth == 0, "Invalid CBOR");
return buf.buf.buf;
}
function writeUInt256(CBORBuffer memory buf, uint256 value) internal pure {
buf.buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM));
writeBytes(buf, abi.encode(value));
}
function writeInt256(CBORBuffer memory buf, int256 value) internal pure {
if (value < 0) {
buf.buf.appendUint8(
uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)
);
writeBytes(buf, abi.encode(uint256(-1 - value)));
} else {
writeUInt256(buf, uint256(value));
}
}
function writeUInt64(CBORBuffer memory buf, uint64 value) internal pure {
writeFixedNumeric(buf, MAJOR_TYPE_INT, value);
}
function writeInt64(CBORBuffer memory buf, int64 value) internal pure {
if(value >= 0) {
writeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(value));
} else{
writeFixedNumeric(buf, MAJOR_TYPE_NEGATIVE_INT, uint64(-1 - value));
}
}
function writeBytes(CBORBuffer memory buf, bytes memory value) internal pure {
writeFixedNumeric(buf, MAJOR_TYPE_BYTES, uint64(value.length));
buf.buf.append(value);
}
function writeString(CBORBuffer memory buf, string memory value) internal pure {
writeFixedNumeric(buf, MAJOR_TYPE_STRING, uint64(bytes(value).length));
buf.buf.append(bytes(value));
}
function writeBool(CBORBuffer memory buf, bool value) internal pure {
writeContentFree(buf, value ? CBOR_TRUE : CBOR_FALSE);
}
function writeNull(CBORBuffer memory buf) internal pure {
writeContentFree(buf, CBOR_NULL);
}
function writeUndefined(CBORBuffer memory buf) internal pure {
writeContentFree(buf, CBOR_UNDEFINED);
}
function startArray(CBORBuffer memory buf) internal pure {
writeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);
buf.depth += 1;
}
function startFixedArray(CBORBuffer memory buf, uint64 length) internal pure {
writeDefiniteLengthType(buf, MAJOR_TYPE_ARRAY, length);
}
function startMap(CBORBuffer memory buf) internal pure {
writeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);
buf.depth += 1;
}
function startFixedMap(CBORBuffer memory buf, uint64 length) internal pure {
writeDefiniteLengthType(buf, MAJOR_TYPE_MAP, length);
}
function endSequence(CBORBuffer memory buf) internal pure {
writeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);
buf.depth -= 1;
}
function writeKVString(CBORBuffer memory buf, string memory key, string memory value) internal pure {
writeString(buf, key);
writeString(buf, value);
}
function writeKVBytes(CBORBuffer memory buf, string memory key, bytes memory value) internal pure {
writeString(buf, key);
writeBytes(buf, value);
}
function writeKVUInt256(CBORBuffer memory buf, string memory key, uint256 value) internal pure {
writeString(buf, key);
writeUInt256(buf, value);
}
function writeKVInt256(CBORBuffer memory buf, string memory key, int256 value) internal pure {
writeString(buf, key);
writeInt256(buf, value);
}
function writeKVUInt64(CBORBuffer memory buf, string memory key, uint64 value) internal pure {
writeString(buf, key);
writeUInt64(buf, value);
}
function writeKVInt64(CBORBuffer memory buf, string memory key, int64 value) internal pure {
writeString(buf, key);
writeInt64(buf, value);
}
function writeKVBool(CBORBuffer memory buf, string memory key, bool value) internal pure {
writeString(buf, key);
writeBool(buf, value);
}
function writeKVNull(CBORBuffer memory buf, string memory key) internal pure {
writeString(buf, key);
writeNull(buf);
}
function writeKVUndefined(CBORBuffer memory buf, string memory key) internal pure {
writeString(buf, key);
writeUndefined(buf);
}
function writeKVMap(CBORBuffer memory buf, string memory key) internal pure {
writeString(buf, key);
startMap(buf);
}
function writeKVArray(CBORBuffer memory buf, string memory key) internal pure {
writeString(buf, key);
startArray(buf);
}
function writeFixedNumeric(
CBORBuffer memory buf,
uint8 major,
uint64 value
) private pure {
if (value <= 23) {
buf.buf.appendUint8(uint8((major << 5) | value));
} else if (value <= 0xFF) {
buf.buf.appendUint8(uint8((major << 5) | 24));
buf.buf.appendInt(value, 1);
} else if (value <= 0xFFFF) {
buf.buf.appendUint8(uint8((major << 5) | 25));
buf.buf.appendInt(value, 2);
} else if (value <= 0xFFFFFFFF) {
buf.buf.appendUint8(uint8((major << 5) | 26));
buf.buf.appendInt(value, 4);
} else {
buf.buf.appendUint8(uint8((major << 5) | 27));
buf.buf.appendInt(value, 8);
}
}
function writeIndefiniteLengthType(CBORBuffer memory buf, uint8 major)
private
pure
{
buf.buf.appendUint8(uint8((major << 5) | 31));
}
function writeDefiniteLengthType(CBORBuffer memory buf, uint8 major, uint64 length)
private
pure
{
writeFixedNumeric(buf, major, length);
}
function writeContentFree(CBORBuffer memory buf, uint8 value) private pure {
buf.buf.appendUint8(uint8((MAJOR_TYPE_CONTENT_FREE << 5) | value));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/// @title Chainlink Functions client interface.
interface IFunctionsClient {
/// @notice Chainlink Functions response handler called by the Functions Router
/// during fullilment from the designated transmitter node in an OCR round.
/// @param requestId The requestId returned by FunctionsClient.sendRequest().
/// @param response Aggregated response from the request's source code.
/// @param err Aggregated error either from the request's source code or from the execution pipeline.
/// @dev Either response or error parameter will be set, but never both.
function handleOracleFulfillment(bytes32 requestId, bytes memory response, bytes memory err) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {FunctionsResponse} from "../libraries/FunctionsResponse.sol";
/// @title Chainlink Functions Router interface.
interface IFunctionsRouter {
/// @notice The identifier of the route to retrieve the address of the access control contract
/// The access control contract controls which accounts can manage subscriptions
/// @return id - bytes32 id that can be passed to the "getContractById" of the Router
function getAllowListId() external view returns (bytes32);
/// @notice Set the identifier of the route to retrieve the address of the access control contract
/// The access control contract controls which accounts can manage subscriptions
function setAllowListId(bytes32 allowListId) external;
/// @notice Get the flat fee (in Juels of LINK) that will be paid to the Router owner for operation of the network
/// @return adminFee
function getAdminFee() external view returns (uint72 adminFee);
/// @notice Sends a request using the provided subscriptionId
/// @param subscriptionId - A unique subscription ID allocated by billing system,
/// a client can make requests from different contracts referencing the same subscription
/// @param data - CBOR encoded Chainlink Functions request data, use FunctionsClient API to encode a request
/// @param dataVersion - Gas limit for the fulfillment callback
/// @param callbackGasLimit - Gas limit for the fulfillment callback
/// @param donId - An identifier used to determine which route to send the request along
/// @return requestId - A unique request identifier
function sendRequest(
uint64 subscriptionId,
bytes calldata data,
uint16 dataVersion,
uint32 callbackGasLimit,
bytes32 donId
) external returns (bytes32);
/// @notice Sends a request to the proposed contracts
/// @param subscriptionId - A unique subscription ID allocated by billing system,
/// a client can make requests from different contracts referencing the same subscription
/// @param data - CBOR encoded Chainlink Functions request data, use FunctionsClient API to encode a request
/// @param dataVersion - Gas limit for the fulfillment callback
/// @param callbackGasLimit - Gas limit for the fulfillment callback
/// @param donId - An identifier used to determine which route to send the request along
/// @return requestId - A unique request identifier
function sendRequestToProposed(
uint64 subscriptionId,
bytes calldata data,
uint16 dataVersion,
uint32 callbackGasLimit,
bytes32 donId
) external returns (bytes32);
/// @notice Fulfill the request by:
/// - calling back the data that the Oracle returned to the client contract
/// - pay the DON for processing the request
/// @dev Only callable by the Coordinator contract that is saved in the commitment
/// @param response response data from DON consensus
/// @param err error from DON consensus
/// @param juelsPerGas - current rate of juels/gas
/// @param costWithoutFulfillment - The cost of processing the request (in Juels of LINK ), without fulfillment
/// @param transmitter - The Node that transmitted the OCR report
/// @param commitment - The parameters of the request that must be held consistent between request and response time
/// @return fulfillResult -
/// @return callbackGasCostJuels -
function fulfill(
bytes memory response,
bytes memory err,
uint96 juelsPerGas,
uint96 costWithoutFulfillment,
address transmitter,
FunctionsResponse.Commitment memory commitment
) external returns (FunctionsResponse.FulfillResult, uint96);
/// @notice Validate requested gas limit is below the subscription max.
/// @param subscriptionId subscription ID
/// @param callbackGasLimit desired callback gas limit
function isValidCallbackGasLimit(uint64 subscriptionId, uint32 callbackGasLimit) external view;
/// @notice Get the current contract given an ID
/// @param id A bytes32 identifier for the route
/// @return contract The current contract address
function getContractById(bytes32 id) external view returns (address);
/// @notice Get the proposed next contract given an ID
/// @param id A bytes32 identifier for the route
/// @return contract The current or proposed contract address
function getProposedContractById(bytes32 id) external view returns (address);
/// @notice Return the latest proprosal set
/// @return ids The identifiers of the contracts to update
/// @return to The addresses of the contracts that will be updated to
function getProposedContractSet() external view returns (bytes32[] memory, address[] memory);
/// @notice Proposes one or more updates to the contract routes
/// @dev Only callable by owner
function proposeContractsUpdate(bytes32[] memory proposalSetIds, address[] memory proposalSetAddresses) external;
/// @notice Updates the current contract routes to the proposed contracts
/// @dev Only callable by owner
function updateContracts() external;
/// @dev Puts the system into an emergency stopped state.
/// @dev Only callable by owner
function pause() external;
/// @dev Takes the system out of an emergency stopped state.
/// @dev Only callable by owner
function unpause() external;
}// SPDX-License-Identifier: BSD-2-Clause
pragma solidity ^0.8.4;
/**
* @dev A library for working with mutable byte buffers in Solidity.
*
* Byte buffers are mutable and expandable, and provide a variety of primitives
* for appending 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 Buffer {
/**
* @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)
let fpm := add(32, add(ptr, capacity))
if lt(fpm, ptr) {
revert(0, 0)
}
mstore(0x40, fpm)
}
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);
}
/**
* @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 Appends len bytes of 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) {
require(len <= data.length);
uint off = buf.buf.length;
uint newCapacity = off + len;
if (newCapacity > buf.capacity) {
resize(buf, newCapacity * 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(newCapacity, buflen) {
mstore(bufptr, newCapacity)
}
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
unchecked {
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.
* @return The original buffer, for chaining.
*/
function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {
return append(buf, data, data.length);
}
/**
* @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) {
uint off = buf.buf.length;
uint offPlusOne = off + 1;
if (off >= buf.capacity) {
resize(buf, offPlusOne * 2);
}
assembly {
// Memory address of the buffer data
let bufptr := mload(buf)
// 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 gt(offPlusOne, mload(bufptr)) {
mstore(bufptr, offPlusOne)
}
}
return buf;
}
/**
* @dev Appends len bytes of bytes32 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 write (left-aligned).
* @return The original buffer, for chaining.
*/
function append(buffer memory buf, bytes32 data, uint len) private pure returns(buffer memory) {
uint off = buf.buf.length;
uint newCapacity = len + off;
if (newCapacity > buf.capacity) {
resize(buf, newCapacity * 2);
}
unchecked {
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) + newCapacity
let dest := add(bufptr, newCapacity)
mstore(dest, or(and(mload(dest), not(mask)), data))
// Update buffer length if we extended it
if gt(newCapacity, mload(bufptr)) {
mstore(bufptr, newCapacity)
}
}
}
return buf;
}
/**
* @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 append(buf, 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 append(buf, data, 32);
}
/**
* @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.
* @param len The number of bytes to write (right-aligned).
* @return The original buffer.
*/
function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {
uint off = buf.buf.length;
uint newCapacity = len + off;
if (newCapacity > buf.capacity) {
resize(buf, newCapacity * 2);
}
uint mask = (256 ** len) - 1;
assembly {
// Memory address of the buffer data
let bufptr := mload(buf)
// Address = buffer address + sizeof(buffer length) + newCapacity
let dest := add(bufptr, newCapacity)
mstore(dest, or(and(mload(dest), not(mask)), data))
// Update buffer length if we extended it
if gt(newCapacity, mload(bufptr)) {
mstore(bufptr, newCapacity)
}
}
return buf;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IOwnable {
function owner() external returns (address);
function transferOwnership(address recipient) external;
function acceptOwnership() external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/// @title Library of types that are used for fulfillment of a Functions request
library FunctionsResponse {
// Used to send request information from the Router to the Coordinator
struct RequestMeta {
bytes data; // ══════════════════╸ CBOR encoded Chainlink Functions request data, use FunctionsRequest library to encode a request
bytes32 flags; // ═══════════════╸ Per-subscription flags
address requestingContract; // ══╗ The client contract that is sending the request
uint96 availableBalance; // ═════╝ Common LINK balance of the subscription that is controlled by the Router to be used for all consumer requests.
uint72 adminFee; // ═════════════╗ Flat fee (in Juels of LINK) that will be paid to the Router Owner for operation of the network
uint64 subscriptionId; // ║ Identifier of the billing subscription that will be charged for the request
uint64 initiatedRequests; // ║ The number of requests that have been started
uint32 callbackGasLimit; // ║ The amount of gas that the callback to the consuming contract will be given
uint16 dataVersion; // ══════════╝ The version of the structure of the CBOR encoded request data
uint64 completedRequests; // ════╗ The number of requests that have successfully completed or timed out
address subscriptionOwner; // ═══╝ The owner of the billing subscription
}
enum FulfillResult {
FULFILLED, // 0
USER_CALLBACK_ERROR, // 1
INVALID_REQUEST_ID, // 2
COST_EXCEEDS_COMMITMENT, // 3
INSUFFICIENT_GAS_PROVIDED, // 4
SUBSCRIPTION_BALANCE_INVARIANT_VIOLATION, // 5
INVALID_COMMITMENT // 6
}
struct Commitment {
bytes32 requestId; // ═════════════════╸ A unique identifier for a Chainlink Functions request
address coordinator; // ═══════════════╗ The Coordinator contract that manages the DON that is servicing a request
uint96 estimatedTotalCostJuels; // ════╝ The maximum cost in Juels (1e18) of LINK that will be charged to fulfill a request
address client; // ════════════════════╗ The client contract that sent the request
uint64 subscriptionId; // ║ Identifier of the billing subscription that will be charged for the request
uint32 callbackGasLimit; // ═══════════╝ The amount of gas that the callback to the consuming contract will be given
uint72 adminFee; // ═══════════════════╗ Flat fee (in Juels of LINK) that will be paid to the Router Owner for operation of the network
uint72 donFee; // ║ Fee (in Juels of LINK) that will be split between Node Operators for servicing a request
uint40 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback.
uint40 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback.
uint32 timeoutTimestamp; // ═══════════╝ The timestamp at which a request will be eligible to be timed out
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EmptyArgs","type":"error"},{"inputs":[],"name":"EmptySecrets","type":"error"},{"inputs":[],"name":"EmptySource","type":"error"},{"inputs":[],"name":"NoInlineSecrets","type":"error"},{"inputs":[],"name":"OnlyRouterCanFulfill","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"UnexpectedRequestID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"RequestFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"RequestSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"response","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"err","type":"bytes"}],"name":"Response","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"err","type":"bytes"}],"name":"handleOracleFulfillment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_lastError","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_lastRequestId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_lastResponse","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"source","type":"string"},{"internalType":"bytes","name":"encryptedSecretsUrls","type":"bytes"},{"internalType":"uint8","name":"donHostedSecretsSlotID","type":"uint8"},{"internalType":"uint64","name":"donHostedSecretsVersion","type":"uint64"},{"internalType":"string[]","name":"args","type":"string[]"},{"internalType":"bytes[]","name":"bytesArgs","type":"bytes[]"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"bytes32","name":"donID","type":"bytes32"}],"name":"sendRequest","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"request","type":"bytes"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"bytes32","name":"donID","type":"bytes32"}],"name":"sendRequestCBOR","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x60a06040523480156200001157600080fd5b5060405162002d3038038062002d3083398181016040528101906200003791906200030d565b33806000838073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000da90620003a0565b60405180910390fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146200016a5762000169816200017460201b60201c565b5b5050505062000434565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620001e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001dc9062000412565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127860405160405180910390a350565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002d582620002a8565b9050919050565b620002e781620002c8565b8114620002f357600080fd5b50565b6000815190506200030781620002dc565b92915050565b600060208284031215620003265762000325620002a3565b5b60006200033684828501620002f6565b91505092915050565b600082825260208201905092915050565b7f43616e6e6f7420736574206f776e657220746f207a65726f0000000000000000600082015250565b6000620003886018836200033f565b9150620003958262000350565b602082019050919050565b60006020820190508181036000830152620003bb8162000379565b9050919050565b7f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000600082015250565b6000620003fa6017836200033f565b91506200040782620003c2565b602082019050919050565b600060208201905081810360008301526200042d81620003eb565b9050919050565b6080516128d962000457600039600081816101b40152610ded01526128d96000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101205780638da5cb5b1461012a5780639681096f14610148578063b1e2174914610178578063f2fde38b1461019657610093565b80630ca76175146100985780633944ea3a146100b45780634b0795a8146100d257806352a81eeb146100f0575b600080fd5b6100b260048036038101906100ad9190611868565b6101b2565b005b6100bc610274565b6040516100c99190611972565b60405180910390f35b6100da610302565b6040516100e79190611972565b60405180910390f35b61010a60048036038101906101059190611cb1565b610390565b6040516101179190611dfa565b60405180910390f35b61012861046a565b005b6101326105ff565b60405161013f9190611e56565b60405180910390f35b610162600480360381019061015d9190611e71565b610628565b60405161016f9190611dfa565b60405180910390f35b610180610651565b60405161018d9190611dfa565b60405180910390f35b6101b060048036038101906101ab9190611f20565b610657565b005b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610237576040517fc6829f8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61024283838361066b565b827f85e1543bf2f84fe80c6badbce3648c8539ad1df4d2b3d822938ca0538be727e660405160405180910390a2505050565b6003805461028190611f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546102ad90611f7c565b80156102fa5780601f106102cf576101008083540402835291602001916102fa565b820191906000526020600020905b8154815290600101906020018083116102dd57829003601f168201915b505050505081565b6004805461030f90611f7c565b80601f016020809104026020016040519081016040528092919081815260200182805461033b90611f7c565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b505050505081565b600061039a610712565b6103a261162c565b6103b58b826107a290919063ffffffff16565b60008a5111156103d7576103d28a826107b390919063ffffffff16565b610401565b60008867ffffffffffffffff161115610400576103ff89898361082c9092919063ffffffff16565b5b5b60008751111561041f5761041e878261093c90919063ffffffff16565b5b60008651111561043d5761043c868261098490919063ffffffff16565b5b610451610449826109cc565b868686610de8565b6002819055506002549150509998505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f19061200a565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610632610712565b61063e85858585610de8565b6002819055506002549050949350505050565b60025481565b61065f610712565b61066881610ecb565b50565b82600254146106b157826040517fd068bf5b0000000000000000000000000000000000000000000000000000000081526004016106a89190611dfa565b60405180910390fd5b81600390816106c091906121e0565b5080600490816106d091906121e0565b50827f7873807bf6ddc50401cd3d29bbe0decee23fd4d68d273f4b5eb83cded4d2f17260036004604051610705929190612336565b60405180910390a2505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610797906123b9565b60405180910390fd5b565b6107af8260008084610ff7565b5050565b60008151036107ee576040517fe889636f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182602001906002811115610807576108066123d9565b5b9081600281111561081b5761081a6123d9565b5b815250508082608001819052505050565b60006108396101006110a1565b90506108836040518060400160405280600681526020017f736c6f7449440000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b6108998360ff16826110f190919063ffffffff16565b6108e16040518060400160405280600781526020017f76657273696f6e00000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b6108f482826110f190919063ffffffff16565b60028460200190600281111561090d5761090c6123d9565b5b90816002811115610921576109206123d9565b5b81525050806000015160000151846080018190525050505050565b6000815103610977576040517ffe936cb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260a001819052505050565b60008151036109bf576040517ffe936cb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260c001819052505050565b606060006109db6101006110a1565b9050610a256040518060400160405280600c81526020017f636f64654c6f636174696f6e0000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610a4e83600001516002811115610a3f57610a3e6123d9565b5b8261110190919063ffffffff16565b610a966040518060400160405280600881526020017f6c616e6775616765000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610abf83604001516000811115610ab057610aaf6123d9565b5b8261110190919063ffffffff16565b610b076040518060400160405280600681526020017f736f757263650000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610b1e8360600151826110c890919063ffffffff16565b60008360a00151511115610bda57610b746040518060400160405280600481526020017f6172677300000000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610b7d81611151565b60005b8360a0015151811015610bcf57610bbe8460a001518281518110610ba757610ba6612408565b5b6020026020010151836110c890919063ffffffff16565b80610bc890612466565b9050610b80565b50610bd981611179565b5b60008360800151511115610d1b5760006002811115610bfc57610bfb6123d9565b5b83602001516002811115610c1357610c126123d9565b5b03610c4a576040517fa80d31f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c926040518060400160405280600f81526020017f736563726574734c6f636174696f6e0000000000000000000000000000000000815250826110c890919063ffffffff16565b610cbb83602001516002811115610cac57610cab6123d9565b5b8261110190919063ffffffff16565b610d036040518060400160405280600781526020017f7365637265747300000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610d1a8360800151826111a190919063ffffffff16565b5b60008360c00151511115610dd757610d716040518060400160405280600981526020017f6279746573417267730000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610d7a81611151565b60005b8360c0015151811015610dcc57610dbb8460c001518281518110610da457610da3612408565b5b6020026020010151836111a190919063ffffffff16565b80610dc590612466565b9050610d7d565b50610dd681611179565b5b806000015160000151915050919050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663461d27628688600188886040518663ffffffff1660e01b8152600401610e4d9594939291906124e9565b6020604051808303816000875af1158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190612558565b9050807f1131472297a800fee664d1d89cfa8f7676ff07189ecc53f80bbb5f4969099db860405160405180910390a280915050949350505050565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f30906125d1565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127860405160405180910390a350565b6000815103611032576040517f22ce3edd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828460000190600281111561104a576110496123d9565b5b9081600281111561105e5761105d6123d9565b5b81525050818460400190600081111561107a576110796123d9565b5b9081600081111561108e5761108d6123d9565b5b8152505080846060018190525050505050565b6110a961169e565b6110b78160000151836111ca565b506000816020018181525050919050565b6110d58260038351611243565b6110ec8183600001516113ec90919063ffffffff16565b505050565b6110fd82600083611243565b5050565b61112360026005600660ff16901b17836000015161140890919063ffffffff16565b5061114d82826040516020016111399190612600565b6040516020818303038152906040526111a1565b5050565b61115c816004611472565b60018160200181815161116f919061261b565b9150818152505050565b611184816007611472565b600181602001818151611197919061264f565b9150818152505050565b6111ae8260028351611243565b6111c58183600001516113ec90919063ffffffff16565b505050565b6111d26116be565b60006020836111e191906126b2565b1461120d576020826111f391906126b2565b60206111ff919061264f565b8261120a919061261b565b91505b81836020018181525050604051808452600081528281016020018181101561123457600080fd5b80604052505082905092915050565b60178167ffffffffffffffff161161127e576112788160058460ff16901b60ff1617846000015161140890919063ffffffff16565b506113e7565b60ff8167ffffffffffffffff16116112dc576112b1601860058460ff16901b17846000015161140890919063ffffffff16565b506112d68167ffffffffffffffff16600185600001516114989092919063ffffffff16565b506113e6565b61ffff8167ffffffffffffffff161161133b57611310601960058460ff16901b17846000015161140890919063ffffffff16565b506113358167ffffffffffffffff16600285600001516114989092919063ffffffff16565b506113e5565b63ffffffff8167ffffffffffffffff161161139c57611371601a60058460ff16901b17846000015161140890919063ffffffff16565b506113968167ffffffffffffffff16600485600001516114989092919063ffffffff16565b506113e4565b6113bd601b60058460ff16901b17846000015161140890919063ffffffff16565b506113e28167ffffffffffffffff16600885600001516114989092919063ffffffff16565b505b5b5b5b505050565b6113f46116be565b61140083838451611525565b905092915050565b6114106116be565b600083600001515190506000600182611429919061261b565b90508460200151821061144d5761144c8560028361144791906126e3565b611608565b5b84516020838201018581538151831115611465578282525b5050849250505092915050565b611493601f60058360ff16901b17836000015161140890919063ffffffff16565b505050565b6114a06116be565b60008460000151519050600081846114b8919061261b565b905085602001518111156114dd576114dc866002836114d791906126e3565b611608565b5b60006001856101006114ef9190612858565b6114f9919061264f565b905086518281018783198251161781528151841115611516578382525b50508693505050509392505050565b61152d6116be565b825182111561153b57600080fd5b6000846000015151905060008382611553919061261b565b90508560200151811115611578576115778660028361157291906126e3565b611608565b5b60008087518051856020830101935080851115611593578482525b60208901925050505b602086106115da57805182526020826115b5919061261b565b91506020816115c4919061261b565b90506020866115d3919061264f565b955061159c565b60006001876020036101000a0390508019825116818451168181178552505050879450505050509392505050565b60008260000151905061161b83836111ca565b5061162683826113ec565b50505050565b6040518060e001604052806000600281111561164b5761164a6123d9565b5b815260200160006002811115611664576116636123d9565b5b815260200160008081111561167c5761167b6123d9565b5b8152602001606081526020016060815260200160608152602001606081525090565b60405180604001604052806116b16116be565b8152602001600081525090565b604051806040016040528060608152602001600081525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6116ff816116ec565b811461170a57600080fd5b50565b60008135905061171c816116f6565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6117758261172c565b810181811067ffffffffffffffff821117156117945761179361173d565b5b80604052505050565b60006117a76116d8565b90506117b3828261176c565b919050565b600067ffffffffffffffff8211156117d3576117d261173d565b5b6117dc8261172c565b9050602081019050919050565b82818337600083830152505050565b600061180b611806846117b8565b61179d565b90508281526020810184848401111561182757611826611727565b5b6118328482856117e9565b509392505050565b600082601f83011261184f5761184e611722565b5b813561185f8482602086016117f8565b91505092915050565b600080600060608486031215611881576118806116e2565b5b600061188f8682870161170d565b935050602084013567ffffffffffffffff8111156118b0576118af6116e7565b5b6118bc8682870161183a565b925050604084013567ffffffffffffffff8111156118dd576118dc6116e7565b5b6118e98682870161183a565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561192d578082015181840152602081019050611912565b60008484015250505050565b6000611944826118f3565b61194e81856118fe565b935061195e81856020860161190f565b6119678161172c565b840191505092915050565b6000602082019050818103600083015261198c8184611939565b905092915050565b600067ffffffffffffffff8211156119af576119ae61173d565b5b6119b88261172c565b9050602081019050919050565b60006119d86119d384611994565b61179d565b9050828152602081018484840111156119f4576119f3611727565b5b6119ff8482856117e9565b509392505050565b600082601f830112611a1c57611a1b611722565b5b8135611a2c8482602086016119c5565b91505092915050565b600060ff82169050919050565b611a4b81611a35565b8114611a5657600080fd5b50565b600081359050611a6881611a42565b92915050565b600067ffffffffffffffff82169050919050565b611a8b81611a6e565b8114611a9657600080fd5b50565b600081359050611aa881611a82565b92915050565b600067ffffffffffffffff821115611ac957611ac861173d565b5b602082029050602081019050919050565b600080fd5b6000611af2611aed84611aae565b61179d565b90508083825260208201905060208402830185811115611b1557611b14611ada565b5b835b81811015611b5c57803567ffffffffffffffff811115611b3a57611b39611722565b5b808601611b478982611a07565b85526020850194505050602081019050611b17565b5050509392505050565b600082601f830112611b7b57611b7a611722565b5b8135611b8b848260208601611adf565b91505092915050565b600067ffffffffffffffff821115611baf57611bae61173d565b5b602082029050602081019050919050565b6000611bd3611bce84611b94565b61179d565b90508083825260208201905060208402830185811115611bf657611bf5611ada565b5b835b81811015611c3d57803567ffffffffffffffff811115611c1b57611c1a611722565b5b808601611c28898261183a565b85526020850194505050602081019050611bf8565b5050509392505050565b600082601f830112611c5c57611c5b611722565b5b8135611c6c848260208601611bc0565b91505092915050565b600063ffffffff82169050919050565b611c8e81611c75565b8114611c9957600080fd5b50565b600081359050611cab81611c85565b92915050565b60008060008060008060008060006101208a8c031215611cd457611cd36116e2565b5b60008a013567ffffffffffffffff811115611cf257611cf16116e7565b5b611cfe8c828d01611a07565b99505060208a013567ffffffffffffffff811115611d1f57611d1e6116e7565b5b611d2b8c828d0161183a565b9850506040611d3c8c828d01611a59565b9750506060611d4d8c828d01611a99565b96505060808a013567ffffffffffffffff811115611d6e57611d6d6116e7565b5b611d7a8c828d01611b66565b95505060a08a013567ffffffffffffffff811115611d9b57611d9a6116e7565b5b611da78c828d01611c47565b94505060c0611db88c828d01611a99565b93505060e0611dc98c828d01611c9c565b925050610100611ddb8c828d0161170d565b9150509295985092959850929598565b611df4816116ec565b82525050565b6000602082019050611e0f6000830184611deb565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e4082611e15565b9050919050565b611e5081611e35565b82525050565b6000602082019050611e6b6000830184611e47565b92915050565b60008060008060808587031215611e8b57611e8a6116e2565b5b600085013567ffffffffffffffff811115611ea957611ea86116e7565b5b611eb58782880161183a565b9450506020611ec687828801611a99565b9350506040611ed787828801611c9c565b9250506060611ee88782880161170d565b91505092959194509250565b611efd81611e35565b8114611f0857600080fd5b50565b600081359050611f1a81611ef4565b92915050565b600060208284031215611f3657611f356116e2565b5b6000611f4484828501611f0b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611f9457607f821691505b602082108103611fa757611fa6611f4d565b5b50919050565b600082825260208201905092915050565b7f4d7573742062652070726f706f736564206f776e657200000000000000000000600082015250565b6000611ff4601683611fad565b9150611fff82611fbe565b602082019050919050565b6000602082019050818103600083015261202381611fe7565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261208c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261204f565b612096868361204f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006120dd6120d86120d3846120ae565b6120b8565b6120ae565b9050919050565b6000819050919050565b6120f7836120c2565b61210b612103826120e4565b84845461205c565b825550505050565b600090565b612120612113565b61212b8184846120ee565b505050565b5b8181101561214f57612144600082612118565b600181019050612131565b5050565b601f821115612194576121658161202a565b61216e8461203f565b8101602085101561217d578190505b6121916121898561203f565b830182612130565b50505b505050565b600082821c905092915050565b60006121b760001984600802612199565b1980831691505092915050565b60006121d083836121a6565b9150826002028217905092915050565b6121e9826118f3565b67ffffffffffffffff8111156122025761220161173d565b5b61220c8254611f7c565b612217828285612153565b600060209050601f83116001811461224a5760008415612238578287015190505b61224285826121c4565b8655506122aa565b601f1984166122588661202a565b60005b828110156122805784890151825560018201915060208501945060208101905061225b565b8683101561229d5784890151612299601f8916826121a6565b8355505b6001600288020188555050505b505050505050565b600081546122bf81611f7c565b6122c981866118fe565b945060018216600081146122e457600181146122fa5761232d565b60ff19831686528115156020028601935061232d565b6123038561202a565b60005b8381101561232557815481890152600182019150602081019050612306565b808801955050505b50505092915050565b6000604082019050818103600083015261235081856122b2565b9050818103602083015261236481846122b2565b90509392505050565b7f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000600082015250565b60006123a3601683611fad565b91506123ae8261236d565b602082019050919050565b600060208201905081810360008301526123d281612396565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612471826120ae565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124a3576124a2612437565b5b600182019050919050565b6124b781611a6e565b82525050565b600061ffff82169050919050565b6124d4816124bd565b82525050565b6124e381611c75565b82525050565b600060a0820190506124fe60008301886124ae565b81810360208301526125108187611939565b905061251f60408301866124cb565b61252c60608301856124da565b6125396080830184611deb565b9695505050505050565b600081519050612552816116f6565b92915050565b60006020828403121561256e5761256d6116e2565b5b600061257c84828501612543565b91505092915050565b7f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000600082015250565b60006125bb601783611fad565b91506125c682612585565b602082019050919050565b600060208201905081810360008301526125ea816125ae565b9050919050565b6125fa816120ae565b82525050565b600060208201905061261560008301846125f1565b92915050565b6000612626826120ae565b9150612631836120ae565b925082820190508082111561264957612648612437565b5b92915050565b600061265a826120ae565b9150612665836120ae565b925082820390508181111561267d5761267c612437565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006126bd826120ae565b91506126c8836120ae565b9250826126d8576126d7612683565b5b828206905092915050565b60006126ee826120ae565b91506126f9836120ae565b9250828202612707816120ae565b9150828204841483151761271e5761271d612437565b5b5092915050565b60008160011c9050919050565b6000808291508390505b600185111561277c5780860481111561275857612757612437565b5b60018516156127675780820291505b808102905061277585612725565b945061273c565b94509492505050565b6000826127955760019050612851565b816127a35760009050612851565b81600181146127b957600281146127c3576127f2565b6001915050612851565b60ff8411156127d5576127d4612437565b5b8360020a9150848211156127ec576127eb612437565b5b50612851565b5060208310610133831016604e8410600b84101617156128275782820a90508381111561282257612821612437565b5b612851565b6128348484846001612732565b9250905081840481111561284b5761284a612437565b5b81810290505b9392505050565b6000612863826120ae565b915061286e836120ae565b925061289b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612785565b90509291505056fea264697066735822122026f6d6eeed4dcf6d35847fce6397e1be928c6e09483b9ace29f99f395f2d8bcf64736f6c63430008130033000000000000000000000000b83e47c2bc239b3bf370bc41e1459a34b41238d0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101205780638da5cb5b1461012a5780639681096f14610148578063b1e2174914610178578063f2fde38b1461019657610093565b80630ca76175146100985780633944ea3a146100b45780634b0795a8146100d257806352a81eeb146100f0575b600080fd5b6100b260048036038101906100ad9190611868565b6101b2565b005b6100bc610274565b6040516100c99190611972565b60405180910390f35b6100da610302565b6040516100e79190611972565b60405180910390f35b61010a60048036038101906101059190611cb1565b610390565b6040516101179190611dfa565b60405180910390f35b61012861046a565b005b6101326105ff565b60405161013f9190611e56565b60405180910390f35b610162600480360381019061015d9190611e71565b610628565b60405161016f9190611dfa565b60405180910390f35b610180610651565b60405161018d9190611dfa565b60405180910390f35b6101b060048036038101906101ab9190611f20565b610657565b005b7f000000000000000000000000b83e47c2bc239b3bf370bc41e1459a34b41238d073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610237576040517fc6829f8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61024283838361066b565b827f85e1543bf2f84fe80c6badbce3648c8539ad1df4d2b3d822938ca0538be727e660405160405180910390a2505050565b6003805461028190611f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546102ad90611f7c565b80156102fa5780601f106102cf576101008083540402835291602001916102fa565b820191906000526020600020905b8154815290600101906020018083116102dd57829003601f168201915b505050505081565b6004805461030f90611f7c565b80601f016020809104026020016040519081016040528092919081815260200182805461033b90611f7c565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b505050505081565b600061039a610712565b6103a261162c565b6103b58b826107a290919063ffffffff16565b60008a5111156103d7576103d28a826107b390919063ffffffff16565b610401565b60008867ffffffffffffffff161115610400576103ff89898361082c9092919063ffffffff16565b5b5b60008751111561041f5761041e878261093c90919063ffffffff16565b5b60008651111561043d5761043c868261098490919063ffffffff16565b5b610451610449826109cc565b868686610de8565b6002819055506002549150509998505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f19061200a565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610632610712565b61063e85858585610de8565b6002819055506002549050949350505050565b60025481565b61065f610712565b61066881610ecb565b50565b82600254146106b157826040517fd068bf5b0000000000000000000000000000000000000000000000000000000081526004016106a89190611dfa565b60405180910390fd5b81600390816106c091906121e0565b5080600490816106d091906121e0565b50827f7873807bf6ddc50401cd3d29bbe0decee23fd4d68d273f4b5eb83cded4d2f17260036004604051610705929190612336565b60405180910390a2505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610797906123b9565b60405180910390fd5b565b6107af8260008084610ff7565b5050565b60008151036107ee576040517fe889636f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182602001906002811115610807576108066123d9565b5b9081600281111561081b5761081a6123d9565b5b815250508082608001819052505050565b60006108396101006110a1565b90506108836040518060400160405280600681526020017f736c6f7449440000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b6108998360ff16826110f190919063ffffffff16565b6108e16040518060400160405280600781526020017f76657273696f6e00000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b6108f482826110f190919063ffffffff16565b60028460200190600281111561090d5761090c6123d9565b5b90816002811115610921576109206123d9565b5b81525050806000015160000151846080018190525050505050565b6000815103610977576040517ffe936cb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260a001819052505050565b60008151036109bf576040517ffe936cb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260c001819052505050565b606060006109db6101006110a1565b9050610a256040518060400160405280600c81526020017f636f64654c6f636174696f6e0000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610a4e83600001516002811115610a3f57610a3e6123d9565b5b8261110190919063ffffffff16565b610a966040518060400160405280600881526020017f6c616e6775616765000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610abf83604001516000811115610ab057610aaf6123d9565b5b8261110190919063ffffffff16565b610b076040518060400160405280600681526020017f736f757263650000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610b1e8360600151826110c890919063ffffffff16565b60008360a00151511115610bda57610b746040518060400160405280600481526020017f6172677300000000000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610b7d81611151565b60005b8360a0015151811015610bcf57610bbe8460a001518281518110610ba757610ba6612408565b5b6020026020010151836110c890919063ffffffff16565b80610bc890612466565b9050610b80565b50610bd981611179565b5b60008360800151511115610d1b5760006002811115610bfc57610bfb6123d9565b5b83602001516002811115610c1357610c126123d9565b5b03610c4a576040517fa80d31f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c926040518060400160405280600f81526020017f736563726574734c6f636174696f6e0000000000000000000000000000000000815250826110c890919063ffffffff16565b610cbb83602001516002811115610cac57610cab6123d9565b5b8261110190919063ffffffff16565b610d036040518060400160405280600781526020017f7365637265747300000000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610d1a8360800151826111a190919063ffffffff16565b5b60008360c00151511115610dd757610d716040518060400160405280600981526020017f6279746573417267730000000000000000000000000000000000000000000000815250826110c890919063ffffffff16565b610d7a81611151565b60005b8360c0015151811015610dcc57610dbb8460c001518281518110610da457610da3612408565b5b6020026020010151836111a190919063ffffffff16565b80610dc590612466565b9050610d7d565b50610dd681611179565b5b806000015160000151915050919050565b6000807f000000000000000000000000b83e47c2bc239b3bf370bc41e1459a34b41238d073ffffffffffffffffffffffffffffffffffffffff1663461d27628688600188886040518663ffffffff1660e01b8152600401610e4d9594939291906124e9565b6020604051808303816000875af1158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e909190612558565b9050807f1131472297a800fee664d1d89cfa8f7676ff07189ecc53f80bbb5f4969099db860405160405180910390a280915050949350505050565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f30906125d1565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127860405160405180910390a350565b6000815103611032576040517f22ce3edd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828460000190600281111561104a576110496123d9565b5b9081600281111561105e5761105d6123d9565b5b81525050818460400190600081111561107a576110796123d9565b5b9081600081111561108e5761108d6123d9565b5b8152505080846060018190525050505050565b6110a961169e565b6110b78160000151836111ca565b506000816020018181525050919050565b6110d58260038351611243565b6110ec8183600001516113ec90919063ffffffff16565b505050565b6110fd82600083611243565b5050565b61112360026005600660ff16901b17836000015161140890919063ffffffff16565b5061114d82826040516020016111399190612600565b6040516020818303038152906040526111a1565b5050565b61115c816004611472565b60018160200181815161116f919061261b565b9150818152505050565b611184816007611472565b600181602001818151611197919061264f565b9150818152505050565b6111ae8260028351611243565b6111c58183600001516113ec90919063ffffffff16565b505050565b6111d26116be565b60006020836111e191906126b2565b1461120d576020826111f391906126b2565b60206111ff919061264f565b8261120a919061261b565b91505b81836020018181525050604051808452600081528281016020018181101561123457600080fd5b80604052505082905092915050565b60178167ffffffffffffffff161161127e576112788160058460ff16901b60ff1617846000015161140890919063ffffffff16565b506113e7565b60ff8167ffffffffffffffff16116112dc576112b1601860058460ff16901b17846000015161140890919063ffffffff16565b506112d68167ffffffffffffffff16600185600001516114989092919063ffffffff16565b506113e6565b61ffff8167ffffffffffffffff161161133b57611310601960058460ff16901b17846000015161140890919063ffffffff16565b506113358167ffffffffffffffff16600285600001516114989092919063ffffffff16565b506113e5565b63ffffffff8167ffffffffffffffff161161139c57611371601a60058460ff16901b17846000015161140890919063ffffffff16565b506113968167ffffffffffffffff16600485600001516114989092919063ffffffff16565b506113e4565b6113bd601b60058460ff16901b17846000015161140890919063ffffffff16565b506113e28167ffffffffffffffff16600885600001516114989092919063ffffffff16565b505b5b5b5b505050565b6113f46116be565b61140083838451611525565b905092915050565b6114106116be565b600083600001515190506000600182611429919061261b565b90508460200151821061144d5761144c8560028361144791906126e3565b611608565b5b84516020838201018581538151831115611465578282525b5050849250505092915050565b611493601f60058360ff16901b17836000015161140890919063ffffffff16565b505050565b6114a06116be565b60008460000151519050600081846114b8919061261b565b905085602001518111156114dd576114dc866002836114d791906126e3565b611608565b5b60006001856101006114ef9190612858565b6114f9919061264f565b905086518281018783198251161781528151841115611516578382525b50508693505050509392505050565b61152d6116be565b825182111561153b57600080fd5b6000846000015151905060008382611553919061261b565b90508560200151811115611578576115778660028361157291906126e3565b611608565b5b60008087518051856020830101935080851115611593578482525b60208901925050505b602086106115da57805182526020826115b5919061261b565b91506020816115c4919061261b565b90506020866115d3919061264f565b955061159c565b60006001876020036101000a0390508019825116818451168181178552505050879450505050509392505050565b60008260000151905061161b83836111ca565b5061162683826113ec565b50505050565b6040518060e001604052806000600281111561164b5761164a6123d9565b5b815260200160006002811115611664576116636123d9565b5b815260200160008081111561167c5761167b6123d9565b5b8152602001606081526020016060815260200160608152602001606081525090565b60405180604001604052806116b16116be565b8152602001600081525090565b604051806040016040528060608152602001600081525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6116ff816116ec565b811461170a57600080fd5b50565b60008135905061171c816116f6565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6117758261172c565b810181811067ffffffffffffffff821117156117945761179361173d565b5b80604052505050565b60006117a76116d8565b90506117b3828261176c565b919050565b600067ffffffffffffffff8211156117d3576117d261173d565b5b6117dc8261172c565b9050602081019050919050565b82818337600083830152505050565b600061180b611806846117b8565b61179d565b90508281526020810184848401111561182757611826611727565b5b6118328482856117e9565b509392505050565b600082601f83011261184f5761184e611722565b5b813561185f8482602086016117f8565b91505092915050565b600080600060608486031215611881576118806116e2565b5b600061188f8682870161170d565b935050602084013567ffffffffffffffff8111156118b0576118af6116e7565b5b6118bc8682870161183a565b925050604084013567ffffffffffffffff8111156118dd576118dc6116e7565b5b6118e98682870161183a565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561192d578082015181840152602081019050611912565b60008484015250505050565b6000611944826118f3565b61194e81856118fe565b935061195e81856020860161190f565b6119678161172c565b840191505092915050565b6000602082019050818103600083015261198c8184611939565b905092915050565b600067ffffffffffffffff8211156119af576119ae61173d565b5b6119b88261172c565b9050602081019050919050565b60006119d86119d384611994565b61179d565b9050828152602081018484840111156119f4576119f3611727565b5b6119ff8482856117e9565b509392505050565b600082601f830112611a1c57611a1b611722565b5b8135611a2c8482602086016119c5565b91505092915050565b600060ff82169050919050565b611a4b81611a35565b8114611a5657600080fd5b50565b600081359050611a6881611a42565b92915050565b600067ffffffffffffffff82169050919050565b611a8b81611a6e565b8114611a9657600080fd5b50565b600081359050611aa881611a82565b92915050565b600067ffffffffffffffff821115611ac957611ac861173d565b5b602082029050602081019050919050565b600080fd5b6000611af2611aed84611aae565b61179d565b90508083825260208201905060208402830185811115611b1557611b14611ada565b5b835b81811015611b5c57803567ffffffffffffffff811115611b3a57611b39611722565b5b808601611b478982611a07565b85526020850194505050602081019050611b17565b5050509392505050565b600082601f830112611b7b57611b7a611722565b5b8135611b8b848260208601611adf565b91505092915050565b600067ffffffffffffffff821115611baf57611bae61173d565b5b602082029050602081019050919050565b6000611bd3611bce84611b94565b61179d565b90508083825260208201905060208402830185811115611bf657611bf5611ada565b5b835b81811015611c3d57803567ffffffffffffffff811115611c1b57611c1a611722565b5b808601611c28898261183a565b85526020850194505050602081019050611bf8565b5050509392505050565b600082601f830112611c5c57611c5b611722565b5b8135611c6c848260208601611bc0565b91505092915050565b600063ffffffff82169050919050565b611c8e81611c75565b8114611c9957600080fd5b50565b600081359050611cab81611c85565b92915050565b60008060008060008060008060006101208a8c031215611cd457611cd36116e2565b5b60008a013567ffffffffffffffff811115611cf257611cf16116e7565b5b611cfe8c828d01611a07565b99505060208a013567ffffffffffffffff811115611d1f57611d1e6116e7565b5b611d2b8c828d0161183a565b9850506040611d3c8c828d01611a59565b9750506060611d4d8c828d01611a99565b96505060808a013567ffffffffffffffff811115611d6e57611d6d6116e7565b5b611d7a8c828d01611b66565b95505060a08a013567ffffffffffffffff811115611d9b57611d9a6116e7565b5b611da78c828d01611c47565b94505060c0611db88c828d01611a99565b93505060e0611dc98c828d01611c9c565b925050610100611ddb8c828d0161170d565b9150509295985092959850929598565b611df4816116ec565b82525050565b6000602082019050611e0f6000830184611deb565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e4082611e15565b9050919050565b611e5081611e35565b82525050565b6000602082019050611e6b6000830184611e47565b92915050565b60008060008060808587031215611e8b57611e8a6116e2565b5b600085013567ffffffffffffffff811115611ea957611ea86116e7565b5b611eb58782880161183a565b9450506020611ec687828801611a99565b9350506040611ed787828801611c9c565b9250506060611ee88782880161170d565b91505092959194509250565b611efd81611e35565b8114611f0857600080fd5b50565b600081359050611f1a81611ef4565b92915050565b600060208284031215611f3657611f356116e2565b5b6000611f4484828501611f0b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611f9457607f821691505b602082108103611fa757611fa6611f4d565b5b50919050565b600082825260208201905092915050565b7f4d7573742062652070726f706f736564206f776e657200000000000000000000600082015250565b6000611ff4601683611fad565b9150611fff82611fbe565b602082019050919050565b6000602082019050818103600083015261202381611fe7565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261208c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261204f565b612096868361204f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006120dd6120d86120d3846120ae565b6120b8565b6120ae565b9050919050565b6000819050919050565b6120f7836120c2565b61210b612103826120e4565b84845461205c565b825550505050565b600090565b612120612113565b61212b8184846120ee565b505050565b5b8181101561214f57612144600082612118565b600181019050612131565b5050565b601f821115612194576121658161202a565b61216e8461203f565b8101602085101561217d578190505b6121916121898561203f565b830182612130565b50505b505050565b600082821c905092915050565b60006121b760001984600802612199565b1980831691505092915050565b60006121d083836121a6565b9150826002028217905092915050565b6121e9826118f3565b67ffffffffffffffff8111156122025761220161173d565b5b61220c8254611f7c565b612217828285612153565b600060209050601f83116001811461224a5760008415612238578287015190505b61224285826121c4565b8655506122aa565b601f1984166122588661202a565b60005b828110156122805784890151825560018201915060208501945060208101905061225b565b8683101561229d5784890151612299601f8916826121a6565b8355505b6001600288020188555050505b505050505050565b600081546122bf81611f7c565b6122c981866118fe565b945060018216600081146122e457600181146122fa5761232d565b60ff19831686528115156020028601935061232d565b6123038561202a565b60005b8381101561232557815481890152600182019150602081019050612306565b808801955050505b50505092915050565b6000604082019050818103600083015261235081856122b2565b9050818103602083015261236481846122b2565b90509392505050565b7f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000600082015250565b60006123a3601683611fad565b91506123ae8261236d565b602082019050919050565b600060208201905081810360008301526123d281612396565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612471826120ae565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124a3576124a2612437565b5b600182019050919050565b6124b781611a6e565b82525050565b600061ffff82169050919050565b6124d4816124bd565b82525050565b6124e381611c75565b82525050565b600060a0820190506124fe60008301886124ae565b81810360208301526125108187611939565b905061251f60408301866124cb565b61252c60608301856124da565b6125396080830184611deb565b9695505050505050565b600081519050612552816116f6565b92915050565b60006020828403121561256e5761256d6116e2565b5b600061257c84828501612543565b91505092915050565b7f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000600082015250565b60006125bb601783611fad565b91506125c682612585565b602082019050919050565b600060208201905081810360008301526125ea816125ae565b9050919050565b6125fa816120ae565b82525050565b600060208201905061261560008301846125f1565b92915050565b6000612626826120ae565b9150612631836120ae565b925082820190508082111561264957612648612437565b5b92915050565b600061265a826120ae565b9150612665836120ae565b925082820390508181111561267d5761267c612437565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006126bd826120ae565b91506126c8836120ae565b9250826126d8576126d7612683565b5b828206905092915050565b60006126ee826120ae565b91506126f9836120ae565b9250828202612707816120ae565b9150828204841483151761271e5761271d612437565b5b5092915050565b60008160011c9050919050565b6000808291508390505b600185111561277c5780860481111561275857612757612437565b5b60018516156127675780820291505b808102905061277585612725565b945061273c565b94509492505050565b6000826127955760019050612851565b816127a35760009050612851565b81600181146127b957600281146127c3576127f2565b6001915050612851565b60ff8411156127d5576127d4612437565b5b8360020a9150848211156127ec576127eb612437565b5b50612851565b5060208310610133831016604e8410600b84101617156128275782820a90508381111561282257612821612437565b5b612851565b6128348484846001612732565b9250905081840481111561284b5761284a612437565b5b81810290505b9392505050565b6000612863826120ae565b915061286e836120ae565b925061289b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612785565b90509291505056fea264697066735822122026f6d6eeed4dcf6d35847fce6397e1be928c6e09483b9ace29f99f395f2d8bcf64736f6c63430008130033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.