Skip to content

Instantly share code, notes, and snippets.

@jefflau
Created January 20, 2022 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefflau/c1bce676e68c9bc8d3aaa5c7e4b2a7c9 to your computer and use it in GitHub Desktop.
Save jefflau/c1bce676e68c9bc8d3aaa5c7e4b2a7c9 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.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
let payloadStart := add(payload, 32)
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
}
}
function log() internal view {
_sendLogPayload(abi.encodeWithSignature("log()"));
}
function logInt(int p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
}
function logUint(uint p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
}
function logString(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function logBool(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function logAddress(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function logBytes(bytes memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
}
function logBytes1(bytes1 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
}
function logBytes2(bytes2 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
}
function logBytes3(bytes3 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
}
function logBytes4(bytes4 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
}
function logBytes5(bytes5 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
}
function logBytes6(bytes6 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
}
function logBytes7(bytes7 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
}
function logBytes8(bytes8 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
}
function logBytes9(bytes9 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
}
function logBytes10(bytes10 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
}
function logBytes11(bytes11 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
}
function logBytes12(bytes12 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
}
function logBytes13(bytes13 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
}
function logBytes14(bytes14 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
}
function logBytes15(bytes15 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
}
function logBytes16(bytes16 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
}
function logBytes17(bytes17 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
}
function logBytes18(bytes18 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
}
function logBytes19(bytes19 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
}
function logBytes20(bytes20 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
}
function logBytes21(bytes21 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
}
function logBytes22(bytes22 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
}
function logBytes23(bytes23 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
}
function logBytes24(bytes24 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
}
function logBytes25(bytes25 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
}
function logBytes26(bytes26 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
}
function logBytes27(bytes27 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
}
function logBytes28(bytes28 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
}
function logBytes29(bytes29 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
}
function logBytes30(bytes30 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
}
function logBytes31(bytes31 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
}
function logBytes32(bytes32 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
}
function log(uint p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
}
function log(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function log(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function log(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function log(uint p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
}
function log(uint p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
}
function log(uint p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
}
function log(uint p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
}
function log(string memory p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
}
function log(string memory p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
}
function log(string memory p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
}
function log(string memory p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
}
function log(bool p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
}
function log(bool p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
}
function log(bool p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
}
function log(bool p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
}
function log(address p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
}
function log(address p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
}
function log(address p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
}
function log(address p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
}
function log(uint p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
}
function log(uint p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
}
function log(uint p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
}
function log(uint p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
}
function log(uint p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
}
function log(uint p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
}
function log(uint p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
}
function log(uint p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
}
function log(uint p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
}
function log(uint p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
}
function log(uint p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
}
function log(uint p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
}
function log(uint p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
}
function log(uint p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
}
function log(uint p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
}
function log(uint p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
}
function log(string memory p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
}
function log(string memory p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
}
function log(string memory p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
}
function log(string memory p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
}
function log(string memory p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
}
function log(string memory p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
}
function log(string memory p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
}
function log(string memory p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
}
function log(string memory p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
}
function log(string memory p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
}
function log(string memory p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
}
function log(string memory p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
}
function log(string memory p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
}
function log(string memory p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
}
function log(string memory p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
}
function log(string memory p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
}
function log(bool p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
}
function log(bool p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
}
function log(bool p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
}
function log(bool p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
}
function log(bool p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
}
function log(bool p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
}
function log(bool p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
}
function log(bool p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
}
function log(bool p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
}
function log(bool p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
}
function log(bool p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
}
function log(bool p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
}
function log(bool p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
}
function log(bool p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
}
function log(bool p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
}
function log(bool p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
}
function log(address p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
}
function log(address p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
}
function log(address p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
}
function log(address p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
}
function log(address p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
}
function log(address p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
}
function log(address p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
}
function log(address p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
}
function log(address p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
}
function log(address p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
}
function log(address p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
}
function log(address p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
}
function log(address p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
}
function log(address p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
}
function log(address p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
}
function log(address p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
}
function log(uint p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db;
accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB;
accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2;
accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372;
accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678;
accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7;
accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C;
accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC;
accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;
accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C;
accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB;
accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225;
accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148;
return accounts[index];
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library Assert {
event AssertionEvent(
bool passed,
string message,
string methodName
);
event AssertionEventUint(
bool passed,
string message,
string methodName,
uint256 returned,
uint256 expected
);
event AssertionEventInt(
bool passed,
string message,
string methodName,
int256 returned,
int256 expected
);
event AssertionEventBool(
bool passed,
string message,
string methodName,
bool returned,
bool expected
);
event AssertionEventAddress(
bool passed,
string message,
string methodName,
address returned,
address expected
);
event AssertionEventBytes32(
bool passed,
string message,
string methodName,
bytes32 returned,
bytes32 expected
);
event AssertionEventString(
bool passed,
string message,
string methodName,
string returned,
string expected
);
event AssertionEventUintInt(
bool passed,
string message,
string methodName,
uint256 returned,
int256 expected
);
event AssertionEventIntUint(
bool passed,
string message,
string methodName,
int256 returned,
uint256 expected
);
function ok(bool a, string memory message) public returns (bool result) {
result = a;
emit AssertionEvent(result, message, "ok");
}
function equal(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventUint(result, message, "equal", a, b);
}
function equal(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventInt(result, message, "equal", a, b);
}
function equal(bool a, bool b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBool(result, message, "equal", a, b);
}
// TODO: only for certain versions of solc
//function equal(fixed a, fixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function equal(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
function equal(address a, address b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventAddress(result, message, "equal", a, b);
}
function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBytes32(result, message, "equal", a, b);
}
function equal(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "equal", a, b);
}
function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventUint(result, message, "notEqual", a, b);
}
function notEqual(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventInt(result, message, "notEqual", a, b);
}
function notEqual(bool a, bool b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBool(result, message, "notEqual", a, b);
}
// TODO: only for certain versions of solc
//function notEqual(fixed a, fixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
function notEqual(address a, address b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventAddress(result, message, "notEqual", a, b);
}
function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBytes32(result, message, "notEqual", a, b);
}
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "notEqual", a, b);
}
/*----------------- Greater than --------------------*/
function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventUint(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventInt(result, message, "greaterThan", a, b);
}
// TODO: safely compare between uint and int
function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative uint "a" always greater
result = true;
} else {
result = (a > uint(b));
}
emit AssertionEventUintInt(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative uint "b" always greater
result = false;
} else {
result = (uint(a) > b);
}
emit AssertionEventIntUint(result, message, "greaterThan", a, b);
}
/*----------------- Lesser than --------------------*/
function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventUint(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventInt(result, message, "lesserThan", a, b);
}
// TODO: safely compare between uint and int
function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative int "b" always lesser
result = false;
} else {
result = (a < uint(b));
}
emit AssertionEventUintInt(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative int "a" always lesser
result = true;
} else {
result = (uint(a) < b);
}
emit AssertionEventIntUint(result, message, "lesserThan", a, b);
}
}
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
The 'scripts' folder contains example async/await scripts for deploying the 'Storage' contract.
For the deployment of any other contract, 'contractName' and 'constructorArgs' should be updated (along with other code if required).
Scripts have full access to the web3.js and ethers.js libraries.
To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled.
Output from script will appear in remix terminal.
{
"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": {
"functionDebugData": {
"@_15": {
"entryPoint": null,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256_fromMemory": {
"entryPoint": 64,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256_fromMemory": {
"entryPoint": 85,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 130,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 140,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 145,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1048:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "70:80:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "80:22:2",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "95:6:2"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "89:5:2"
},
"nodeType": "YulFunctionCall",
"src": "89:13:2"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "80:5:2"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "138:5:2"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "111:26:2"
},
"nodeType": "YulFunctionCall",
"src": "111:33:2"
},
"nodeType": "YulExpressionStatement",
"src": "111:33:2"
}
]
},
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "48:6:2",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "56:3:2",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "64:5:2",
"type": ""
}
],
"src": "7:143:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "233:274:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "279:83:2",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "281:77:2"
},
"nodeType": "YulFunctionCall",
"src": "281:79:2"
},
"nodeType": "YulExpressionStatement",
"src": "281:79:2"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "254:7:2"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "263:9:2"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "250:3:2"
},
"nodeType": "YulFunctionCall",
"src": "250:23:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "275:2:2",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "246:3:2"
},
"nodeType": "YulFunctionCall",
"src": "246:32:2"
},
"nodeType": "YulIf",
"src": "243:119:2"
},
{
"nodeType": "YulBlock",
"src": "372:128:2",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "387:15:2",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "401:1:2",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "391:6:2",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "416:74:2",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "462:9:2"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "473:6:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "458:3:2"
},
"nodeType": "YulFunctionCall",
"src": "458:22:2"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "482:7:2"
}
],
"functionName": {
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulIdentifier",
"src": "426:31:2"
},
"nodeType": "YulFunctionCall",
"src": "426:64:2"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "416:6:2"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "203:9:2",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "214:7:2",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "226:6:2",
"type": ""
}
],
"src": "156:351:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "553:35:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "563:19:2",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "579:2:2",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "573:5:2"
},
"nodeType": "YulFunctionCall",
"src": "573:9:2"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "563:6:2"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "546:6:2",
"type": ""
}
],
"src": "513:75:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "639:32:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "649:16:2",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "660:5:2"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "649:7:2"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "621:5:2",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "631:7:2",
"type": ""
}
],
"src": "594:77:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "766:28:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "783:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "786:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "776:6:2"
},
"nodeType": "YulFunctionCall",
"src": "776:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "776:12:2"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "677:117:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "889:28:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "906:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "909:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "899:6:2"
},
"nodeType": "YulFunctionCall",
"src": "899:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "899:12:2"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "800:117:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "966:79:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1023:16:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1032:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1035:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1025:6:2"
},
"nodeType": "YulFunctionCall",
"src": "1025:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "1025:12:2"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "989:5:2"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1014:5:2"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "996:17:2"
},
"nodeType": "YulFunctionCall",
"src": "996:24:2"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "986:2:2"
},
"nodeType": "YulFunctionCall",
"src": "986:35:2"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "979:6:2"
},
"nodeType": "YulFunctionCall",
"src": "979:43:2"
},
"nodeType": "YulIf",
"src": "976:63:2"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "959:5:2",
"type": ""
}
],
"src": "923:122:2"
}
]
},
"contents": "{\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 2,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "60a060405234801561001057600080fd5b5060405161037c38038061037c83398181016040528101906100329190610055565b8060808181525050506100a8565b60008151905061004f81610091565b92915050565b60006020828403121561006b5761006a61008c565b5b600061007984828501610040565b91505092915050565b6000819050919050565b600080fd5b61009a81610082565b81146100a557600080fd5b50565b6080516102bc6100c0600039600050506102bc6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063487a239514610030575b600080fd5b61004a60048036038101906100459190610165565b61004c565b005b61008a6040518060400160405280600781526020017f776861646475700000000000000000000000000000000000000000000000000081525061008e565b5050565b610124816040516024016100a291906101de565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610127565b50565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008135905061015f8161026f565b92915050565b6000806040838503121561017c5761017b610259565b5b600061018a85828601610150565b925050602061019b85828601610150565b9150509250929050565b60006101b082610200565b6101ba818561020b565b93506101ca818560208601610226565b6101d38161025e565b840191505092915050565b600060208201905081810360008301526101f881846101a5565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b83811015610244578082015181840152602081019050610229565b83811115610253576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b6102788161021c565b811461028357600080fd5b5056fea2646970667358221220be3af85cd892b0d8175bb8088a435d0b92bc4b717afed68036b952d3e0b9adf364736f6c63430008070033",
"opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x37C CODESIZE SUB DUP1 PUSH2 0x37C DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0x55 JUMP JUMPDEST DUP1 PUSH1 0x80 DUP2 DUP2 MSTORE POP POP POP PUSH2 0xA8 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x4F DUP2 PUSH2 0x91 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6B JUMPI PUSH2 0x6A PUSH2 0x8C JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x79 DUP5 DUP3 DUP6 ADD PUSH2 0x40 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x9A DUP2 PUSH2 0x82 JUMP JUMPDEST DUP2 EQ PUSH2 0xA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x2BC PUSH2 0xC0 PUSH1 0x0 CODECOPY PUSH1 0x0 POP POP PUSH2 0x2BC 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 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x487A2395 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x165 JUMP JUMPDEST PUSH2 0x4C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7768616464757000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH2 0x8E JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x124 DUP2 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0x1DE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH32 0x41304FAC00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH2 0x127 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH1 0x0 PUSH11 0x636F6E736F6C652E6C6F67 SWAP1 POP PUSH1 0x20 DUP4 ADD PUSH1 0x0 DUP1 DUP5 DUP4 DUP6 GAS STATICCALL POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x15F DUP2 PUSH2 0x26F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x17C JUMPI PUSH2 0x17B PUSH2 0x259 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x18A DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x19B DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B0 DUP3 PUSH2 0x200 JUMP JUMPDEST PUSH2 0x1BA DUP2 DUP6 PUSH2 0x20B JUMP JUMPDEST SWAP4 POP PUSH2 0x1CA DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x226 JUMP JUMPDEST PUSH2 0x1D3 DUP2 PUSH2 0x25E JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1F8 DUP2 DUP5 PUSH2 0x1A5 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x244 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x229 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x253 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x278 DUP2 PUSH2 0x21C JUMP JUMPDEST DUP2 EQ PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBE GASPRICE 0xF8 0x5C 0xD8 SWAP3 0xB0 0xD8 OR JUMPDEST 0xB8 ADDMOD DUP11 NUMBER 0x5D SIGNEXTEND SWAP3 0xBC 0x4B PUSH18 0x7AFED68036B952D3E0B9ADF364736F6C6343 STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "171:378:0:-:0;;;244:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;295:9;284:20;;;;;;244:67;171:378;;7:143:2;64:5;95:6;89:13;80:22;;111:33;138:5;111:33;:::i;:::-;7:143;;;;:::o;156:351::-;226:6;275:2;263:9;254:7;250:23;246:32;243:119;;;281:79;;:::i;:::-;243:119;401:1;426:64;482:7;473:6;462:9;458:22;426:64;:::i;:::-;416:74;;372:128;156:351;;;;:::o;594:77::-;631:7;660:5;649:16;;594:77;;;:::o;800:117::-;909:1;906;899:12;923:122;996:24;1014:5;996:24;:::i;:::-;989:5;986:35;976:63;;1035:1;1032;1025:12;976:63;923:122;:::o;171:378:0:-;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@_sendLogPayload_55": {
"entryPoint": 295,
"id": 55,
"parameterSlots": 1,
"returnSlots": 0
},
"@log_626": {
"entryPoint": 142,
"id": 626,
"parameterSlots": 1,
"returnSlots": 0
},
"@price_30": {
"entryPoint": 76,
"id": 30,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 336,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256t_uint256": {
"entryPoint": 357,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 421,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 478,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 512,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 523,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 540,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_memory_to_memory": {
"entryPoint": 550,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 601,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 606,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"validator_revert_t_uint256": {
"entryPoint": 623,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2557:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "59:87:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "69:29:2",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "91:6:2"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "78:12:2"
},
"nodeType": "YulFunctionCall",
"src": "78:20:2"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "69:5:2"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "134:5:2"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "107:26:2"
},
"nodeType": "YulFunctionCall",
"src": "107:33:2"
},
"nodeType": "YulExpressionStatement",
"src": "107:33:2"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "37:6:2",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "45:3:2",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "53:5:2",
"type": ""
}
],
"src": "7:139:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "235:391:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "281:83:2",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "283:77:2"
},
"nodeType": "YulFunctionCall",
"src": "283:79:2"
},
"nodeType": "YulExpressionStatement",
"src": "283:79:2"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "256:7:2"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "265:9:2"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "252:3:2"
},
"nodeType": "YulFunctionCall",
"src": "252:23:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "277:2:2",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "248:3:2"
},
"nodeType": "YulFunctionCall",
"src": "248:32:2"
},
"nodeType": "YulIf",
"src": "245:119:2"
},
{
"nodeType": "YulBlock",
"src": "374:117:2",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "389:15:2",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "403:1:2",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "393:6:2",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "418:63:2",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "453:9:2"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "464:6:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "449:3:2"
},
"nodeType": "YulFunctionCall",
"src": "449:22:2"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "473:7:2"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "428:20:2"
},
"nodeType": "YulFunctionCall",
"src": "428:53:2"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "418:6:2"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "501:118:2",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "516:16:2",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "530:2:2",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "520:6:2",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "546:63:2",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "581:9:2"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "592:6:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "577:3:2"
},
"nodeType": "YulFunctionCall",
"src": "577:22:2"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "601:7:2"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "556:20:2"
},
"nodeType": "YulFunctionCall",
"src": "556:53:2"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "546:6:2"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "197:9:2",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "208:7:2",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "220:6:2",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "228:6:2",
"type": ""
}
],
"src": "152:474:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "724:272:2",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "734:53:2",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "781:5:2"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "748:32:2"
},
"nodeType": "YulFunctionCall",
"src": "748:39:2"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "738:6:2",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "796:78:2",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "862:3:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "867:6:2"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "803:58:2"
},
"nodeType": "YulFunctionCall",
"src": "803:71:2"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "796:3:2"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "909:5:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "916:4:2",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "905:3:2"
},
"nodeType": "YulFunctionCall",
"src": "905:16:2"
},
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "923:3:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "928:6:2"
}
],
"functionName": {
"name": "copy_memory_to_memory",
"nodeType": "YulIdentifier",
"src": "883:21:2"
},
"nodeType": "YulFunctionCall",
"src": "883:52:2"
},
"nodeType": "YulExpressionStatement",
"src": "883:52:2"
},
{
"nodeType": "YulAssignment",
"src": "944:46:2",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "955:3:2"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "982:6:2"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "960:21:2"
},
"nodeType": "YulFunctionCall",
"src": "960:29:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "951:3:2"
},
"nodeType": "YulFunctionCall",
"src": "951:39:2"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "944:3:2"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "705:5:2",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "712:3:2",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "720:3:2",
"type": ""
}
],
"src": "632:364:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1120:195:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1130:26:2",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1142:9:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1153:2:2",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1138:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1138:18:2"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1130:4:2"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1177:9:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1188:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1173:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1173:17:2"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1196:4:2"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1202:9:2"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1192:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1192:20:2"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1166:6:2"
},
"nodeType": "YulFunctionCall",
"src": "1166:47:2"
},
"nodeType": "YulExpressionStatement",
"src": "1166:47:2"
},
{
"nodeType": "YulAssignment",
"src": "1222:86:2",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1294:6:2"
},
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1303:4:2"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1230:63:2"
},
"nodeType": "YulFunctionCall",
"src": "1230:78:2"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1222:4:2"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1092:9:2",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1104:6:2",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1115:4:2",
"type": ""
}
],
"src": "1002:313:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1361:35:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1371:19:2",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1387:2:2",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1381:5:2"
},
"nodeType": "YulFunctionCall",
"src": "1381:9:2"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "1371:6:2"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "1354:6:2",
"type": ""
}
],
"src": "1321:75:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1461:40:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1472:22:2",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1488:5:2"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1482:5:2"
},
"nodeType": "YulFunctionCall",
"src": "1482:12:2"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1472:6:2"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1444:5:2",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1454:6:2",
"type": ""
}
],
"src": "1402:99:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1603:73:2",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1620:3:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1625:6:2"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1613:6:2"
},
"nodeType": "YulFunctionCall",
"src": "1613:19:2"
},
"nodeType": "YulExpressionStatement",
"src": "1613:19:2"
},
{
"nodeType": "YulAssignment",
"src": "1641:29:2",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1660:3:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1665:4:2",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1656:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1656:14:2"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "1641:11:2"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1575:3:2",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1580:6:2",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "1591:11:2",
"type": ""
}
],
"src": "1507:169:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1727:32:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1737:16:2",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "1748:5:2"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1737:7:2"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1709:5:2",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1719:7:2",
"type": ""
}
],
"src": "1682:77:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1814:258:2",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1824:10:2",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1833:1:2",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "1828:1:2",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1893:63:2",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1918:3:2"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1923:1:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1914:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1914:11:2"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1937:3:2"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1942:1:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1933:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1933:11:2"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1927:5:2"
},
"nodeType": "YulFunctionCall",
"src": "1927:18:2"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1907:6:2"
},
"nodeType": "YulFunctionCall",
"src": "1907:39:2"
},
"nodeType": "YulExpressionStatement",
"src": "1907:39:2"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1854:1:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1857:6:2"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "1851:2:2"
},
"nodeType": "YulFunctionCall",
"src": "1851:13:2"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "1865:19:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1867:15:2",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1876:1:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1879:2:2",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1872:3:2"
},
"nodeType": "YulFunctionCall",
"src": "1872:10:2"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1867:1:2"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "1847:3:2",
"statements": []
},
"src": "1843:113:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1990:76:2",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "2040:3:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2045:6:2"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2036:3:2"
},
"nodeType": "YulFunctionCall",
"src": "2036:16:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2054:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2029:6:2"
},
"nodeType": "YulFunctionCall",
"src": "2029:27:2"
},
"nodeType": "YulExpressionStatement",
"src": "2029:27:2"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1971:1:2"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1974:6:2"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "1968:2:2"
},
"nodeType": "YulFunctionCall",
"src": "1968:13:2"
},
"nodeType": "YulIf",
"src": "1965:101:2"
}
]
},
"name": "copy_memory_to_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "1796:3:2",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "1801:3:2",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1806:6:2",
"type": ""
}
],
"src": "1765:307:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2167:28:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2184:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2187:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2177:6:2"
},
"nodeType": "YulFunctionCall",
"src": "2177:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "2177:12:2"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "2078:117:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2290:28:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2307:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2310:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2300:6:2"
},
"nodeType": "YulFunctionCall",
"src": "2300:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "2300:12:2"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "2201:117:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2372:54:2",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2382:38:2",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2400:5:2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2407:2:2",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2396:3:2"
},
"nodeType": "YulFunctionCall",
"src": "2396:14:2"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2416:2:2",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "2412:3:2"
},
"nodeType": "YulFunctionCall",
"src": "2412:7:2"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2392:3:2"
},
"nodeType": "YulFunctionCall",
"src": "2392:28:2"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "2382:6:2"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2355:5:2",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "2365:6:2",
"type": ""
}
],
"src": "2324:102:2"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2475:79:2",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2532:16:2",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2541:1:2",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2544:1:2",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2534:6:2"
},
"nodeType": "YulFunctionCall",
"src": "2534:12:2"
},
"nodeType": "YulExpressionStatement",
"src": "2534:12:2"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2498:5:2"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2523:5:2"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "2505:17:2"
},
"nodeType": "YulFunctionCall",
"src": "2505:24:2"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "2495:2:2"
},
"nodeType": "YulFunctionCall",
"src": "2495:35:2"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2488:6:2"
},
"nodeType": "YulFunctionCall",
"src": "2488:43:2"
},
"nodeType": "YulIf",
"src": "2485:63:2"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2468:5:2",
"type": ""
}
],
"src": "2432:122:2"
}
]
},
"contents": "{\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256t_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 2,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063487a239514610030575b600080fd5b61004a60048036038101906100459190610165565b61004c565b005b61008a6040518060400160405280600781526020017f776861646475700000000000000000000000000000000000000000000000000081525061008e565b5050565b610124816040516024016100a291906101de565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610127565b50565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008135905061015f8161026f565b92915050565b6000806040838503121561017c5761017b610259565b5b600061018a85828601610150565b925050602061019b85828601610150565b9150509250929050565b60006101b082610200565b6101ba818561020b565b93506101ca818560208601610226565b6101d38161025e565b840191505092915050565b600060208201905081810360008301526101f881846101a5565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b83811015610244578082015181840152602081019050610229565b83811115610253576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b6102788161021c565b811461028357600080fd5b5056fea2646970667358221220be3af85cd892b0d8175bb8088a435d0b92bc4b717afed68036b952d3e0b9adf364736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x487A2395 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x165 JUMP JUMPDEST PUSH2 0x4C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7768616464757000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH2 0x8E JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x124 DUP2 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0x1DE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH32 0x41304FAC00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH2 0x127 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH1 0x0 PUSH11 0x636F6E736F6C652E6C6F67 SWAP1 POP PUSH1 0x20 DUP4 ADD PUSH1 0x0 DUP1 DUP5 DUP4 DUP6 GAS STATICCALL POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x15F DUP2 PUSH2 0x26F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x17C JUMPI PUSH2 0x17B PUSH2 0x259 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x18A DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x19B DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B0 DUP3 PUSH2 0x200 JUMP JUMPDEST PUSH2 0x1BA DUP2 DUP6 PUSH2 0x20B JUMP JUMPDEST SWAP4 POP PUSH2 0x1CA DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x226 JUMP JUMPDEST PUSH2 0x1D3 DUP2 PUSH2 0x25E JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1F8 DUP2 DUP5 PUSH2 0x1A5 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x244 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x229 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x253 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x278 DUP2 PUSH2 0x21C JUMP JUMPDEST DUP2 EQ PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBE GASPRICE 0xF8 0x5C 0xD8 SWAP3 0xB0 0xD8 OR JUMPDEST 0xB8 ADDMOD DUP11 NUMBER 0x5D SIGNEXTEND SWAP3 0xBC 0x4B PUSH18 0x7AFED68036B952D3E0B9ADF364736F6C6343 STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "171:378:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444:102;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;517:22;;;;;;;;;;;;;;;;;;:11;:22::i;:::-;444:102;;:::o;5054:112:1:-;5103:59;5158:2;5119:42;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5103:15;:59::i;:::-;5054:112;:::o;176:288::-;240:21;264:7;:14;240:38;;282:22;129:42;282:40;;373:2;364:7;360:16;455:1;452;437:13;423:12;407:14;400:5;389:68;335:126;;;;176:288;:::o;7:139:2:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;7:139;;;;:::o;152:474::-;220:6;228;277:2;265:9;256:7;252:23;248:32;245:119;;;283:79;;:::i;:::-;245:119;403:1;428:53;473:7;464:6;453:9;449:22;428:53;:::i;:::-;418:63;;374:117;530:2;556:53;601:7;592:6;581:9;577:22;556:53;:::i;:::-;546:63;;501:118;152:474;;;;;:::o;632:364::-;720:3;748:39;781:5;748:39;:::i;:::-;803:71;867:6;862:3;803:71;:::i;:::-;796:78;;883:52;928:6;923:3;916:4;909:5;905:16;883:52;:::i;:::-;960:29;982:6;960:29;:::i;:::-;955:3;951:39;944:46;;724:272;632:364;;;;:::o;1002:313::-;1115:4;1153:2;1142:9;1138:18;1130:26;;1202:9;1196:4;1192:20;1188:1;1177:9;1173:17;1166:47;1230:78;1303:4;1294:6;1230:78;:::i;:::-;1222:86;;1002:313;;;;:::o;1402:99::-;1454:6;1488:5;1482:12;1472:22;;1402:99;;;:::o;1507:169::-;1591:11;1625:6;1620:3;1613:19;1665:4;1660:3;1656:14;1641:29;;1507:169;;;;:::o;1682:77::-;1719:7;1748:5;1737:16;;1682:77;;;:::o;1765:307::-;1833:1;1843:113;1857:6;1854:1;1851:13;1843:113;;;1942:1;1937:3;1933:11;1927:18;1923:1;1918:3;1914:11;1907:39;1879:2;1876:1;1872:10;1867:15;;1843:113;;;1974:6;1971:1;1968:13;1965:101;;;2054:1;2045:6;2040:3;2036:16;2029:27;1965:101;1814:258;1765:307;;;:::o;2201:117::-;2310:1;2307;2300:12;2324:102;2365:6;2416:2;2412:7;2407:2;2400:5;2396:14;2392:28;2382:38;;2324:102;;;:::o;2432:122::-;2505:24;2523:5;2505:24;:::i;:::-;2498:5;2495:35;2485:63;;2544:1;2541;2534:12;2485:63;2432:122;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "140000",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"price(uint256,uint256)": "infinite"
}
},
"methodIdentifiers": {
"price(uint256,uint256)": "487a2395"
}
},
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_decimals",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "startingPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "daysPast",
"type": "uint256"
}
],
"name": "price",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_decimals",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "startingPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "daysPast",
"type": "uint256"
}
],
"name": "price",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"price(uint256,uint256)": {
"details": "Store value in variable",
"params": {
"daysPast": "timePast",
"startingPrice": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/ExponentialPriceReduction.sol": "ExponentialPriceReduction"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/ExponentialPriceReduction.sol": {
"keccak256": "0x2b70b18c3bbf77d3032768b980598fff9441497e725dd84c09cfad7643847ea3",
"license": "GPL-3.0",
"urls": [
"bzz-raw://f6060d201404cfdb4b89d9b2bc12377ff2bef4c74ea16f4b6b9edab324133584",
"dweb:/ipfs/QmRUkFXgZ7EZzypynz5heV6hHxLMyiS5w1pvVhqeC4CAV1"
]
},
"hardhat/console.sol": {
"keccak256": "0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4",
"license": "MIT",
"urls": [
"bzz-raw://a8cb8681076e765c214e0d51cac989325f6b98e315eaae06ee0cbd5a9f084763",
"dweb:/ipfs/QmNWGHi4zmjxQTYN3NMGnJd49jBT5dE4bxTdWEaDuJrC6N"
]
}
},
"version": 1
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "hardhat/console.sol";
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract ExponentialPriceReduction {
uint256 immutable decimals;
constructor(uint256 _decimals){
decimals = _decimals;
}
/**
* @dev Store value in variable
* @param startingPrice value to store
* @param daysPast timePast
*/
function price(uint256 startingPrice, uint256 daysPast) public {
console.log("whaddup");
}
}
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithEthers script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
// 'web3Provider' is a remix global variable object
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer);
let contract = await factory.deploy(...constructorArgs);
console.log('Contract Address: ', contract.address);
// The contract is NOT deployed yet; we must wait until it is mined
await contract.deployed()
console.log('Deployment successful.')
} catch (e) {
console.log(e.message)
}
})()
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithWeb3 script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
const accounts = await web3.eth.getAccounts()
let contract = new web3.eth.Contract(metadata.abi)
contract = contract.deploy({
data: metadata.data.bytecode.object,
arguments: constructorArgs
})
const newContractInstance = await contract.send({
from: accounts[0],
gas: 1500000,
gasPrice: '30000000000'
})
console.log('Contract deployed at address: ', newContractInstance.options.address)
} catch (e) {
console.log(e.message)
}
})()
{
"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": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506105c6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637fea0d4b1461003b578063ed2bee1014610045575b600080fd5b61004361004f565b005b61004d6100c5565b005b600360405161005d90610156565b61006791906101b9565b604051809103906000f080158015610083573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663487a2395600160026040518363ffffffff1660e01b8152600401610122929190610190565b600060405180830381600087803b15801561013c57600080fd5b505af1158015610150573d6000803e3d6000fd5b50505050565b61037c8061021583390190565b61016c816101de565b82525050565b61017b816101f0565b82525050565b61018a81610202565b82525050565b60006040820190506101a56000830185610163565b6101b26020830184610172565b9392505050565b60006020820190506101ce6000830184610181565b92915050565b6000819050919050565b60006101e9826101d4565b9050919050565b60006101fb826101d4565b9050919050565b600061020d826101d4565b905091905056fe60a060405234801561001057600080fd5b5060405161037c38038061037c83398181016040528101906100329190610055565b8060808181525050506100a8565b60008151905061004f81610091565b92915050565b60006020828403121561006b5761006a61008c565b5b600061007984828501610040565b91505092915050565b6000819050919050565b600080fd5b61009a81610082565b81146100a557600080fd5b50565b6080516102bc6100c0600039600050506102bc6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063487a239514610030575b600080fd5b61004a60048036038101906100459190610165565b61004c565b005b61008a6040518060400160405280600581526020017f707269636500000000000000000000000000000000000000000000000000000081525061008e565b5050565b610124816040516024016100a291906101de565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610127565b50565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008135905061015f8161026f565b92915050565b6000806040838503121561017c5761017b610259565b5b600061018a85828601610150565b925050602061019b85828601610150565b9150509250929050565b60006101b082610200565b6101ba818561020b565b93506101ca818560208601610226565b6101d38161025e565b840191505092915050565b600060208201905081810360008301526101f881846101a5565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b83811015610244578082015181840152602081019050610229565b83811115610253576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b6102788161021c565b811461028357600080fd5b5056fea2646970667358221220e0e36d49ea4cdf48fe57f62b41a3e13e24547d151c6e74633d4fb81e1437a5b264736f6c63430008070033a264697066735822122065ab02842d38589e63e35785bce37f35360c2aba0841354eca49e57c0fdb4b6764736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5C6 DUP1 PUSH2 0x20 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7FEA0D4B EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xED2BEE10 EQ PUSH2 0x45 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x4F JUMP JUMPDEST STOP JUMPDEST PUSH2 0x4D PUSH2 0xC5 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x3 PUSH1 0x40 MLOAD PUSH2 0x5D SWAP1 PUSH2 0x156 JUMP JUMPDEST PUSH2 0x67 SWAP2 SWAP1 PUSH2 0x1B9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x83 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x487A2395 PUSH1 0x1 PUSH1 0x2 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x122 SWAP3 SWAP2 SWAP1 PUSH2 0x190 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x13C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x150 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0x37C DUP1 PUSH2 0x215 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH2 0x16C DUP2 PUSH2 0x1DE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x17B DUP2 PUSH2 0x1F0 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x18A DUP2 PUSH2 0x202 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x1A5 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x163 JUMP JUMPDEST PUSH2 0x1B2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x172 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x1CE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x181 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E9 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1FB DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20D DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x37C CODESIZE SUB DUP1 PUSH2 0x37C DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0x55 JUMP JUMPDEST DUP1 PUSH1 0x80 DUP2 DUP2 MSTORE POP POP POP PUSH2 0xA8 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x4F DUP2 PUSH2 0x91 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6B JUMPI PUSH2 0x6A PUSH2 0x8C JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x79 DUP5 DUP3 DUP6 ADD PUSH2 0x40 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x9A DUP2 PUSH2 0x82 JUMP JUMPDEST DUP2 EQ PUSH2 0xA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x2BC PUSH2 0xC0 PUSH1 0x0 CODECOPY PUSH1 0x0 POP POP PUSH2 0x2BC 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 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x487A2395 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x165 JUMP JUMPDEST PUSH2 0x4C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7072696365000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH2 0x8E JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x124 DUP2 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0x1DE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH32 0x41304FAC00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH2 0x127 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH1 0x0 PUSH11 0x636F6E736F6C652E6C6F67 SWAP1 POP PUSH1 0x20 DUP4 ADD PUSH1 0x0 DUP1 DUP5 DUP4 DUP6 GAS STATICCALL POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x15F DUP2 PUSH2 0x26F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x17C JUMPI PUSH2 0x17B PUSH2 0x259 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x18A DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x19B DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B0 DUP3 PUSH2 0x200 JUMP JUMPDEST PUSH2 0x1BA DUP2 DUP6 PUSH2 0x20B JUMP JUMPDEST SWAP4 POP PUSH2 0x1CA DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x226 JUMP JUMPDEST PUSH2 0x1D3 DUP2 PUSH2 0x25E JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1F8 DUP2 DUP5 PUSH2 0x1A5 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x244 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x229 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x253 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x278 DUP2 PUSH2 0x21C JUMP JUMPDEST DUP2 EQ PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE0 0xE3 PUSH14 0x49EA4CDF48FE57F62B41A3E13E24 SLOAD PUSH30 0x151C6E74633D4FB81E1437A5B264736F6C63430008070033A26469706673 PC 0x22 SLT KECCAK256 PUSH6 0xAB02842D3858 SWAP15 PUSH4 0xE35785BC 0xE3 PUSH32 0x35360C2ABA0841354ECA49E57C0FDB4B6764736F6C6343000807003300000000 ",
"sourceMap": "200:457:3:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@beforeAll_8865": {
"entryPoint": 79,
"id": 8865,
"parameterSlots": 0,
"returnSlots": 0
},
"@checkWinningProposal_8876": {
"entryPoint": 197,
"id": 8876,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_encode_t_rational_1_by_1_to_t_uint256_fromStack": {
"entryPoint": 355,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_rational_2_by_1_to_t_uint256_fromStack": {
"entryPoint": 370,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_rational_3_by_1_to_t_uint256_fromStack": {
"entryPoint": 385,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_rational_1_by_1_t_rational_2_by_1__to_t_uint256_t_uint256__fromStack_reversed": {
"entryPoint": 400,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_encode_tuple_t_rational_3_by_1__to_t_uint256__fromStack_reversed": {
"entryPoint": 441,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 468,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"convert_t_rational_1_by_1_to_t_uint256": {
"entryPoint": 478,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"convert_t_rational_2_by_1_to_t_uint256": {
"entryPoint": 496,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"convert_t_rational_3_by_1_to_t_uint256": {
"entryPoint": 514,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1541:4",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "80:74:4",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "97:3:4"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "141:5:4"
}
],
"functionName": {
"name": "convert_t_rational_1_by_1_to_t_uint256",
"nodeType": "YulIdentifier",
"src": "102:38:4"
},
"nodeType": "YulFunctionCall",
"src": "102:45:4"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "90:6:4"
},
"nodeType": "YulFunctionCall",
"src": "90:58:4"
},
"nodeType": "YulExpressionStatement",
"src": "90:58:4"
}
]
},
"name": "abi_encode_t_rational_1_by_1_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "68:5:4",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "75:3:4",
"type": ""
}
],
"src": "7:147:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "233:74:4",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "250:3:4"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "294:5:4"
}
],
"functionName": {
"name": "convert_t_rational_2_by_1_to_t_uint256",
"nodeType": "YulIdentifier",
"src": "255:38:4"
},
"nodeType": "YulFunctionCall",
"src": "255:45:4"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "243:6:4"
},
"nodeType": "YulFunctionCall",
"src": "243:58:4"
},
"nodeType": "YulExpressionStatement",
"src": "243:58:4"
}
]
},
"name": "abi_encode_t_rational_2_by_1_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "221:5:4",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "228:3:4",
"type": ""
}
],
"src": "160:147:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "386:74:4",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "403:3:4"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "447:5:4"
}
],
"functionName": {
"name": "convert_t_rational_3_by_1_to_t_uint256",
"nodeType": "YulIdentifier",
"src": "408:38:4"
},
"nodeType": "YulFunctionCall",
"src": "408:45:4"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "396:6:4"
},
"nodeType": "YulFunctionCall",
"src": "396:58:4"
},
"nodeType": "YulExpressionStatement",
"src": "396:58:4"
}
]
},
"name": "abi_encode_t_rational_3_by_1_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "374:5:4",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "381:3:4",
"type": ""
}
],
"src": "313:147:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "608:222:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "618:26:4",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "630:9:4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "641:2:4",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "626:3:4"
},
"nodeType": "YulFunctionCall",
"src": "626:18:4"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "618:4:4"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "706:6:4"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "719:9:4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "730:1:4",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "715:3:4"
},
"nodeType": "YulFunctionCall",
"src": "715:17:4"
}
],
"functionName": {
"name": "abi_encode_t_rational_1_by_1_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "654:51:4"
},
"nodeType": "YulFunctionCall",
"src": "654:79:4"
},
"nodeType": "YulExpressionStatement",
"src": "654:79:4"
},
{
"expression": {
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "795:6:4"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "808:9:4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "819:2:4",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "804:3:4"
},
"nodeType": "YulFunctionCall",
"src": "804:18:4"
}
],
"functionName": {
"name": "abi_encode_t_rational_2_by_1_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "743:51:4"
},
"nodeType": "YulFunctionCall",
"src": "743:80:4"
},
"nodeType": "YulExpressionStatement",
"src": "743:80:4"
}
]
},
"name": "abi_encode_tuple_t_rational_1_by_1_t_rational_2_by_1__to_t_uint256_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "572:9:4",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "584:6:4",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "592:6:4",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "603:4:4",
"type": ""
}
],
"src": "466:364:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "942:132:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "952:26:4",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "964:9:4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "975:2:4",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "960:3:4"
},
"nodeType": "YulFunctionCall",
"src": "960:18:4"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "952:4:4"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1040:6:4"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1053:9:4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1064:1:4",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1049:3:4"
},
"nodeType": "YulFunctionCall",
"src": "1049:17:4"
}
],
"functionName": {
"name": "abi_encode_t_rational_3_by_1_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "988:51:4"
},
"nodeType": "YulFunctionCall",
"src": "988:79:4"
},
"nodeType": "YulExpressionStatement",
"src": "988:79:4"
}
]
},
"name": "abi_encode_tuple_t_rational_3_by_1__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "914:9:4",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "926:6:4",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "937:4:4",
"type": ""
}
],
"src": "836:238:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1125:32:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1135:16:4",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "1146:5:4"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1135:7:4"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1107:5:4",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1117:7:4",
"type": ""
}
],
"src": "1080:77:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1231:53:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1241:37:4",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1272:5:4"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1254:17:4"
},
"nodeType": "YulFunctionCall",
"src": "1254:24:4"
},
"variableNames": [
{
"name": "converted",
"nodeType": "YulIdentifier",
"src": "1241:9:4"
}
]
}
]
},
"name": "convert_t_rational_1_by_1_to_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1211:5:4",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nodeType": "YulTypedName",
"src": "1221:9:4",
"type": ""
}
],
"src": "1163:121:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1358:53:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1368:37:4",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1399:5:4"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1381:17:4"
},
"nodeType": "YulFunctionCall",
"src": "1381:24:4"
},
"variableNames": [
{
"name": "converted",
"nodeType": "YulIdentifier",
"src": "1368:9:4"
}
]
}
]
},
"name": "convert_t_rational_2_by_1_to_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1338:5:4",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nodeType": "YulTypedName",
"src": "1348:9:4",
"type": ""
}
],
"src": "1290:121:4"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1485:53:4",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1495:37:4",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1526:5:4"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1508:17:4"
},
"nodeType": "YulFunctionCall",
"src": "1508:24:4"
},
"variableNames": [
{
"name": "converted",
"nodeType": "YulIdentifier",
"src": "1495:9:4"
}
]
}
]
},
"name": "convert_t_rational_3_by_1_to_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1465:5:4",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nodeType": "YulTypedName",
"src": "1475:9:4",
"type": ""
}
],
"src": "1417:121:4"
}
]
},
"contents": "{\n\n function abi_encode_t_rational_1_by_1_to_t_uint256_fromStack(value, pos) {\n mstore(pos, convert_t_rational_1_by_1_to_t_uint256(value))\n }\n\n function abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value, pos) {\n mstore(pos, convert_t_rational_2_by_1_to_t_uint256(value))\n }\n\n function abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value, pos) {\n mstore(pos, convert_t_rational_3_by_1_to_t_uint256(value))\n }\n\n function abi_encode_tuple_t_rational_1_by_1_t_rational_2_by_1__to_t_uint256_t_uint256__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_rational_1_by_1_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_rational_2_by_1_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n }\n\n function abi_encode_tuple_t_rational_3_by_1__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_rational_3_by_1_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function convert_t_rational_1_by_1_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(value)\n }\n\n function convert_t_rational_2_by_1_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(value)\n }\n\n function convert_t_rational_3_by_1_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(value)\n }\n\n}\n",
"id": 4,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80637fea0d4b1461003b578063ed2bee1014610045575b600080fd5b61004361004f565b005b61004d6100c5565b005b600360405161005d90610156565b61006791906101b9565b604051809103906000f080158015610083573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663487a2395600160026040518363ffffffff1660e01b8152600401610122929190610190565b600060405180830381600087803b15801561013c57600080fd5b505af1158015610150573d6000803e3d6000fd5b50505050565b61037c8061021583390190565b61016c816101de565b82525050565b61017b816101f0565b82525050565b61018a81610202565b82525050565b60006040820190506101a56000830185610163565b6101b26020830184610172565b9392505050565b60006020820190506101ce6000830184610181565b92915050565b6000819050919050565b60006101e9826101d4565b9050919050565b60006101fb826101d4565b9050919050565b600061020d826101d4565b905091905056fe60a060405234801561001057600080fd5b5060405161037c38038061037c83398181016040528101906100329190610055565b8060808181525050506100a8565b60008151905061004f81610091565b92915050565b60006020828403121561006b5761006a61008c565b5b600061007984828501610040565b91505092915050565b6000819050919050565b600080fd5b61009a81610082565b81146100a557600080fd5b50565b6080516102bc6100c0600039600050506102bc6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063487a239514610030575b600080fd5b61004a60048036038101906100459190610165565b61004c565b005b61008a6040518060400160405280600581526020017f707269636500000000000000000000000000000000000000000000000000000081525061008e565b5050565b610124816040516024016100a291906101de565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610127565b50565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008135905061015f8161026f565b92915050565b6000806040838503121561017c5761017b610259565b5b600061018a85828601610150565b925050602061019b85828601610150565b9150509250929050565b60006101b082610200565b6101ba818561020b565b93506101ca818560208601610226565b6101d38161025e565b840191505092915050565b600060208201905081810360008301526101f881846101a5565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b83811015610244578082015181840152602081019050610229565b83811115610253576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b6102788161021c565b811461028357600080fd5b5056fea2646970667358221220e0e36d49ea4cdf48fe57f62b41a3e13e24547d151c6e74633d4fb81e1437a5b264736f6c63430008070033a264697066735822122065ab02842d38589e63e35785bce37f35360c2aba0841354eca49e57c0fdb4b6764736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7FEA0D4B EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xED2BEE10 EQ PUSH2 0x45 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x4F JUMP JUMPDEST STOP JUMPDEST PUSH2 0x4D PUSH2 0xC5 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x3 PUSH1 0x40 MLOAD PUSH2 0x5D SWAP1 PUSH2 0x156 JUMP JUMPDEST PUSH2 0x67 SWAP2 SWAP1 PUSH2 0x1B9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x83 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x487A2395 PUSH1 0x1 PUSH1 0x2 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x122 SWAP3 SWAP2 SWAP1 PUSH2 0x190 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x13C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x150 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0x37C DUP1 PUSH2 0x215 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH2 0x16C DUP2 PUSH2 0x1DE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x17B DUP2 PUSH2 0x1F0 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x18A DUP2 PUSH2 0x202 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x1A5 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x163 JUMP JUMPDEST PUSH2 0x1B2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x172 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x1CE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x181 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E9 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1FB DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20D DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x37C CODESIZE SUB DUP1 PUSH2 0x37C DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0x55 JUMP JUMPDEST DUP1 PUSH1 0x80 DUP2 DUP2 MSTORE POP POP POP PUSH2 0xA8 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x4F DUP2 PUSH2 0x91 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6B JUMPI PUSH2 0x6A PUSH2 0x8C JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x79 DUP5 DUP3 DUP6 ADD PUSH2 0x40 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x9A DUP2 PUSH2 0x82 JUMP JUMPDEST DUP2 EQ PUSH2 0xA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x2BC PUSH2 0xC0 PUSH1 0x0 CODECOPY PUSH1 0x0 POP POP PUSH2 0x2BC 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 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x487A2395 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x165 JUMP JUMPDEST PUSH2 0x4C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8A PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x7072696365000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH2 0x8E JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x124 DUP2 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0x1DE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH32 0x41304FAC00000000000000000000000000000000000000000000000000000000 PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 DUP4 AND OR DUP4 MSTORE POP POP POP POP PUSH2 0x127 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH1 0x0 PUSH11 0x636F6E736F6C652E6C6F67 SWAP1 POP PUSH1 0x20 DUP4 ADD PUSH1 0x0 DUP1 DUP5 DUP4 DUP6 GAS STATICCALL POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x15F DUP2 PUSH2 0x26F JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x17C JUMPI PUSH2 0x17B PUSH2 0x259 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x18A DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x19B DUP6 DUP3 DUP7 ADD PUSH2 0x150 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B0 DUP3 PUSH2 0x200 JUMP JUMPDEST PUSH2 0x1BA DUP2 DUP6 PUSH2 0x20B JUMP JUMPDEST SWAP4 POP PUSH2 0x1CA DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x226 JUMP JUMPDEST PUSH2 0x1D3 DUP2 PUSH2 0x25E JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1F8 DUP2 DUP5 PUSH2 0x1A5 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x244 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x229 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x253 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x278 DUP2 PUSH2 0x21C JUMP JUMPDEST DUP2 EQ PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE0 0xE3 PUSH14 0x49EA4CDF48FE57F62B41A3E13E24 SLOAD PUSH30 0x151C6E74633D4FB81E1437A5B264736F6C63430008070033A26469706673 PC 0x22 SLT KECCAK256 PUSH6 0xAB02842D3858 SWAP15 PUSH4 0xE35785BC 0xE3 PUSH32 0x35360C2ABA0841354ECA49E57C0FDB4B6764736F6C6343000807003300000000 ",
"sourceMap": "200:457:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;293:106;;;:::i;:::-;;409:94;;;:::i;:::-;;293:106;390:1;360:32;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;332:25;;:60;;;;;;;;;;;;;;;;;;293:106::o;409:94::-;459:25;;;;;;;;;;:31;;;491:1;494;459:37;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;409:94::o;-1:-1:-1:-;;;;;;;;:::o;7:147:4:-;102:45;141:5;102:45;:::i;:::-;97:3;90:58;7:147;;:::o;160:::-;255:45;294:5;255:45;:::i;:::-;250:3;243:58;160:147;;:::o;313:::-;408:45;447:5;408:45;:::i;:::-;403:3;396:58;313:147;;:::o;466:364::-;603:4;641:2;630:9;626:18;618:26;;654:79;730:1;719:9;715:17;706:6;654:79;:::i;:::-;743:80;819:2;808:9;804:18;795:6;743:80;:::i;:::-;466:364;;;;;:::o;836:238::-;937:4;975:2;964:9;960:18;952:26;;988:79;1064:1;1053:9;1049:17;1040:6;988:79;:::i;:::-;836:238;;;;:::o;1080:77::-;1117:7;1146:5;1135:16;;1080:77;;;:::o;1163:121::-;1221:9;1254:24;1272:5;1254:24;:::i;:::-;1241:37;;1163:121;;;:::o;1290:::-;1348:9;1381:24;1399:5;1381:24;:::i;:::-;1368:37;;1290:121;;;:::o;1417:::-;1475:9;1508:24;1526:5;1508:24;:::i;:::-;1495:37;;1417:121;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "295600",
"executionCost": "337",
"totalCost": "295937"
},
"external": {
"beforeAll()": "infinite",
"checkWinningProposal()": "infinite"
}
},
"methodIdentifiers": {
"beforeAll()": "7fea0d4b",
"checkWinningProposal()": "ed2bee10"
}
},
"abi": [
{
"inputs": [],
"name": "beforeAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "checkWinningProposal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "beforeAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "checkWinningProposal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"tests/ExponentialPriceReduction_test.sol": "ExponentialTest"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/ExponentialPriceReduction.sol": {
"keccak256": "0x5135e34148766e8f5eca7749770dfffb7e2b708f4918a0a082949aca304d2ca4",
"license": "GPL-3.0",
"urls": [
"bzz-raw://54723659d07f264c2112cdffd1e6b7d70b87220831af21541d81bc7ed00a6737",
"dweb:/ipfs/QmYaupZV2iXVHV3w1RapHhoLZd3TQz1WddtTc7F6nKgdyT"
]
},
"hardhat/console.sol": {
"keccak256": "0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4",
"license": "MIT",
"urls": [
"bzz-raw://a8cb8681076e765c214e0d51cac989325f6b98e315eaae06ee0cbd5a9f084763",
"dweb:/ipfs/QmNWGHi4zmjxQTYN3NMGnJd49jBT5dE4bxTdWEaDuJrC6N"
]
},
"remix_tests.sol": {
"keccak256": "0xe2783cdc204cba8c72494119339f1d90f9022b15d6c718c668b7f097d8e29787",
"license": "GPL-3.0",
"urls": [
"bzz-raw://bb6a22e64c7f16bcaab63b1c1a1b269d5be8a6d37bdd9dec1718477ab916b18e",
"dweb:/ipfs/QmdkW1tT5iadBvaHMCoskhDGZKnfdg8o1D9CcoQYtdJet7"
]
},
"tests/ExponentialPriceReduction_test.sol": {
"keccak256": "0x2443459fb2655001eb0a4fce35d9a0af8d10592c30b7ae08916be3e17df9a210",
"license": "GPL-3.0",
"urls": [
"bzz-raw://d9bfa9c93b521816122947a8b957fae1a19e67a6009e19460656a87d8bb5aa8a",
"dweb:/ipfs/QmWD3UXevkvCSp92wxixCgEqddmaJY2qREsvXoAB69ncvY"
]
}
},
"version": 1
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/ExponentialPriceReduction.sol";
contract ExponentialTest {
ExponentialPriceReduction exponentialPriceReduction;
function beforeAll () public {
exponentialPriceReduction = new ExponentialPriceReduction(3);
}
function checkWinningProposal () public {
exponentialPriceReduction.price(1, 2);
}
// function checkWinninProposalWithReturnValue () public view returns (bool) {
// return ballotToTest.winningProposal() == 0;
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment