Skip to content

Instantly share code, notes, and snippets.

@ncoquelet
Created October 9, 2023 10:37
Show Gist options
  • Save ncoquelet/99a1383e7b424b4bcd1ecf13e5c0f1bc to your computer and use it in GitHub Desktop.
Save ncoquelet/99a1383e7b424b4bcd1ecf13e5c0f1bc 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.21+commit.d9974bed.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS =
0x000000000000000000636F6e736F6c652e6c6f67;
function _sendLogPayloadImplementation(bytes memory payload) internal view {
address consoleAddress = CONSOLE_ADDRESS;
/// @solidity memory-safe-assembly
assembly {
pop(
staticcall(
gas(),
consoleAddress,
add(payload, 32),
mload(payload),
0,
0
)
)
}
}
function _castToPure(
function(bytes memory) internal view fnIn
) internal pure returns (function(bytes memory) pure fnOut) {
assembly {
fnOut := fnIn
}
}
function _sendLogPayload(bytes memory payload) internal pure {
_castToPure(_sendLogPayloadImplementation)(payload);
}
function log() internal pure {
_sendLogPayload(abi.encodeWithSignature("log()"));
}
function logInt(int256 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
}
function logUint(uint256 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
}
function logString(string memory p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function logBool(bool p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function logAddress(address p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function logBytes(bytes memory p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
}
function logBytes1(bytes1 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
}
function logBytes2(bytes2 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
}
function logBytes3(bytes3 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
}
function logBytes4(bytes4 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
}
function logBytes5(bytes5 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
}
function logBytes6(bytes6 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
}
function logBytes7(bytes7 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
}
function logBytes8(bytes8 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
}
function logBytes9(bytes9 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
}
function logBytes10(bytes10 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
}
function logBytes11(bytes11 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
}
function logBytes12(bytes12 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
}
function logBytes13(bytes13 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
}
function logBytes14(bytes14 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
}
function logBytes15(bytes15 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
}
function logBytes16(bytes16 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
}
function logBytes17(bytes17 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
}
function logBytes18(bytes18 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
}
function logBytes19(bytes19 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
}
function logBytes20(bytes20 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
}
function logBytes21(bytes21 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
}
function logBytes22(bytes22 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
}
function logBytes23(bytes23 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
}
function logBytes24(bytes24 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
}
function logBytes25(bytes25 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
}
function logBytes26(bytes26 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
}
function logBytes27(bytes27 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
}
function logBytes28(bytes28 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
}
function logBytes29(bytes29 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
}
function logBytes30(bytes30 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
}
function logBytes31(bytes31 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
}
function logBytes32(bytes32 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
}
function log(uint256 p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
}
function log(string memory p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function log(bool p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function log(address p0) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function log(uint256 p0, uint256 p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1));
}
function log(uint256 p0, string memory p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1));
}
function log(uint256 p0, bool p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1));
}
function log(uint256 p0, address p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1));
}
function log(string memory p0, uint256 p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
}
function log(string memory p0, string memory p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
}
function log(string memory p0, bool p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
}
function log(string memory p0, address p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
}
function log(bool p0, uint256 p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1));
}
function log(bool p0, string memory p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
}
function log(bool p0, bool p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
}
function log(bool p0, address p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
}
function log(address p0, uint256 p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1));
}
function log(address p0, string memory p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
}
function log(address p0, bool p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
}
function log(address p0, address p1) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
}
function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2));
}
function log(uint256 p0, string memory p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2));
}
function log(uint256 p0, bool p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2));
}
function log(uint256 p0, bool p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2));
}
function log(uint256 p0, bool p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2));
}
function log(uint256 p0, bool p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2));
}
function log(uint256 p0, address p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2));
}
function log(uint256 p0, address p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2));
}
function log(uint256 p0, address p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2));
}
function log(uint256 p0, address p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2));
}
function log(string memory p0, uint256 p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2));
}
function log(string memory p0, string memory p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2));
}
function log(string memory p0, string memory p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
}
function log(string memory p0, string memory p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
}
function log(string memory p0, string memory p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
}
function log(string memory p0, bool p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2));
}
function log(string memory p0, bool p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
}
function log(string memory p0, bool p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
}
function log(string memory p0, bool p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
}
function log(string memory p0, address p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2));
}
function log(string memory p0, address p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
}
function log(string memory p0, address p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
}
function log(string memory p0, address p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
}
function log(bool p0, uint256 p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2));
}
function log(bool p0, uint256 p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2));
}
function log(bool p0, uint256 p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2));
}
function log(bool p0, uint256 p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2));
}
function log(bool p0, string memory p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2));
}
function log(bool p0, string memory p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
}
function log(bool p0, string memory p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
}
function log(bool p0, string memory p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
}
function log(bool p0, bool p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2));
}
function log(bool p0, bool p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
}
function log(bool p0, bool p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
}
function log(bool p0, bool p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
}
function log(bool p0, address p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2));
}
function log(bool p0, address p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
}
function log(bool p0, address p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
}
function log(bool p0, address p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
}
function log(address p0, uint256 p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2));
}
function log(address p0, uint256 p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2));
}
function log(address p0, uint256 p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2));
}
function log(address p0, uint256 p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2));
}
function log(address p0, string memory p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2));
}
function log(address p0, string memory p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
}
function log(address p0, string memory p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
}
function log(address p0, string memory p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
}
function log(address p0, bool p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2));
}
function log(address p0, bool p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
}
function log(address p0, bool p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
}
function log(address p0, bool p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
}
function log(address p0, address p1, uint256 p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2));
}
function log(address p0, address p1, string memory p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
}
function log(address p0, address p1, bool p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
}
function log(address p0, address p1, address p2) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
}
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, string memory p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, bool p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3));
}
function log(uint256 p0, address p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint256 p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint256 p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3));
}
function log(address p0, uint256 p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {
_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 pure {
_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 pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint256 p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, address p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, uint256 p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, string memory p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, bool p3) internal pure {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, address p3) internal pure {
_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) {
return address(0);
}
}
// 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);
}
}
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.yml",
"options": {}
},
{
"files": "*.yaml",
"options": {}
},
{
"files": "*.toml",
"options": {}
},
{
"files": "*.json",
"options": {}
},
{
"files": "*.js",
"options": {}
},
{
"files": "*.ts",
"options": {}
}
]
}
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created with 'Default' template
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with increasing levels of complexity.
2. 'scripts': Contains four typescript files to deploy a contract. It is explained below.
3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract.
SCRIPTS
The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries.
For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly
in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts`
In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract.
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.
Please note, require/import is supported in a limited manner for Remix supported modules.
For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin.
For unsupported modules, an error like this will be thrown: '<module_name> module require is not supported by Remix IDE' will be shown.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract Storage {
uint256 data;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
data
= num;
}
/**
* @dev Return value
* @return value of 'data
'
*/
function retrieve() public view returns (uint256){
return data
;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "hardhat/console.sol";
/**
* @title Owner
* @dev Set & change owner
*/
contract Owner {
address private owner;
// event for EVM logging
event OwnerSet(address indexed oldOwner, address indexed newOwner);
// modifier to check if caller is owner
modifier isOwner() {
// If the first argument of 'require' evaluates to 'false', execution terminates and all
// changes to the state and to Ether balances are reverted.
// This used to consume all gas in old EVM versions, but not anymore.
// It is often a good idea to use 'require' to check if functions are called correctly.
// As a second argument, you can also provide an explanation about what went wrong.
require(msg.sender == owner, "Caller is not owner");
_;
}
/**
* @dev Set contract deployer as owner
*/
constructor() {
console.log("Owner contract deployed by:", msg.sender);
owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor
emit OwnerSet(address(0), owner);
}
/**
* @dev Change owner
* @param newOwner address of new owner
*/
function changeOwner(address newOwner) public isOwner {
emit OwnerSet(owner, newOwner);
owner = newOwner;
}
/**
* @dev Return owner address
* @return address of owner
*/
function getOwner() external view returns (address) {
return owner;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
*/
contract Ballot {
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted
address delegate; // person delegated to
uint vote; // index of the voted proposal
}
struct Proposal {
// If you can limit the length to a certain number of bytes,
// always use one of bytes1 to bytes32 because they are much cheaper
bytes32 name; // short name (up to 32 bytes)
uint voteCount; // number of accumulated votes
}
address public chairperson;
mapping(address => Voter) public voters;
Proposal[] public proposals;
/**
* @dev Create a new ballot to choose one of 'proposalNames'.
* @param proposalNames names of proposals
*/
constructor(bytes32[] memory proposalNames) {
chairperson = msg.sender;
voters[chairperson].weight = 1;
for (uint i = 0; i < proposalNames.length; i++) {
// 'Proposal({...})' creates a temporary
// Proposal object and 'proposals.push(...)'
// appends it to the end of 'proposals'.
proposals.push(Proposal({
name: proposalNames[i],
voteCount: 0
}));
}
}
/**
* @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'.
* @param voter address of voter
*/
function giveRightToVote(address voter) public {
require(
msg.sender == chairperson,
"Only chairperson can give right to vote."
);
require(
!voters[voter].voted,
"The voter already voted."
);
require(voters[voter].weight == 0);
voters[voter].weight = 1;
}
/**
* @dev Delegate your vote to the voter 'to'.
* @param to address to which vote is delegated
*/
function delegate(address to) public {
Voter storage sender = voters[msg.sender];
require(!sender.voted, "You already voted.");
require(to != msg.sender, "Self-delegation is disallowed.");
while (voters[to].delegate != address(0)) {
to = voters[to].delegate;
// We found a loop in the delegation, not allowed.
require(to != msg.sender, "Found loop in delegation.");
}
sender.voted = true;
sender.delegate = to;
Voter storage delegate_ = voters[to];
if (delegate_.voted) {
// If the delegate already voted,
// directly add to the number of votes
proposals[delegate_.vote].voteCount += sender.weight;
} else {
// If the delegate did not vote yet,
// add to her weight.
delegate_.weight += sender.weight;
}
}
/**
* @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'.
* @param proposal index of proposal in the proposals array
*/
function vote(uint proposal) public {
Voter storage sender = voters[msg.sender];
require(sender.weight != 0, "Has no right to vote");
require(!sender.voted, "Already voted.");
sender.voted = true;
sender.vote = proposal;
// If 'proposal' is out of the range of the array,
// this will throw automatically and revert all
// changes.
proposals[proposal].voteCount += sender.weight;
}
/**
* @dev Computes the winning proposal taking all previous votes into account.
* @return winningProposal_ index of winning proposal in the proposals array
*/
function winningProposal() public view
returns (uint winningProposal_)
{
uint winningVoteCount = 0;
for (uint p = 0; p < proposals.length; p++) {
if (proposals[p].voteCount > winningVoteCount) {
winningVoteCount = proposals[p].voteCount;
winningProposal_ = p;
}
}
}
/**
* @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then
* @return winnerName_ the name of the winner
*/
function winnerName() public view
returns (bytes32 winnerName_)
{
winnerName_ = proposals[winningProposal()].name;
}
}
{
"id": "1cab559af05426cabfa09ebd70da3682",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.21",
"solcLongVersion": "0.8.21+commit.d9974bed",
"input": {
"language": "Solidity",
"sources": {
"contracts/1_Storage.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.8.2 <0.9.0;\n\n/**\n * @title Storage\n * @dev Store & retrieve value in a variable\n * @custom:dev-run-script ./scripts/deploy_with_ethers.ts\n */\ncontract Storage {\n\n uint256 data;\n\n /**\n * @dev Store value in variable\n * @param num value to store\n */\n function store(uint256 num) public {\n data\n = num;\n }\n\n /**\n * @dev Return value \n * @return value of 'data\n'\n */\n function retrieve() public view returns (uint256){\n return data\n;\n }\n}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"contracts/1_Storage.sol": {
"Storage": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"custom:dev-run-script": "./scripts/deploy_with_ethers.ts",
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'data '"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/1_Storage.sol\":199:550 contract Storage {... */\n mstore(0x40, 0x80)\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\ntag_1:\n pop\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x00\n codecopy\n 0x00\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/1_Storage.sol\":199:550 contract Storage {... */\n mstore(0x40, 0x80)\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\n tag_1:\n pop\n jumpi(tag_2, lt(calldatasize, 0x04))\n shr(0xe0, calldataload(0x00))\n dup1\n 0x2e64cec1\n eq\n tag_3\n jumpi\n dup1\n 0x6057361d\n eq\n tag_4\n jumpi\n tag_2:\n 0x00\n dup1\n revert\n /* \"contracts/1_Storage.sol\":470:548 function retrieve() public view returns (uint256){... */\n tag_3:\n tag_5\n tag_6\n jump\t// in\n tag_5:\n mload(0x40)\n tag_7\n swap2\n swap1\n tag_8\n jump\t// in\n tag_7:\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"contracts/1_Storage.sol\":327:390 function store(uint256 num) public {... */\n tag_4:\n tag_9\n 0x04\n dup1\n calldatasize\n sub\n dup2\n add\n swap1\n tag_10\n swap2\n swap1\n tag_11\n jump\t// in\n tag_10:\n tag_12\n jump\t// in\n tag_9:\n stop\n /* \"contracts/1_Storage.sol\":470:548 function retrieve() public view returns (uint256){... */\n tag_6:\n /* \"contracts/1_Storage.sol\":511:518 uint256 */\n 0x00\n /* \"contracts/1_Storage.sol\":536:540 data */\n dup1\n sload\n /* \"contracts/1_Storage.sol\":529:540 return data */\n swap1\n pop\n /* \"contracts/1_Storage.sol\":470:548 function retrieve() public view returns (uint256){... */\n swap1\n jump\t// out\n /* \"contracts/1_Storage.sol\":327:390 function store(uint256 num) public {... */\n tag_12:\n /* \"contracts/1_Storage.sol\":380:383 num */\n dup1\n /* \"contracts/1_Storage.sol\":372:376 data */\n 0x00\n /* \"contracts/1_Storage.sol\":372:383 data... */\n dup2\n swap1\n sstore\n pop\n /* \"contracts/1_Storage.sol\":327:390 function store(uint256 num) public {... */\n pop\n jump\t// out\n /* \"#utility.yul\":7:84 */\n tag_15:\n /* \"#utility.yul\":44:51 */\n 0x00\n /* \"#utility.yul\":73:78 */\n dup2\n /* \"#utility.yul\":62:78 */\n swap1\n pop\n /* \"#utility.yul\":7:84 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":90:208 */\n tag_16:\n /* \"#utility.yul\":177:201 */\n tag_25\n /* \"#utility.yul\":195:200 */\n dup2\n /* \"#utility.yul\":177:201 */\n tag_15\n jump\t// in\n tag_25:\n /* \"#utility.yul\":172:175 */\n dup3\n /* \"#utility.yul\":165:202 */\n mstore\n /* \"#utility.yul\":90:208 */\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":214:436 */\n tag_8:\n /* \"#utility.yul\":307:311 */\n 0x00\n /* \"#utility.yul\":345:347 */\n 0x20\n /* \"#utility.yul\":334:343 */\n dup3\n /* \"#utility.yul\":330:348 */\n add\n /* \"#utility.yul\":322:348 */\n swap1\n pop\n /* \"#utility.yul\":358:429 */\n tag_27\n /* \"#utility.yul\":426:427 */\n 0x00\n /* \"#utility.yul\":415:424 */\n dup4\n /* \"#utility.yul\":411:428 */\n add\n /* \"#utility.yul\":402:408 */\n dup5\n /* \"#utility.yul\":358:429 */\n tag_16\n jump\t// in\n tag_27:\n /* \"#utility.yul\":214:436 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":523:640 */\n tag_18:\n /* \"#utility.yul\":632:633 */\n 0x00\n /* \"#utility.yul\":629:630 */\n dup1\n /* \"#utility.yul\":622:634 */\n revert\n /* \"#utility.yul\":769:891 */\n tag_20:\n /* \"#utility.yul\":842:866 */\n tag_32\n /* \"#utility.yul\":860:865 */\n dup2\n /* \"#utility.yul\":842:866 */\n tag_15\n jump\t// in\n tag_32:\n /* \"#utility.yul\":835:840 */\n dup2\n /* \"#utility.yul\":832:867 */\n eq\n /* \"#utility.yul\":822:885 */\n tag_33\n jumpi\n /* \"#utility.yul\":881:882 */\n 0x00\n /* \"#utility.yul\":878:879 */\n dup1\n /* \"#utility.yul\":871:883 */\n revert\n /* \"#utility.yul\":822:885 */\n tag_33:\n /* \"#utility.yul\":769:891 */\n pop\n jump\t// out\n /* \"#utility.yul\":897:1036 */\n tag_21:\n /* \"#utility.yul\":943:948 */\n 0x00\n /* \"#utility.yul\":981:987 */\n dup2\n /* \"#utility.yul\":968:988 */\n calldataload\n /* \"#utility.yul\":959:988 */\n swap1\n pop\n /* \"#utility.yul\":997:1030 */\n tag_35\n /* \"#utility.yul\":1024:1029 */\n dup2\n /* \"#utility.yul\":997:1030 */\n tag_20\n jump\t// in\n tag_35:\n /* \"#utility.yul\":897:1036 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":1042:1371 */\n tag_11:\n /* \"#utility.yul\":1101:1107 */\n 0x00\n /* \"#utility.yul\":1150:1152 */\n 0x20\n /* \"#utility.yul\":1138:1147 */\n dup3\n /* \"#utility.yul\":1129:1136 */\n dup5\n /* \"#utility.yul\":1125:1148 */\n sub\n /* \"#utility.yul\":1121:1153 */\n slt\n /* \"#utility.yul\":1118:1237 */\n iszero\n tag_37\n jumpi\n /* \"#utility.yul\":1156:1235 */\n tag_38\n tag_18\n jump\t// in\n tag_38:\n /* \"#utility.yul\":1118:1237 */\n tag_37:\n /* \"#utility.yul\":1276:1277 */\n 0x00\n /* \"#utility.yul\":1301:1354 */\n tag_39\n /* \"#utility.yul\":1346:1353 */\n dup5\n /* \"#utility.yul\":1337:1343 */\n dup3\n /* \"#utility.yul\":1326:1335 */\n dup6\n /* \"#utility.yul\":1322:1344 */\n add\n /* \"#utility.yul\":1301:1354 */\n tag_21\n jump\t// in\n tag_39:\n /* \"#utility.yul\":1291:1354 */\n swap2\n pop\n /* \"#utility.yul\":1247:1364 */\n pop\n /* \"#utility.yul\":1042:1371 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n\n auxdata: 0xa264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561000f575f80fd5b506101438061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH2 0x143 DUP1 PUSH2 0x1D PUSH0 CODECOPY PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x38 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x56 JUMPI JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0x40 PUSH2 0x72 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x4D SWAP2 SWAP1 PUSH2 0x9B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x70 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6B SWAP2 SWAP1 PUSH2 0xE2 JUMP JUMPDEST PUSH2 0x7A JUMP JUMPDEST STOP JUMPDEST PUSH0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x95 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xAE PUSH0 DUP4 ADD DUP5 PUSH2 0x8C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0xC1 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP2 EQ PUSH2 0xCB JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xDC DUP2 PUSH2 0xB8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF7 JUMPI PUSH2 0xF6 PUSH2 0xB4 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x104 DUP5 DUP3 DUP6 ADD PUSH2 0xCE JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x413B9BEE1367CBD331544582DB1C0DE192DA49BEC5B338 PUSH21 0xDC07A3C87F5AE764736F6C63430008150033000000 ",
"sourceMap": "199:351:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 114,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 122,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 206,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 226,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 140,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 155,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 131,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 180,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 184,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:1374:1",
"nodeType": "YulBlock",
"src": "0:1374:1",
"statements": [
{
"body": {
"nativeSrc": "52:32:1",
"nodeType": "YulBlock",
"src": "52:32:1",
"statements": [
{
"nativeSrc": "62:16:1",
"nodeType": "YulAssignment",
"src": "62:16:1",
"value": {
"name": "value",
"nativeSrc": "73:5:1",
"nodeType": "YulIdentifier",
"src": "73:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "62:7:1",
"nodeType": "YulIdentifier",
"src": "62:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "7:77:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "34:5:1",
"nodeType": "YulTypedName",
"src": "34:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "44:7:1",
"nodeType": "YulTypedName",
"src": "44:7:1",
"type": ""
}
],
"src": "7:77:1"
},
{
"body": {
"nativeSrc": "155:53:1",
"nodeType": "YulBlock",
"src": "155:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "172:3:1",
"nodeType": "YulIdentifier",
"src": "172:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "195:5:1",
"nodeType": "YulIdentifier",
"src": "195:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "177:17:1",
"nodeType": "YulIdentifier",
"src": "177:17:1"
},
"nativeSrc": "177:24:1",
"nodeType": "YulFunctionCall",
"src": "177:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "165:6:1",
"nodeType": "YulIdentifier",
"src": "165:6:1"
},
"nativeSrc": "165:37:1",
"nodeType": "YulFunctionCall",
"src": "165:37:1"
},
"nativeSrc": "165:37:1",
"nodeType": "YulExpressionStatement",
"src": "165:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "90:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "143:5:1",
"nodeType": "YulTypedName",
"src": "143:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "150:3:1",
"nodeType": "YulTypedName",
"src": "150:3:1",
"type": ""
}
],
"src": "90:118:1"
},
{
"body": {
"nativeSrc": "312:124:1",
"nodeType": "YulBlock",
"src": "312:124:1",
"statements": [
{
"nativeSrc": "322:26:1",
"nodeType": "YulAssignment",
"src": "322:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "334:9:1",
"nodeType": "YulIdentifier",
"src": "334:9:1"
},
{
"kind": "number",
"nativeSrc": "345:2:1",
"nodeType": "YulLiteral",
"src": "345:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "330:3:1",
"nodeType": "YulIdentifier",
"src": "330:3:1"
},
"nativeSrc": "330:18:1",
"nodeType": "YulFunctionCall",
"src": "330:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "322:4:1",
"nodeType": "YulIdentifier",
"src": "322:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "402:6:1",
"nodeType": "YulIdentifier",
"src": "402:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "415:9:1",
"nodeType": "YulIdentifier",
"src": "415:9:1"
},
{
"kind": "number",
"nativeSrc": "426:1:1",
"nodeType": "YulLiteral",
"src": "426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "411:3:1",
"nodeType": "YulIdentifier",
"src": "411:3:1"
},
"nativeSrc": "411:17:1",
"nodeType": "YulFunctionCall",
"src": "411:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "358:43:1",
"nodeType": "YulIdentifier",
"src": "358:43:1"
},
"nativeSrc": "358:71:1",
"nodeType": "YulFunctionCall",
"src": "358:71:1"
},
"nativeSrc": "358:71:1",
"nodeType": "YulExpressionStatement",
"src": "358:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nativeSrc": "214:222:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "284:9:1",
"nodeType": "YulTypedName",
"src": "284:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "296:6:1",
"nodeType": "YulTypedName",
"src": "296:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "307:4:1",
"nodeType": "YulTypedName",
"src": "307:4:1",
"type": ""
}
],
"src": "214:222:1"
},
{
"body": {
"nativeSrc": "482:35:1",
"nodeType": "YulBlock",
"src": "482:35:1",
"statements": [
{
"nativeSrc": "492:19:1",
"nodeType": "YulAssignment",
"src": "492:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "508:2:1",
"nodeType": "YulLiteral",
"src": "508:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "502:5:1",
"nodeType": "YulIdentifier",
"src": "502:5:1"
},
"nativeSrc": "502:9:1",
"nodeType": "YulFunctionCall",
"src": "502:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "492:6:1",
"nodeType": "YulIdentifier",
"src": "492:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "442:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "475:6:1",
"nodeType": "YulTypedName",
"src": "475:6:1",
"type": ""
}
],
"src": "442:75:1"
},
{
"body": {
"nativeSrc": "612:28:1",
"nodeType": "YulBlock",
"src": "612:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "629:1:1",
"nodeType": "YulLiteral",
"src": "629:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "632:1:1",
"nodeType": "YulLiteral",
"src": "632:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "622:6:1",
"nodeType": "YulIdentifier",
"src": "622:6:1"
},
"nativeSrc": "622:12:1",
"nodeType": "YulFunctionCall",
"src": "622:12:1"
},
"nativeSrc": "622:12:1",
"nodeType": "YulExpressionStatement",
"src": "622:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "523:117:1",
"nodeType": "YulFunctionDefinition",
"src": "523:117:1"
},
{
"body": {
"nativeSrc": "735:28:1",
"nodeType": "YulBlock",
"src": "735:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "752:1:1",
"nodeType": "YulLiteral",
"src": "752:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "755:1:1",
"nodeType": "YulLiteral",
"src": "755:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "745:6:1",
"nodeType": "YulIdentifier",
"src": "745:6:1"
},
"nativeSrc": "745:12:1",
"nodeType": "YulFunctionCall",
"src": "745:12:1"
},
"nativeSrc": "745:12:1",
"nodeType": "YulExpressionStatement",
"src": "745:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "646:117:1",
"nodeType": "YulFunctionDefinition",
"src": "646:117:1"
},
{
"body": {
"nativeSrc": "812:79:1",
"nodeType": "YulBlock",
"src": "812:79:1",
"statements": [
{
"body": {
"nativeSrc": "869:16:1",
"nodeType": "YulBlock",
"src": "869:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "878:1:1",
"nodeType": "YulLiteral",
"src": "878:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "881:1:1",
"nodeType": "YulLiteral",
"src": "881:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "871:6:1",
"nodeType": "YulIdentifier",
"src": "871:6:1"
},
"nativeSrc": "871:12:1",
"nodeType": "YulFunctionCall",
"src": "871:12:1"
},
"nativeSrc": "871:12:1",
"nodeType": "YulExpressionStatement",
"src": "871:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "835:5:1",
"nodeType": "YulIdentifier",
"src": "835:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "860:5:1",
"nodeType": "YulIdentifier",
"src": "860:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "842:17:1",
"nodeType": "YulIdentifier",
"src": "842:17:1"
},
"nativeSrc": "842:24:1",
"nodeType": "YulFunctionCall",
"src": "842:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "832:2:1",
"nodeType": "YulIdentifier",
"src": "832:2:1"
},
"nativeSrc": "832:35:1",
"nodeType": "YulFunctionCall",
"src": "832:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "825:6:1",
"nodeType": "YulIdentifier",
"src": "825:6:1"
},
"nativeSrc": "825:43:1",
"nodeType": "YulFunctionCall",
"src": "825:43:1"
},
"nativeSrc": "822:63:1",
"nodeType": "YulIf",
"src": "822:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nativeSrc": "769:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "805:5:1",
"nodeType": "YulTypedName",
"src": "805:5:1",
"type": ""
}
],
"src": "769:122:1"
},
{
"body": {
"nativeSrc": "949:87:1",
"nodeType": "YulBlock",
"src": "949:87:1",
"statements": [
{
"nativeSrc": "959:29:1",
"nodeType": "YulAssignment",
"src": "959:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "981:6:1",
"nodeType": "YulIdentifier",
"src": "981:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "968:12:1",
"nodeType": "YulIdentifier",
"src": "968:12:1"
},
"nativeSrc": "968:20:1",
"nodeType": "YulFunctionCall",
"src": "968:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "959:5:1",
"nodeType": "YulIdentifier",
"src": "959:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "1024:5:1",
"nodeType": "YulIdentifier",
"src": "1024:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nativeSrc": "997:26:1",
"nodeType": "YulIdentifier",
"src": "997:26:1"
},
"nativeSrc": "997:33:1",
"nodeType": "YulFunctionCall",
"src": "997:33:1"
},
"nativeSrc": "997:33:1",
"nodeType": "YulExpressionStatement",
"src": "997:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nativeSrc": "897:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "927:6:1",
"nodeType": "YulTypedName",
"src": "927:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "935:3:1",
"nodeType": "YulTypedName",
"src": "935:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "943:5:1",
"nodeType": "YulTypedName",
"src": "943:5:1",
"type": ""
}
],
"src": "897:139:1"
},
{
"body": {
"nativeSrc": "1108:263:1",
"nodeType": "YulBlock",
"src": "1108:263:1",
"statements": [
{
"body": {
"nativeSrc": "1154:83:1",
"nodeType": "YulBlock",
"src": "1154:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1156:77:1",
"nodeType": "YulIdentifier",
"src": "1156:77:1"
},
"nativeSrc": "1156:79:1",
"nodeType": "YulFunctionCall",
"src": "1156:79:1"
},
"nativeSrc": "1156:79:1",
"nodeType": "YulExpressionStatement",
"src": "1156:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "1129:7:1",
"nodeType": "YulIdentifier",
"src": "1129:7:1"
},
{
"name": "headStart",
"nativeSrc": "1138:9:1",
"nodeType": "YulIdentifier",
"src": "1138:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "1125:3:1",
"nodeType": "YulIdentifier",
"src": "1125:3:1"
},
"nativeSrc": "1125:23:1",
"nodeType": "YulFunctionCall",
"src": "1125:23:1"
},
{
"kind": "number",
"nativeSrc": "1150:2:1",
"nodeType": "YulLiteral",
"src": "1150:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "1121:3:1",
"nodeType": "YulIdentifier",
"src": "1121:3:1"
},
"nativeSrc": "1121:32:1",
"nodeType": "YulFunctionCall",
"src": "1121:32:1"
},
"nativeSrc": "1118:119:1",
"nodeType": "YulIf",
"src": "1118:119:1"
},
{
"nativeSrc": "1247:117:1",
"nodeType": "YulBlock",
"src": "1247:117:1",
"statements": [
{
"nativeSrc": "1262:15:1",
"nodeType": "YulVariableDeclaration",
"src": "1262:15:1",
"value": {
"kind": "number",
"nativeSrc": "1276:1:1",
"nodeType": "YulLiteral",
"src": "1276:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "1266:6:1",
"nodeType": "YulTypedName",
"src": "1266:6:1",
"type": ""
}
]
},
{
"nativeSrc": "1291:63:1",
"nodeType": "YulAssignment",
"src": "1291:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1326:9:1",
"nodeType": "YulIdentifier",
"src": "1326:9:1"
},
{
"name": "offset",
"nativeSrc": "1337:6:1",
"nodeType": "YulIdentifier",
"src": "1337:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1322:3:1",
"nodeType": "YulIdentifier",
"src": "1322:3:1"
},
"nativeSrc": "1322:22:1",
"nodeType": "YulFunctionCall",
"src": "1322:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "1346:7:1",
"nodeType": "YulIdentifier",
"src": "1346:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nativeSrc": "1301:20:1",
"nodeType": "YulIdentifier",
"src": "1301:20:1"
},
"nativeSrc": "1301:53:1",
"nodeType": "YulFunctionCall",
"src": "1301:53:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "1291:6:1",
"nodeType": "YulIdentifier",
"src": "1291:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nativeSrc": "1042:329:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "1078:9:1",
"nodeType": "YulTypedName",
"src": "1078:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "1089:7:1",
"nodeType": "YulTypedName",
"src": "1089:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "1101:6:1",
"nodeType": "YulTypedName",
"src": "1101:6:1",
"type": ""
}
],
"src": "1042:329:1"
}
]
},
"contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\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 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_uint256(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(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x38 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x56 JUMPI JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0x40 PUSH2 0x72 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x4D SWAP2 SWAP1 PUSH2 0x9B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x70 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6B SWAP2 SWAP1 PUSH2 0xE2 JUMP JUMPDEST PUSH2 0x7A JUMP JUMPDEST STOP JUMPDEST PUSH0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x95 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xAE PUSH0 DUP4 ADD DUP5 PUSH2 0x8C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0xC1 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP2 EQ PUSH2 0xCB JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xDC DUP2 PUSH2 0xB8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF7 JUMPI PUSH2 0xF6 PUSH2 0xB4 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x104 DUP5 DUP3 DUP6 ADD PUSH2 0xCE JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x413B9BEE1367CBD331544582DB1C0DE192DA49BEC5B338 PUSH21 0xDC07A3C87F5AE764736F6C63430008150033000000 ",
"sourceMap": "199:351:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;470:78;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;327:63;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;470:78;511:7;536:4;;529:11;;470:78;:::o;327:63::-;380:3;372:4;:11;;;;327:63;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;523:117::-;632:1;629;622:12;769:122;842:24;860:5;842:24;:::i;:::-;835:5;832:35;822:63;;881:1;878;871:12;822:63;769:122;:::o;897:139::-;943:5;981:6;968:20;959:29;;997:33;1024:5;997:33;:::i;:::-;897:139;;;;:::o;1042:329::-;1101:6;1150:2;1138:9;1129:7;1125:23;1121:32;1118:119;;;1156:79;;:::i;:::-;1118:119;1276:1;1301:53;1346:7;1337:6;1326:9;1322:22;1301:53;:::i;:::-;1291:63;;1247:117;1042:329;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "64600",
"executionCost": "115",
"totalCost": "64715"
},
"external": {
"retrieve()": "2410",
"store(uint256)": "22514"
}
},
"legacyAssembly": {
".code": [
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 199,
"end": 550,
"name": "MSTORE",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "ISZERO",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 199,
"end": 550,
"name": "JUMPI",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "REVERT",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 199,
"end": 550,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "POP",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "CODECOPY",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033",
".code": [
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 199,
"end": 550,
"name": "MSTORE",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "ISZERO",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 199,
"end": 550,
"name": "JUMPI",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "REVERT",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 199,
"end": 550,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "POP",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 199,
"end": 550,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "LT",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [tag]",
"source": 0,
"value": "2"
},
{
"begin": 199,
"end": 550,
"name": "JUMPI",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "CALLDATALOAD",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "E0"
},
{
"begin": 199,
"end": 550,
"name": "SHR",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "2E64CEC1"
},
{
"begin": 199,
"end": 550,
"name": "EQ",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [tag]",
"source": 0,
"value": "3"
},
{
"begin": 199,
"end": 550,
"name": "JUMPI",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "6057361D"
},
{
"begin": 199,
"end": 550,
"name": "EQ",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH [tag]",
"source": 0,
"value": "4"
},
{
"begin": 199,
"end": 550,
"name": "JUMPI",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "tag",
"source": 0,
"value": "2"
},
{
"begin": 199,
"end": 550,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 199,
"end": 550,
"name": "DUP1",
"source": 0
},
{
"begin": 199,
"end": 550,
"name": "REVERT",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "tag",
"source": 0,
"value": "3"
},
{
"begin": 470,
"end": 548,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "PUSH [tag]",
"source": 0,
"value": "5"
},
{
"begin": 470,
"end": 548,
"name": "PUSH [tag]",
"source": 0,
"value": "6"
},
{
"begin": 470,
"end": 548,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "tag",
"source": 0,
"value": "5"
},
{
"begin": 470,
"end": 548,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 470,
"end": 548,
"name": "MLOAD",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "PUSH [tag]",
"source": 0,
"value": "7"
},
{
"begin": 470,
"end": 548,
"name": "SWAP2",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "SWAP1",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "PUSH [tag]",
"source": 0,
"value": "8"
},
{
"begin": 470,
"end": 548,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "tag",
"source": 0,
"value": "7"
},
{
"begin": 470,
"end": 548,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 470,
"end": 548,
"name": "MLOAD",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "DUP1",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "SWAP2",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "SUB",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "SWAP1",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "RETURN",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "tag",
"source": 0,
"value": "4"
},
{
"begin": 327,
"end": 390,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "PUSH [tag]",
"source": 0,
"value": "9"
},
{
"begin": 327,
"end": 390,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 327,
"end": 390,
"name": "DUP1",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "SUB",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "DUP2",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "ADD",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "SWAP1",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "PUSH [tag]",
"source": 0,
"value": "10"
},
{
"begin": 327,
"end": 390,
"name": "SWAP2",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "SWAP1",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "PUSH [tag]",
"source": 0,
"value": "11"
},
{
"begin": 327,
"end": 390,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "tag",
"source": 0,
"value": "10"
},
{
"begin": 327,
"end": 390,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "PUSH [tag]",
"source": 0,
"value": "12"
},
{
"begin": 327,
"end": 390,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "tag",
"source": 0,
"value": "9"
},
{
"begin": 327,
"end": 390,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "STOP",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "tag",
"source": 0,
"value": "6"
},
{
"begin": 470,
"end": 548,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 511,
"end": 518,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 536,
"end": 540,
"name": "DUP1",
"source": 0
},
{
"begin": 536,
"end": 540,
"name": "SLOAD",
"source": 0
},
{
"begin": 529,
"end": 540,
"name": "SWAP1",
"source": 0
},
{
"begin": 529,
"end": 540,
"name": "POP",
"source": 0
},
{
"begin": 470,
"end": 548,
"name": "SWAP1",
"source": 0
},
{
"begin": 470,
"end": 548,
"jumpType": "[out]",
"name": "JUMP",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "tag",
"source": 0,
"value": "12"
},
{
"begin": 327,
"end": 390,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 380,
"end": 383,
"name": "DUP1",
"source": 0
},
{
"begin": 372,
"end": 376,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 372,
"end": 383,
"name": "DUP2",
"source": 0
},
{
"begin": 372,
"end": 383,
"name": "SWAP1",
"source": 0
},
{
"begin": 372,
"end": 383,
"name": "SSTORE",
"source": 0
},
{
"begin": 372,
"end": 383,
"name": "POP",
"source": 0
},
{
"begin": 327,
"end": 390,
"name": "POP",
"source": 0
},
{
"begin": 327,
"end": 390,
"jumpType": "[out]",
"name": "JUMP",
"source": 0
},
{
"begin": 7,
"end": 84,
"name": "tag",
"source": 1,
"value": "15"
},
{
"begin": 7,
"end": 84,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 44,
"end": 51,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 73,
"end": 78,
"name": "DUP2",
"source": 1
},
{
"begin": 62,
"end": 78,
"name": "SWAP1",
"source": 1
},
{
"begin": 62,
"end": 78,
"name": "POP",
"source": 1
},
{
"begin": 7,
"end": 84,
"name": "SWAP2",
"source": 1
},
{
"begin": 7,
"end": 84,
"name": "SWAP1",
"source": 1
},
{
"begin": 7,
"end": 84,
"name": "POP",
"source": 1
},
{
"begin": 7,
"end": 84,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 90,
"end": 208,
"name": "tag",
"source": 1,
"value": "16"
},
{
"begin": 90,
"end": 208,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 177,
"end": 201,
"name": "PUSH [tag]",
"source": 1,
"value": "25"
},
{
"begin": 195,
"end": 200,
"name": "DUP2",
"source": 1
},
{
"begin": 177,
"end": 201,
"name": "PUSH [tag]",
"source": 1,
"value": "15"
},
{
"begin": 177,
"end": 201,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 177,
"end": 201,
"name": "tag",
"source": 1,
"value": "25"
},
{
"begin": 177,
"end": 201,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 172,
"end": 175,
"name": "DUP3",
"source": 1
},
{
"begin": 165,
"end": 202,
"name": "MSTORE",
"source": 1
},
{
"begin": 90,
"end": 208,
"name": "POP",
"source": 1
},
{
"begin": 90,
"end": 208,
"name": "POP",
"source": 1
},
{
"begin": 90,
"end": 208,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 214,
"end": 436,
"name": "tag",
"source": 1,
"value": "8"
},
{
"begin": 214,
"end": 436,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 307,
"end": 311,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 345,
"end": 347,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 334,
"end": 343,
"name": "DUP3",
"source": 1
},
{
"begin": 330,
"end": 348,
"name": "ADD",
"source": 1
},
{
"begin": 322,
"end": 348,
"name": "SWAP1",
"source": 1
},
{
"begin": 322,
"end": 348,
"name": "POP",
"source": 1
},
{
"begin": 358,
"end": 429,
"name": "PUSH [tag]",
"source": 1,
"value": "27"
},
{
"begin": 426,
"end": 427,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 415,
"end": 424,
"name": "DUP4",
"source": 1
},
{
"begin": 411,
"end": 428,
"name": "ADD",
"source": 1
},
{
"begin": 402,
"end": 408,
"name": "DUP5",
"source": 1
},
{
"begin": 358,
"end": 429,
"name": "PUSH [tag]",
"source": 1,
"value": "16"
},
{
"begin": 358,
"end": 429,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 358,
"end": 429,
"name": "tag",
"source": 1,
"value": "27"
},
{
"begin": 358,
"end": 429,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 214,
"end": 436,
"name": "SWAP3",
"source": 1
},
{
"begin": 214,
"end": 436,
"name": "SWAP2",
"source": 1
},
{
"begin": 214,
"end": 436,
"name": "POP",
"source": 1
},
{
"begin": 214,
"end": 436,
"name": "POP",
"source": 1
},
{
"begin": 214,
"end": 436,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 523,
"end": 640,
"name": "tag",
"source": 1,
"value": "18"
},
{
"begin": 523,
"end": 640,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 632,
"end": 633,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 629,
"end": 630,
"name": "DUP1",
"source": 1
},
{
"begin": 622,
"end": 634,
"name": "REVERT",
"source": 1
},
{
"begin": 769,
"end": 891,
"name": "tag",
"source": 1,
"value": "20"
},
{
"begin": 769,
"end": 891,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 842,
"end": 866,
"name": "PUSH [tag]",
"source": 1,
"value": "32"
},
{
"begin": 860,
"end": 865,
"name": "DUP2",
"source": 1
},
{
"begin": 842,
"end": 866,
"name": "PUSH [tag]",
"source": 1,
"value": "15"
},
{
"begin": 842,
"end": 866,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 842,
"end": 866,
"name": "tag",
"source": 1,
"value": "32"
},
{
"begin": 842,
"end": 866,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 835,
"end": 840,
"name": "DUP2",
"source": 1
},
{
"begin": 832,
"end": 867,
"name": "EQ",
"source": 1
},
{
"begin": 822,
"end": 885,
"name": "PUSH [tag]",
"source": 1,
"value": "33"
},
{
"begin": 822,
"end": 885,
"name": "JUMPI",
"source": 1
},
{
"begin": 881,
"end": 882,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 878,
"end": 879,
"name": "DUP1",
"source": 1
},
{
"begin": 871,
"end": 883,
"name": "REVERT",
"source": 1
},
{
"begin": 822,
"end": 885,
"name": "tag",
"source": 1,
"value": "33"
},
{
"begin": 822,
"end": 885,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 769,
"end": 891,
"name": "POP",
"source": 1
},
{
"begin": 769,
"end": 891,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 897,
"end": 1036,
"name": "tag",
"source": 1,
"value": "21"
},
{
"begin": 897,
"end": 1036,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 943,
"end": 948,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 981,
"end": 987,
"name": "DUP2",
"source": 1
},
{
"begin": 968,
"end": 988,
"name": "CALLDATALOAD",
"source": 1
},
{
"begin": 959,
"end": 988,
"name": "SWAP1",
"source": 1
},
{
"begin": 959,
"end": 988,
"name": "POP",
"source": 1
},
{
"begin": 997,
"end": 1030,
"name": "PUSH [tag]",
"source": 1,
"value": "35"
},
{
"begin": 1024,
"end": 1029,
"name": "DUP2",
"source": 1
},
{
"begin": 997,
"end": 1030,
"name": "PUSH [tag]",
"source": 1,
"value": "20"
},
{
"begin": 997,
"end": 1030,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 997,
"end": 1030,
"name": "tag",
"source": 1,
"value": "35"
},
{
"begin": 997,
"end": 1030,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 897,
"end": 1036,
"name": "SWAP3",
"source": 1
},
{
"begin": 897,
"end": 1036,
"name": "SWAP2",
"source": 1
},
{
"begin": 897,
"end": 1036,
"name": "POP",
"source": 1
},
{
"begin": 897,
"end": 1036,
"name": "POP",
"source": 1
},
{
"begin": 897,
"end": 1036,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"name": "tag",
"source": 1,
"value": "11"
},
{
"begin": 1042,
"end": 1371,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1101,
"end": 1107,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1150,
"end": 1152,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 1138,
"end": 1147,
"name": "DUP3",
"source": 1
},
{
"begin": 1129,
"end": 1136,
"name": "DUP5",
"source": 1
},
{
"begin": 1125,
"end": 1148,
"name": "SUB",
"source": 1
},
{
"begin": 1121,
"end": 1153,
"name": "SLT",
"source": 1
},
{
"begin": 1118,
"end": 1237,
"name": "ISZERO",
"source": 1
},
{
"begin": 1118,
"end": 1237,
"name": "PUSH [tag]",
"source": 1,
"value": "37"
},
{
"begin": 1118,
"end": 1237,
"name": "JUMPI",
"source": 1
},
{
"begin": 1156,
"end": 1235,
"name": "PUSH [tag]",
"source": 1,
"value": "38"
},
{
"begin": 1156,
"end": 1235,
"name": "PUSH [tag]",
"source": 1,
"value": "18"
},
{
"begin": 1156,
"end": 1235,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1156,
"end": 1235,
"name": "tag",
"source": 1,
"value": "38"
},
{
"begin": 1156,
"end": 1235,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1118,
"end": 1237,
"name": "tag",
"source": 1,
"value": "37"
},
{
"begin": 1118,
"end": 1237,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1276,
"end": 1277,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1301,
"end": 1354,
"name": "PUSH [tag]",
"source": 1,
"value": "39"
},
{
"begin": 1346,
"end": 1353,
"name": "DUP5",
"source": 1
},
{
"begin": 1337,
"end": 1343,
"name": "DUP3",
"source": 1
},
{
"begin": 1326,
"end": 1335,
"name": "DUP6",
"source": 1
},
{
"begin": 1322,
"end": 1344,
"name": "ADD",
"source": 1
},
{
"begin": 1301,
"end": 1354,
"name": "PUSH [tag]",
"source": 1,
"value": "21"
},
{
"begin": 1301,
"end": 1354,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1301,
"end": 1354,
"name": "tag",
"source": 1,
"value": "39"
},
{
"begin": 1301,
"end": 1354,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1291,
"end": 1354,
"name": "SWAP2",
"source": 1
},
{
"begin": 1291,
"end": 1354,
"name": "POP",
"source": 1
},
{
"begin": 1247,
"end": 1364,
"name": "POP",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"name": "SWAP3",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"name": "SWAP2",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"name": "POP",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"name": "POP",
"source": 1
},
{
"begin": 1042,
"end": 1371,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
}
]
}
},
"sourceList": [
"contracts/1_Storage.sol",
"#utility.yul"
]
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"retrieve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"}],\"name\":\"store\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"custom:dev-run-script\":\"./scripts/deploy_with_ethers.ts\",\"details\":\"Store & retrieve value in a variable\",\"kind\":\"dev\",\"methods\":{\"retrieve()\":{\"details\":\"Return value \",\"returns\":{\"_0\":\"value of 'data '\"}},\"store(uint256)\":{\"details\":\"Store value in variable\",\"params\":{\"num\":\"value to store\"}}},\"title\":\"Storage\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/1_Storage.sol\":\"Storage\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/1_Storage.sol\":{\"keccak256\":\"0x0e358420d06116d908932bedf69dad6066fa6b90ffa35a94851e6b36de4eb000\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d07967380d58bd44a11f86ccba5d49ca1fcecad0fe9a8206dcbcb503bfe19318\",\"dweb:/ipfs/QmTeG2pLX6WdCNY28UmnU12ED7oxbDokV6hpTPRQcPDHza\"]}},\"version\":1}",
"storageLayout": {
"storage": [
{
"astId": 4,
"contract": "contracts/1_Storage.sol:Storage",
"label": "data",
"offset": 0,
"slot": "0",
"type": "t_uint256"
}
],
"types": {
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/1_Storage.sol": {
"ast": {
"absolutePath": "contracts/1_Storage.sol",
"exportedSymbols": {
"Storage": [
25
]
},
"id": 26,
"license": "GPL-3.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.8",
".2",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "37:31:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Storage",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "70:128:0",
"text": " @title Storage\n @dev Store & retrieve value in a variable\n @custom:dev-run-script ./scripts/deploy_with_ethers.ts"
},
"fullyImplemented": true,
"id": 25,
"linearizedBaseContracts": [
25
],
"name": "Storage",
"nameLocation": "208:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "data",
"nameLocation": "231:4:0",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "223:12:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "223:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body": {
"id": 14,
"nodeType": "Block",
"src": "362:28:0",
"statements": [
{
"expression": {
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 10,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "372:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 11,
"name": "num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "380:3:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "372:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 13,
"nodeType": "ExpressionStatement",
"src": "372:11:0"
}
]
},
"documentation": {
"id": 5,
"nodeType": "StructuredDocumentation",
"src": "242:80:0",
"text": " @dev Store value in variable\n @param num value to store"
},
"functionSelector": "6057361d",
"id": 15,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "store",
"nameLocation": "336:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "num",
"nameLocation": "350:3:0",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "342:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "342:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "341:13:0"
},
"returnParameters": {
"id": 9,
"nodeType": "ParameterList",
"parameters": [],
"src": "362:0:0"
},
"scope": 25,
"src": "327:63:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 23,
"nodeType": "Block",
"src": "519:29:0",
"statements": [
{
"expression": {
"id": 21,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "536:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 20,
"id": 22,
"nodeType": "Return",
"src": "529:11:0"
}
]
},
"documentation": {
"id": 16,
"nodeType": "StructuredDocumentation",
"src": "396:69:0",
"text": " @dev Return value \n @return value of 'data\n'"
},
"functionSelector": "2e64cec1",
"id": 24,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "retrieve",
"nameLocation": "479:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17,
"nodeType": "ParameterList",
"parameters": [],
"src": "487:2:0"
},
"returnParameters": {
"id": 20,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "511:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 18,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "511:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "510:9:0"
},
"scope": 25,
"src": "470:78:0",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 26,
"src": "199:351:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "37:513:0"
},
"id": 0
}
}
}
}
{
"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
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561000f575f80fd5b506101438061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH2 0x143 DUP1 PUSH2 0x1D PUSH0 CODECOPY PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x38 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x56 JUMPI JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0x40 PUSH2 0x72 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x4D SWAP2 SWAP1 PUSH2 0x9B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x70 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6B SWAP2 SWAP1 PUSH2 0xE2 JUMP JUMPDEST PUSH2 0x7A JUMP JUMPDEST STOP JUMPDEST PUSH0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x95 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xAE PUSH0 DUP4 ADD DUP5 PUSH2 0x8C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0xC1 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP2 EQ PUSH2 0xCB JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xDC DUP2 PUSH2 0xB8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF7 JUMPI PUSH2 0xF6 PUSH2 0xB4 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x104 DUP5 DUP3 DUP6 ADD PUSH2 0xCE JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x413B9BEE1367CBD331544582DB1C0DE192DA49BEC5B338 PUSH21 0xDC07A3C87F5AE764736F6C63430008150033000000 ",
"sourceMap": "199:351:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 114,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 122,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 206,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 226,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 140,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 155,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 131,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 180,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 184,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:1374:1",
"nodeType": "YulBlock",
"src": "0:1374:1",
"statements": [
{
"body": {
"nativeSrc": "52:32:1",
"nodeType": "YulBlock",
"src": "52:32:1",
"statements": [
{
"nativeSrc": "62:16:1",
"nodeType": "YulAssignment",
"src": "62:16:1",
"value": {
"name": "value",
"nativeSrc": "73:5:1",
"nodeType": "YulIdentifier",
"src": "73:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "62:7:1",
"nodeType": "YulIdentifier",
"src": "62:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "7:77:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "34:5:1",
"nodeType": "YulTypedName",
"src": "34:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "44:7:1",
"nodeType": "YulTypedName",
"src": "44:7:1",
"type": ""
}
],
"src": "7:77:1"
},
{
"body": {
"nativeSrc": "155:53:1",
"nodeType": "YulBlock",
"src": "155:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "172:3:1",
"nodeType": "YulIdentifier",
"src": "172:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "195:5:1",
"nodeType": "YulIdentifier",
"src": "195:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "177:17:1",
"nodeType": "YulIdentifier",
"src": "177:17:1"
},
"nativeSrc": "177:24:1",
"nodeType": "YulFunctionCall",
"src": "177:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "165:6:1",
"nodeType": "YulIdentifier",
"src": "165:6:1"
},
"nativeSrc": "165:37:1",
"nodeType": "YulFunctionCall",
"src": "165:37:1"
},
"nativeSrc": "165:37:1",
"nodeType": "YulExpressionStatement",
"src": "165:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "90:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "143:5:1",
"nodeType": "YulTypedName",
"src": "143:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "150:3:1",
"nodeType": "YulTypedName",
"src": "150:3:1",
"type": ""
}
],
"src": "90:118:1"
},
{
"body": {
"nativeSrc": "312:124:1",
"nodeType": "YulBlock",
"src": "312:124:1",
"statements": [
{
"nativeSrc": "322:26:1",
"nodeType": "YulAssignment",
"src": "322:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "334:9:1",
"nodeType": "YulIdentifier",
"src": "334:9:1"
},
{
"kind": "number",
"nativeSrc": "345:2:1",
"nodeType": "YulLiteral",
"src": "345:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "330:3:1",
"nodeType": "YulIdentifier",
"src": "330:3:1"
},
"nativeSrc": "330:18:1",
"nodeType": "YulFunctionCall",
"src": "330:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "322:4:1",
"nodeType": "YulIdentifier",
"src": "322:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "402:6:1",
"nodeType": "YulIdentifier",
"src": "402:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "415:9:1",
"nodeType": "YulIdentifier",
"src": "415:9:1"
},
{
"kind": "number",
"nativeSrc": "426:1:1",
"nodeType": "YulLiteral",
"src": "426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "411:3:1",
"nodeType": "YulIdentifier",
"src": "411:3:1"
},
"nativeSrc": "411:17:1",
"nodeType": "YulFunctionCall",
"src": "411:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "358:43:1",
"nodeType": "YulIdentifier",
"src": "358:43:1"
},
"nativeSrc": "358:71:1",
"nodeType": "YulFunctionCall",
"src": "358:71:1"
},
"nativeSrc": "358:71:1",
"nodeType": "YulExpressionStatement",
"src": "358:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nativeSrc": "214:222:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "284:9:1",
"nodeType": "YulTypedName",
"src": "284:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "296:6:1",
"nodeType": "YulTypedName",
"src": "296:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "307:4:1",
"nodeType": "YulTypedName",
"src": "307:4:1",
"type": ""
}
],
"src": "214:222:1"
},
{
"body": {
"nativeSrc": "482:35:1",
"nodeType": "YulBlock",
"src": "482:35:1",
"statements": [
{
"nativeSrc": "492:19:1",
"nodeType": "YulAssignment",
"src": "492:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "508:2:1",
"nodeType": "YulLiteral",
"src": "508:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "502:5:1",
"nodeType": "YulIdentifier",
"src": "502:5:1"
},
"nativeSrc": "502:9:1",
"nodeType": "YulFunctionCall",
"src": "502:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "492:6:1",
"nodeType": "YulIdentifier",
"src": "492:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "442:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "475:6:1",
"nodeType": "YulTypedName",
"src": "475:6:1",
"type": ""
}
],
"src": "442:75:1"
},
{
"body": {
"nativeSrc": "612:28:1",
"nodeType": "YulBlock",
"src": "612:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "629:1:1",
"nodeType": "YulLiteral",
"src": "629:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "632:1:1",
"nodeType": "YulLiteral",
"src": "632:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "622:6:1",
"nodeType": "YulIdentifier",
"src": "622:6:1"
},
"nativeSrc": "622:12:1",
"nodeType": "YulFunctionCall",
"src": "622:12:1"
},
"nativeSrc": "622:12:1",
"nodeType": "YulExpressionStatement",
"src": "622:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "523:117:1",
"nodeType": "YulFunctionDefinition",
"src": "523:117:1"
},
{
"body": {
"nativeSrc": "735:28:1",
"nodeType": "YulBlock",
"src": "735:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "752:1:1",
"nodeType": "YulLiteral",
"src": "752:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "755:1:1",
"nodeType": "YulLiteral",
"src": "755:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "745:6:1",
"nodeType": "YulIdentifier",
"src": "745:6:1"
},
"nativeSrc": "745:12:1",
"nodeType": "YulFunctionCall",
"src": "745:12:1"
},
"nativeSrc": "745:12:1",
"nodeType": "YulExpressionStatement",
"src": "745:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "646:117:1",
"nodeType": "YulFunctionDefinition",
"src": "646:117:1"
},
{
"body": {
"nativeSrc": "812:79:1",
"nodeType": "YulBlock",
"src": "812:79:1",
"statements": [
{
"body": {
"nativeSrc": "869:16:1",
"nodeType": "YulBlock",
"src": "869:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "878:1:1",
"nodeType": "YulLiteral",
"src": "878:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "881:1:1",
"nodeType": "YulLiteral",
"src": "881:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "871:6:1",
"nodeType": "YulIdentifier",
"src": "871:6:1"
},
"nativeSrc": "871:12:1",
"nodeType": "YulFunctionCall",
"src": "871:12:1"
},
"nativeSrc": "871:12:1",
"nodeType": "YulExpressionStatement",
"src": "871:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "835:5:1",
"nodeType": "YulIdentifier",
"src": "835:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "860:5:1",
"nodeType": "YulIdentifier",
"src": "860:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "842:17:1",
"nodeType": "YulIdentifier",
"src": "842:17:1"
},
"nativeSrc": "842:24:1",
"nodeType": "YulFunctionCall",
"src": "842:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "832:2:1",
"nodeType": "YulIdentifier",
"src": "832:2:1"
},
"nativeSrc": "832:35:1",
"nodeType": "YulFunctionCall",
"src": "832:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "825:6:1",
"nodeType": "YulIdentifier",
"src": "825:6:1"
},
"nativeSrc": "825:43:1",
"nodeType": "YulFunctionCall",
"src": "825:43:1"
},
"nativeSrc": "822:63:1",
"nodeType": "YulIf",
"src": "822:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nativeSrc": "769:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "805:5:1",
"nodeType": "YulTypedName",
"src": "805:5:1",
"type": ""
}
],
"src": "769:122:1"
},
{
"body": {
"nativeSrc": "949:87:1",
"nodeType": "YulBlock",
"src": "949:87:1",
"statements": [
{
"nativeSrc": "959:29:1",
"nodeType": "YulAssignment",
"src": "959:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "981:6:1",
"nodeType": "YulIdentifier",
"src": "981:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "968:12:1",
"nodeType": "YulIdentifier",
"src": "968:12:1"
},
"nativeSrc": "968:20:1",
"nodeType": "YulFunctionCall",
"src": "968:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "959:5:1",
"nodeType": "YulIdentifier",
"src": "959:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "1024:5:1",
"nodeType": "YulIdentifier",
"src": "1024:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nativeSrc": "997:26:1",
"nodeType": "YulIdentifier",
"src": "997:26:1"
},
"nativeSrc": "997:33:1",
"nodeType": "YulFunctionCall",
"src": "997:33:1"
},
"nativeSrc": "997:33:1",
"nodeType": "YulExpressionStatement",
"src": "997:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nativeSrc": "897:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "927:6:1",
"nodeType": "YulTypedName",
"src": "927:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "935:3:1",
"nodeType": "YulTypedName",
"src": "935:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "943:5:1",
"nodeType": "YulTypedName",
"src": "943:5:1",
"type": ""
}
],
"src": "897:139:1"
},
{
"body": {
"nativeSrc": "1108:263:1",
"nodeType": "YulBlock",
"src": "1108:263:1",
"statements": [
{
"body": {
"nativeSrc": "1154:83:1",
"nodeType": "YulBlock",
"src": "1154:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1156:77:1",
"nodeType": "YulIdentifier",
"src": "1156:77:1"
},
"nativeSrc": "1156:79:1",
"nodeType": "YulFunctionCall",
"src": "1156:79:1"
},
"nativeSrc": "1156:79:1",
"nodeType": "YulExpressionStatement",
"src": "1156:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "1129:7:1",
"nodeType": "YulIdentifier",
"src": "1129:7:1"
},
{
"name": "headStart",
"nativeSrc": "1138:9:1",
"nodeType": "YulIdentifier",
"src": "1138:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "1125:3:1",
"nodeType": "YulIdentifier",
"src": "1125:3:1"
},
"nativeSrc": "1125:23:1",
"nodeType": "YulFunctionCall",
"src": "1125:23:1"
},
{
"kind": "number",
"nativeSrc": "1150:2:1",
"nodeType": "YulLiteral",
"src": "1150:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "1121:3:1",
"nodeType": "YulIdentifier",
"src": "1121:3:1"
},
"nativeSrc": "1121:32:1",
"nodeType": "YulFunctionCall",
"src": "1121:32:1"
},
"nativeSrc": "1118:119:1",
"nodeType": "YulIf",
"src": "1118:119:1"
},
{
"nativeSrc": "1247:117:1",
"nodeType": "YulBlock",
"src": "1247:117:1",
"statements": [
{
"nativeSrc": "1262:15:1",
"nodeType": "YulVariableDeclaration",
"src": "1262:15:1",
"value": {
"kind": "number",
"nativeSrc": "1276:1:1",
"nodeType": "YulLiteral",
"src": "1276:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "1266:6:1",
"nodeType": "YulTypedName",
"src": "1266:6:1",
"type": ""
}
]
},
{
"nativeSrc": "1291:63:1",
"nodeType": "YulAssignment",
"src": "1291:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1326:9:1",
"nodeType": "YulIdentifier",
"src": "1326:9:1"
},
{
"name": "offset",
"nativeSrc": "1337:6:1",
"nodeType": "YulIdentifier",
"src": "1337:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1322:3:1",
"nodeType": "YulIdentifier",
"src": "1322:3:1"
},
"nativeSrc": "1322:22:1",
"nodeType": "YulFunctionCall",
"src": "1322:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "1346:7:1",
"nodeType": "YulIdentifier",
"src": "1346:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nativeSrc": "1301:20:1",
"nodeType": "YulIdentifier",
"src": "1301:20:1"
},
"nativeSrc": "1301:53:1",
"nodeType": "YulFunctionCall",
"src": "1301:53:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "1291:6:1",
"nodeType": "YulIdentifier",
"src": "1291:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nativeSrc": "1042:329:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "1078:9:1",
"nodeType": "YulTypedName",
"src": "1078:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "1089:7:1",
"nodeType": "YulTypedName",
"src": "1089:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "1101:6:1",
"nodeType": "YulTypedName",
"src": "1101:6:1",
"type": ""
}
],
"src": "1042:329:1"
}
]
},
"contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\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 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_uint256(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(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea264697066735822122076413b9bee1367cbd331544582db1c0de192da49bec5b33874dc07a3c87f5ae764736f6c63430008150033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x38 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x56 JUMPI JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0x40 PUSH2 0x72 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x4D SWAP2 SWAP1 PUSH2 0x9B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x70 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6B SWAP2 SWAP1 PUSH2 0xE2 JUMP JUMPDEST PUSH2 0x7A JUMP JUMPDEST STOP JUMPDEST PUSH0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x95 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xAE PUSH0 DUP4 ADD DUP5 PUSH2 0x8C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP1 REVERT JUMPDEST PUSH2 0xC1 DUP2 PUSH2 0x83 JUMP JUMPDEST DUP2 EQ PUSH2 0xCB JUMPI PUSH0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xDC DUP2 PUSH2 0xB8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF7 JUMPI PUSH2 0xF6 PUSH2 0xB4 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x104 DUP5 DUP3 DUP6 ADD PUSH2 0xCE JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x413B9BEE1367CBD331544582DB1C0DE192DA49BEC5B338 PUSH21 0xDC07A3C87F5AE764736F6C63430008150033000000 ",
"sourceMap": "199:351:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;470:78;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;327:63;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;470:78;511:7;536:4;;529:11;;470:78;:::o;327:63::-;380:3;372:4;:11;;;;327:63;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;523:117::-;632:1;629;622:12;769:122;842:24;860:5;842:24;:::i;:::-;835:5;832:35;822:63;;881:1;878;871:12;822:63;769:122;:::o;897:139::-;943:5;981:6;968:20;959:29;;997:33;1024:5;997:33;:::i;:::-;897:139;;;;:::o;1042:329::-;1101:6;1150:2;1138:9;1129:7;1125:23;1121:32;1118:119;;;1156:79;;:::i;:::-;1118:119;1276:1;1301:53;1346:7;1337:6;1326:9;1322:22;1301:53;:::i;:::-;1291:63;;1247:117;1042:329;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "64600",
"executionCost": "115",
"totalCost": "64715"
},
"external": {
"retrieve()": "2410",
"store(uint256)": "22514"
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.21+commit.d9974bed"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"custom:dev-run-script": "./scripts/deploy_with_ethers.ts",
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'data '"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/1_Storage.sol": "Storage"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0x0e358420d06116d908932bedf69dad6066fa6b90ffa35a94851e6b36de4eb000",
"license": "GPL-3.0",
"urls": [
"bzz-raw://d07967380d58bd44a11f86ccba5d49ca1fcecad0fe9a8206dcbcb503bfe19318",
"dweb:/ipfs/QmTeG2pLX6WdCNY28UmnU12ED7oxbDokV6hpTPRQcPDHza"
]
}
},
"version": 1
}
// This script can be used to deploy the "Storage" contract using ethers.js library.
// Please make sure to compile "./contracts/1_Storage.sol" file before running this script.
// And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S
import { deploy } from './ethers-lib'
(async () => {
try {
const result = await deploy('Storage', [])
console.log(`address: ${result.address}`)
} catch (e) {
console.log(e.message)
}
})()
// This script can be used to deploy the "Storage" contract using Web3 library.
// Please make sure to compile "./contracts/1_Storage.sol" file before running this script.
// And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S
import { deploy } from './web3-lib'
(async () => {
try {
const result = await deploy('Storage', [])
console.log(`address: ${result.address}`)
} catch (e) {
console.log(e.message)
}
})()
import { ethers } from 'ethers'
/**
* Deploy the given contract
* @param {string} contractName name of the contract to deploy
* @param {Array<any>} args list of constructor' parameters
* @param {Number} accountIndex account index from the exposed account
* @return {Contract} deployed contract
*/
export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {
console.log(`deploying ${contractName}`)
// 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(accountIndex)
const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer)
const contract = await factory.deploy(...args)
// The contract is NOT deployed yet; we must wait until it is mined
await contract.deployed()
return contract
}
import Web3 from 'web3'
import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'
/**
* Deploy the given contract
* @param {string} contractName name of the contract to deploy
* @param {Array<any>} args list of constructor' parameters
* @param {string} from account used to send the transaction
* @param {number} gas gas limit
* @return {Options} deployed contract
*/
export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {
const web3 = new Web3(web3Provider)
console.log(`deploying ${contractName}`)
// 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`
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
const accounts = await web3.eth.getAccounts()
const contract: Contract = new web3.eth.Contract(metadata.abi)
const contractSend: ContractSendMethod = contract.deploy({
data: metadata.data.bytecode.object,
arguments: args
})
const newContractInstance = await contractSend.send({
from: from || accounts[0],
gas: gas || 1500000
})
return newContractInstance.options
}
// 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 "hardhat/console.sol";
import "../contracts/3_Ballot.sol";
contract BallotTest {
bytes32[] proposalNames;
Ballot ballotToTest;
function beforeAll () public {
proposalNames.push(bytes32("candidate1"));
ballotToTest = new Ballot(proposalNames);
}
function checkWinningProposal () public {
console.log("Running checkWinningProposal");
ballotToTest.vote(0);
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal");
Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name");
}
function checkWinninProposalWithReturnValue () public view returns (bool) {
return ballotToTest.winningProposal() == 0;
}
}
/* eslint-disable no-undef */
// Right click on the script name and hit "Run" to execute
const { expect } = require("chai");
const { ethers } = require("hardhat");
describe("Storage", function () {
it("test initial value", async function () {
const Storage = await ethers.getContractFactory("Storage");
const storage = await Storage.deploy();
await storage.deployed();
console.log("storage deployed at:" + storage.address);
expect((await storage.retrieve()).toNumber()).to.equal(0);
});
it("test updating and retrieving updated value", async function () {
const Storage = await ethers.getContractFactory("Storage");
const storage = await Storage.deploy();
await storage.deployed();
const storage2 = await ethers.getContractAt("Storage", storage.address);
const setValue = await storage2.store(56);
await setValue.wait();
expect((await storage2.retrieve()).toNumber()).to.equal(56);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment