Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jenshandersson/f5fa2e3c482532190e019a4770ba07e9 to your computer and use it in GitHub Desktop.
Save jenshandersson/f5fa2e3c482532190e019a4770ba07e9 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.17+commit.8df45f5f.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
{
"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.
{
"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": "608060405260b0600055602c600155602c600255600a60035534801561002457600080fd5b506106f4806100346000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632607aafa1461004657806385cc6f1c1461006c578063c87b56dd14610081575b600080fd5b610059610054366004610484565b6100a1565b6040519081526020015b60405180910390f35b610074610127565b604051610063919061049d565b61009461008f366004610484565b6102b3565b6040516100639190610505565b60006001548210156100cd576001546003546100bd9042610564565b6100c79190610578565b92915050565b6002546001546100dd919061058c565b82101561011e576100ec610127565b6001546100f9908461059f565b81518110610109576101096105b2565b60200260200101516001546100c7919061058c565b5061270f919050565b60025460609060008167ffffffffffffffff811115610148576101486105c8565b604051908082528060200260200182016040528015610171578160200160208202803683370190505b50905060005b828110156101af5780828281518110610192576101926105b2565b6020908102919091010152806101a7816105de565b915050610177565b506000600354426101c09190610564565b6040516020016101d291815260200190565b6040516020818303038152906040528051906020012060001c905060005b82518110156102aa576000818451610208919061059f565b6102149084841c610578565b61021e908361058c565b90506000848281518110610234576102346105b2565b60200260200101519050848381518110610250576102506105b2565b602002602001015185838151811061026a5761026a6105b2565b60200260200101818152505080858481518110610289576102896105b2565b602002602001018181525050505080806102a2906105de565b9150506101f0565b50909392505050565b606060006102c86102c3846100a1565b610319565b9050600081826040516020016102df9291906105f7565b6040516020818303038152906040529050806040516020016103019190610680565b60405160208183030381529060405292505050919050565b60606000610326836103ac565b600101905060008167ffffffffffffffff811115610346576103466105c8565b6040519080825280601f01601f191660200182016040528015610370576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461037a57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106103eb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610417576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061043557662386f26fc10000830492506010015b6305f5e100831061044d576305f5e100830492506008015b612710831061046157612710830492506004015b60648310610473576064830492506002015b600a83106100c75760010192915050565b60006020828403121561049657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156104d5578351835292840192918401916001016104b9565b50909695505050505050565b60005b838110156104fc5781810151838201526020016104e4565b50506000910152565b60208152600082518060208401526105248160408501602087016104e1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261057357610573610538565b500490565b60008261058757610587610538565b500690565b808201808211156100c7576100c761054e565b818103818111156100c7576100c761054e565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6000600182016105f0576105f061054e565b5060010190565b707b226e616d65223a2022496d616765202360781b815282516000906106248160118501602088016104e1565b7f222c20226465736372697074696f6e223a2022222c2022696d616765223a202260119184019182015283516106618160318401602088016104e1565b652e6a7067227d60d01b60319290910191820152603701949350505050565b75646174613a6170706c69636174696f6e2f6a736f6e3b60501b8152600082516106b18160168501602087016104e1565b919091016016019291505056fea2646970667358221220056ff93e6de7971bc86f543e588d4fae2215a8c4cacadd1bf350d59de8ecc21264736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0xB0 PUSH1 0x0 SSTORE PUSH1 0x2C PUSH1 0x1 SSTORE PUSH1 0x2C PUSH1 0x2 SSTORE PUSH1 0xA PUSH1 0x3 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6F4 DUP1 PUSH2 0x34 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2607AAFA EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x85CC6F1C EQ PUSH2 0x6C JUMPI DUP1 PUSH4 0xC87B56DD EQ PUSH2 0x81 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0x484 JUMP JUMPDEST PUSH2 0xA1 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x74 PUSH2 0x127 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x63 SWAP2 SWAP1 PUSH2 0x49D JUMP JUMPDEST PUSH2 0x94 PUSH2 0x8F CALLDATASIZE PUSH1 0x4 PUSH2 0x484 JUMP JUMPDEST PUSH2 0x2B3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x63 SWAP2 SWAP1 PUSH2 0x505 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD DUP3 LT ISZERO PUSH2 0xCD JUMPI PUSH1 0x1 SLOAD PUSH1 0x3 SLOAD PUSH2 0xBD SWAP1 TIMESTAMP PUSH2 0x564 JUMP JUMPDEST PUSH2 0xC7 SWAP2 SWAP1 PUSH2 0x578 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 SLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0x58C JUMP JUMPDEST DUP3 LT ISZERO PUSH2 0x11E JUMPI PUSH2 0xEC PUSH2 0x127 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH2 0xF9 SWAP1 DUP5 PUSH2 0x59F JUMP JUMPDEST DUP2 MLOAD DUP2 LT PUSH2 0x109 JUMPI PUSH2 0x109 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 SLOAD PUSH2 0xC7 SWAP2 SWAP1 PUSH2 0x58C JUMP JUMPDEST POP PUSH2 0x270F SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x60 SWAP1 PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x148 JUMPI PUSH2 0x148 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x171 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x1AF JUMPI DUP1 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192 JUMPI PUSH2 0x192 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE DUP1 PUSH2 0x1A7 DUP2 PUSH2 0x5DE JUMP JUMPDEST SWAP2 POP POP PUSH2 0x177 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x3 SLOAD TIMESTAMP PUSH2 0x1C0 SWAP2 SWAP1 PUSH2 0x564 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1D2 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH1 0x0 SHR SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x2AA JUMPI PUSH1 0x0 DUP2 DUP5 MLOAD PUSH2 0x208 SWAP2 SWAP1 PUSH2 0x59F JUMP JUMPDEST PUSH2 0x214 SWAP1 DUP5 DUP5 SHR PUSH2 0x578 JUMP JUMPDEST PUSH2 0x21E SWAP1 DUP4 PUSH2 0x58C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x234 JUMPI PUSH2 0x234 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x250 JUMPI PUSH2 0x250 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x26A JUMPI PUSH2 0x26A PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP1 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP DUP1 DUP1 PUSH2 0x2A2 SWAP1 PUSH2 0x5DE JUMP JUMPDEST SWAP2 POP POP PUSH2 0x1F0 JUMP JUMPDEST POP SWAP1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C8 PUSH2 0x2C3 DUP5 PUSH2 0xA1 JUMP JUMPDEST PUSH2 0x319 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2DF SWAP3 SWAP2 SWAP1 PUSH2 0x5F7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 POP DUP1 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x301 SWAP2 SWAP1 PUSH2 0x680 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP3 POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x326 DUP4 PUSH2 0x3AC JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x346 JUMPI PUSH2 0x346 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x370 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 ADD PUSH1 0x20 ADD JUMPDEST PUSH1 0x0 NOT ADD PUSH16 0x181899199A1A9B1B9C1CB0B131B232B3 PUSH1 0x81 SHL PUSH1 0xA DUP7 MOD BYTE DUP2 MSTORE8 PUSH1 0xA DUP6 DIV SWAP5 POP DUP5 PUSH2 0x37A JUMPI POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH19 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F01 PUSH1 0x40 SHL DUP4 LT PUSH2 0x3EB JUMPI PUSH19 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F01 PUSH1 0x40 SHL DUP4 DIV SWAP3 POP PUSH1 0x40 ADD JUMPDEST PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 LT PUSH2 0x417 JUMPI PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 DIV SWAP3 POP PUSH1 0x20 ADD JUMPDEST PUSH7 0x2386F26FC10000 DUP4 LT PUSH2 0x435 JUMPI PUSH7 0x2386F26FC10000 DUP4 DIV SWAP3 POP PUSH1 0x10 ADD JUMPDEST PUSH4 0x5F5E100 DUP4 LT PUSH2 0x44D JUMPI PUSH4 0x5F5E100 DUP4 DIV SWAP3 POP PUSH1 0x8 ADD JUMPDEST PUSH2 0x2710 DUP4 LT PUSH2 0x461 JUMPI PUSH2 0x2710 DUP4 DIV SWAP3 POP PUSH1 0x4 ADD JUMPDEST PUSH1 0x64 DUP4 LT PUSH2 0x473 JUMPI PUSH1 0x64 DUP4 DIV SWAP3 POP PUSH1 0x2 ADD JUMPDEST PUSH1 0xA DUP4 LT PUSH2 0xC7 JUMPI PUSH1 0x1 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x496 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x4D5 JUMPI DUP4 MLOAD DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x4B9 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4FC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4E4 JUMP JUMPDEST POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE PUSH1 0x0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x524 DUP2 PUSH1 0x40 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP2 SWAP1 SWAP2 ADD PUSH1 0x40 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x573 JUMPI PUSH2 0x573 PUSH2 0x538 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x587 JUMPI PUSH2 0x587 PUSH2 0x538 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0xC7 JUMPI PUSH2 0xC7 PUSH2 0x54E JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0xC7 JUMPI PUSH2 0xC7 PUSH2 0x54E JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x5F0 JUMPI PUSH2 0x5F0 PUSH2 0x54E JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH17 0x7B226E616D65223A2022496D6167652023 PUSH1 0x78 SHL DUP2 MSTORE DUP3 MLOAD PUSH1 0x0 SWAP1 PUSH2 0x624 DUP2 PUSH1 0x11 DUP6 ADD PUSH1 0x20 DUP9 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH32 0x222C20226465736372697074696F6E223A2022222C2022696D616765223A2022 PUSH1 0x11 SWAP2 DUP5 ADD SWAP2 DUP3 ADD MSTORE DUP4 MLOAD PUSH2 0x661 DUP2 PUSH1 0x31 DUP5 ADD PUSH1 0x20 DUP9 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH6 0x2E6A7067227D PUSH1 0xD0 SHL PUSH1 0x31 SWAP3 SWAP1 SWAP2 ADD SWAP2 DUP3 ADD MSTORE PUSH1 0x37 ADD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH22 0x646174613A6170706C69636174696F6E2F6A736F6E3B PUSH1 0x50 SHL DUP2 MSTORE PUSH1 0x0 DUP3 MLOAD PUSH2 0x6B1 DUP2 PUSH1 0x16 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x4E1 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD PUSH1 0x16 ADD SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SDIV PUSH16 0xF93E6DE7971BC86F543E588D4FAE2215 0xA8 0xC4 0xCA 0xCA 0xDD SHL RETURN POP 0xD5 SWAP14 0xE8 0xEC 0xC2 SLT PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "121:1727:2:-:0;;;161:3;144:20;;192:2;170:24;;222:2;200:24;;264:2;235:31;;121:1727;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@getImage_1199": {
"entryPoint": 161,
"id": 1199,
"parameterSlots": 1,
"returnSlots": 1
},
"@log10_876": {
"entryPoint": 940,
"id": 876,
"parameterSlots": 1,
"returnSlots": 1
},
"@randomIndices_1160": {
"entryPoint": 295,
"id": 1160,
"parameterSlots": 0,
"returnSlots": 1
},
"@toString_57": {
"entryPoint": 793,
"id": 57,
"parameterSlots": 1,
"returnSlots": 1
},
"@tokenURI_1237": {
"entryPoint": 691,
"id": 1237,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 1156,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_packed_t_stringliteral_5d709170f1bd34499883e914b26c14d41a8b1a638a23e194035c26955c336794_t_string_memory_ptr_t_stringliteral_f6815a59c93ba4510bd1764d5c9dece98cd4f94cf7f42099430d20653ffd5f17_t_string_memory_ptr_t_stringliteral_08a837861558948742baccb5a30f7ed0852137fb1de93d758b6497f95b641927__to_t_bytes17_t_string_memory_ptr_t_bytes32_t_string_memory_ptr_t_bytes6__nonPadded_inplace_fromStack_reversed": {
"entryPoint": 1527,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_encode_tuple_packed_t_stringliteral_6dcd552de0f9453d9ca1cfb19f4c84f31197bfec5de7a6dd3ddab0ea450b0ce0_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed": {
"entryPoint": 1664,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_packed_t_uint256__to_t_uint256__nonPadded_inplace_fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_array$_t_uint256_$dyn_memory_ptr__to_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed": {
"entryPoint": 1181,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 1285,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_add_t_uint256": {
"entryPoint": 1420,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_div_t_uint256": {
"entryPoint": 1380,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"checked_sub_t_uint256": {
"entryPoint": 1439,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"copy_memory_to_memory_with_cleanup": {
"entryPoint": 1249,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"increment_t_uint256": {
"entryPoint": 1502,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"mod_t_uint256": {
"entryPoint": 1400,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"panic_error_0x11": {
"entryPoint": 1358,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x12": {
"entryPoint": 1336,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x32": {
"entryPoint": 1458,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 1480,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4520:3",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:3",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:110:3",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:16:3",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "139:1:3",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "142:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:3"
},
"nodeType": "YulFunctionCall",
"src": "132:12:3"
},
"nodeType": "YulExpressionStatement",
"src": "132:12:3"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "105:7:3"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "114:9:3"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "101:3:3"
},
"nodeType": "YulFunctionCall",
"src": "101:23:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "126:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "97:3:3"
},
"nodeType": "YulFunctionCall",
"src": "97:32:3"
},
"nodeType": "YulIf",
"src": "94:52:3"
},
{
"nodeType": "YulAssignment",
"src": "155:33:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "178:9:3"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "165:12:3"
},
"nodeType": "YulFunctionCall",
"src": "165:23:3"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "155:6:3"
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "50:9:3",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "61:7:3",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "73:6:3",
"type": ""
}
],
"src": "14:180:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:76:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "310:26:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "322:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "333:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "318:3:3"
},
"nodeType": "YulFunctionCall",
"src": "318:18:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "310:4:3"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "352:9:3"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "363:6:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "345:6:3"
},
"nodeType": "YulFunctionCall",
"src": "345:25:3"
},
"nodeType": "YulExpressionStatement",
"src": "345:25:3"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "269:9:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "280:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "291:4:3",
"type": ""
}
],
"src": "199:177:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "532:481:3",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "542:12:3",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "552:2:3",
"type": "",
"value": "32"
},
"variables": [
{
"name": "_1",
"nodeType": "YulTypedName",
"src": "546:2:3",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "563:32:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "581:9:3"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "592:2:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "577:3:3"
},
"nodeType": "YulFunctionCall",
"src": "577:18:3"
},
"variables": [
{
"name": "tail_1",
"nodeType": "YulTypedName",
"src": "567:6:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "611:9:3"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "622:2:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "604:6:3"
},
"nodeType": "YulFunctionCall",
"src": "604:21:3"
},
"nodeType": "YulExpressionStatement",
"src": "604:21:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "634:17:3",
"value": {
"name": "tail_1",
"nodeType": "YulIdentifier",
"src": "645:6:3"
},
"variables": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "638:3:3",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "660:27:3",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "680:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "674:5:3"
},
"nodeType": "YulFunctionCall",
"src": "674:13:3"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "664:6:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "tail_1",
"nodeType": "YulIdentifier",
"src": "703:6:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "711:6:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "696:6:3"
},
"nodeType": "YulFunctionCall",
"src": "696:22:3"
},
"nodeType": "YulExpressionStatement",
"src": "696:22:3"
},
{
"nodeType": "YulAssignment",
"src": "727:25:3",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "738:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "749:2:3",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "734:3:3"
},
"nodeType": "YulFunctionCall",
"src": "734:18:3"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "727:3:3"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "761:29:3",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "779:6:3"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "787:2:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "775:3:3"
},
"nodeType": "YulFunctionCall",
"src": "775:15:3"
},
"variables": [
{
"name": "srcPtr",
"nodeType": "YulTypedName",
"src": "765:6:3",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "799:10:3",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "808:1:3",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "803:1:3",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "867:120:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "888:3:3"
},
{
"arguments": [
{
"name": "srcPtr",
"nodeType": "YulIdentifier",
"src": "899:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "893:5:3"
},
"nodeType": "YulFunctionCall",
"src": "893:13:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "881:6:3"
},
"nodeType": "YulFunctionCall",
"src": "881:26:3"
},
"nodeType": "YulExpressionStatement",
"src": "881:26:3"
},
{
"nodeType": "YulAssignment",
"src": "920:19:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "931:3:3"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "936:2:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "927:3:3"
},
"nodeType": "YulFunctionCall",
"src": "927:12:3"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "920:3:3"
}
]
},
{
"nodeType": "YulAssignment",
"src": "952:25:3",
"value": {
"arguments": [
{
"name": "srcPtr",
"nodeType": "YulIdentifier",
"src": "966:6:3"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "974:2:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "962:3:3"
},
"nodeType": "YulFunctionCall",
"src": "962:15:3"
},
"variableNames": [
{
"name": "srcPtr",
"nodeType": "YulIdentifier",
"src": "952:6:3"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "829:1:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "832:6:3"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "826:2:3"
},
"nodeType": "YulFunctionCall",
"src": "826:13:3"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "840:18:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "842:14:3",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "851:1:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "854:1:3",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "847:3:3"
},
"nodeType": "YulFunctionCall",
"src": "847:9:3"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "842:1:3"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "822:3:3",
"statements": []
},
"src": "818:169:3"
},
{
"nodeType": "YulAssignment",
"src": "996:11:3",
"value": {
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1004:3:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "996:4:3"
}
]
}
]
},
"name": "abi_encode_tuple_t_array$_t_uint256_$dyn_memory_ptr__to_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "501:9:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "512:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "523:4:3",
"type": ""
}
],
"src": "381:632:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1084:184:3",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1094:10:3",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1103:1:3",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "1098:1:3",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1163:63:3",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1188:3:3"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1193:1:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1184:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1184:11:3"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1207:3:3"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1212:1:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1203:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1203:11:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1197:5:3"
},
"nodeType": "YulFunctionCall",
"src": "1197:18:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1177:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1177:39:3"
},
"nodeType": "YulExpressionStatement",
"src": "1177:39:3"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1124:1:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1127:6:3"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "1121:2:3"
},
"nodeType": "YulFunctionCall",
"src": "1121:13:3"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "1135:19:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1137:15:3",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1146:1:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1149:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1142:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1142:10:3"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1137:1:3"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "1117:3:3",
"statements": []
},
"src": "1113:113:3"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1246:3:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1251:6:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1242:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1242:16:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1260:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1235:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1235:27:3"
},
"nodeType": "YulExpressionStatement",
"src": "1235:27:3"
}
]
},
"name": "copy_memory_to_memory_with_cleanup",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "1062:3:3",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "1067:3:3",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1072:6:3",
"type": ""
}
],
"src": "1018:250:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1394:275:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1411:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1422:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1404:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1404:21:3"
},
"nodeType": "YulExpressionStatement",
"src": "1404:21:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "1434:27:3",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1454:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1448:5:3"
},
"nodeType": "YulFunctionCall",
"src": "1448:13:3"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1438:6:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1481:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1492:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1477:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1477:18:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1497:6:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1470:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1470:34:3"
},
"nodeType": "YulExpressionStatement",
"src": "1470:34:3"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1552:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1560:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1548:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1548:15:3"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1569:9:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1580:2:3",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1565:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1565:18:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1585:6:3"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nodeType": "YulIdentifier",
"src": "1513:34:3"
},
"nodeType": "YulFunctionCall",
"src": "1513:79:3"
},
"nodeType": "YulExpressionStatement",
"src": "1513:79:3"
},
{
"nodeType": "YulAssignment",
"src": "1601:62:3",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1617:9:3"
},
{
"arguments": [
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1636:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1644:2:3",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1632:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1632:15:3"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1653:2:3",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "1649:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1649:7:3"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "1628:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1628:29:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1613:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1613:45:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1660:2:3",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1609:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1609:54:3"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1601:4:3"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1363:9:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1374:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1385:4:3",
"type": ""
}
],
"src": "1273:396:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1706:95:3",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1723:1:3",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1730:3:3",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1735:10:3",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1726:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1726:20:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1716:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1716:31:3"
},
"nodeType": "YulExpressionStatement",
"src": "1716:31:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1763:1:3",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1766:4:3",
"type": "",
"value": "0x12"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1756:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1756:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "1756:15:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1787:1:3",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1790:4:3",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1780:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1780:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "1780:15:3"
}
]
},
"name": "panic_error_0x12",
"nodeType": "YulFunctionDefinition",
"src": "1674:127:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1838:95:3",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1855:1:3",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1862:3:3",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1867:10:3",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1858:3:3"
},
"nodeType": "YulFunctionCall",
"src": "1858:20:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1848:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1848:31:3"
},
"nodeType": "YulExpressionStatement",
"src": "1848:31:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1895:1:3",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1898:4:3",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1888:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1888:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "1888:15:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1919:1:3",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1922:4:3",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1912:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1912:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "1912:15:3"
}
]
},
"name": "panic_error_0x11",
"nodeType": "YulFunctionDefinition",
"src": "1806:127:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1984:74:3",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2007:22:3",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x12",
"nodeType": "YulIdentifier",
"src": "2009:16:3"
},
"nodeType": "YulFunctionCall",
"src": "2009:18:3"
},
"nodeType": "YulExpressionStatement",
"src": "2009:18:3"
}
]
},
"condition": {
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2004:1:3"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1997:6:3"
},
"nodeType": "YulFunctionCall",
"src": "1997:9:3"
},
"nodeType": "YulIf",
"src": "1994:35:3"
},
{
"nodeType": "YulAssignment",
"src": "2038:14:3",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2047:1:3"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2050:1:3"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "2043:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2043:9:3"
},
"variableNames": [
{
"name": "r",
"nodeType": "YulIdentifier",
"src": "2038:1:3"
}
]
}
]
},
"name": "checked_div_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "1969:1:3",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "1972:1:3",
"type": ""
}
],
"returnVariables": [
{
"name": "r",
"nodeType": "YulTypedName",
"src": "1978:1:3",
"type": ""
}
],
"src": "1938:120:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2101:74:3",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2124:22:3",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x12",
"nodeType": "YulIdentifier",
"src": "2126:16:3"
},
"nodeType": "YulFunctionCall",
"src": "2126:18:3"
},
"nodeType": "YulExpressionStatement",
"src": "2126:18:3"
}
]
},
"condition": {
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2121:1:3"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2114:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2114:9:3"
},
"nodeType": "YulIf",
"src": "2111:35:3"
},
{
"nodeType": "YulAssignment",
"src": "2155:14:3",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2164:1:3"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2167:1:3"
}
],
"functionName": {
"name": "mod",
"nodeType": "YulIdentifier",
"src": "2160:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2160:9:3"
},
"variableNames": [
{
"name": "r",
"nodeType": "YulIdentifier",
"src": "2155:1:3"
}
]
}
]
},
"name": "mod_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "2086:1:3",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "2089:1:3",
"type": ""
}
],
"returnVariables": [
{
"name": "r",
"nodeType": "YulTypedName",
"src": "2095:1:3",
"type": ""
}
],
"src": "2063:112:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2228:77:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2238:16:3",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2249:1:3"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2252:1:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2245:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2245:9:3"
},
"variableNames": [
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "2238:3:3"
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "2277:22:3",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "2279:16:3"
},
"nodeType": "YulFunctionCall",
"src": "2279:18:3"
},
"nodeType": "YulExpressionStatement",
"src": "2279:18:3"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2269:1:3"
},
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "2272:3:3"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "2266:2:3"
},
"nodeType": "YulFunctionCall",
"src": "2266:10:3"
},
"nodeType": "YulIf",
"src": "2263:36:3"
}
]
},
"name": "checked_add_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "2211:1:3",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "2214:1:3",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nodeType": "YulTypedName",
"src": "2220:3:3",
"type": ""
}
],
"src": "2180:125:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2359:79:3",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2369:17:3",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2381:1:3"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2384:1:3"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "2377:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2377:9:3"
},
"variableNames": [
{
"name": "diff",
"nodeType": "YulIdentifier",
"src": "2369:4:3"
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "2410:22:3",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "2412:16:3"
},
"nodeType": "YulFunctionCall",
"src": "2412:18:3"
},
"nodeType": "YulExpressionStatement",
"src": "2412:18:3"
}
]
},
"condition": {
"arguments": [
{
"name": "diff",
"nodeType": "YulIdentifier",
"src": "2401:4:3"
},
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2407:1:3"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "2398:2:3"
},
"nodeType": "YulFunctionCall",
"src": "2398:11:3"
},
"nodeType": "YulIf",
"src": "2395:37:3"
}
]
},
"name": "checked_sub_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "2341:1:3",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "2344:1:3",
"type": ""
}
],
"returnVariables": [
{
"name": "diff",
"nodeType": "YulTypedName",
"src": "2350:4:3",
"type": ""
}
],
"src": "2310:128:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2475:95:3",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2492:1:3",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2499:3:3",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2504:10:3",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "2495:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2495:20:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2485:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2485:31:3"
},
"nodeType": "YulExpressionStatement",
"src": "2485:31:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2532:1:3",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2535:4:3",
"type": "",
"value": "0x32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2525:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2525:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "2525:15:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2556:1:3",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2559:4:3",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2549:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2549:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "2549:15:3"
}
]
},
"name": "panic_error_0x32",
"nodeType": "YulFunctionDefinition",
"src": "2443:127:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2607:95:3",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2624:1:3",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2631:3:3",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2636:10:3",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "2627:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2627:20:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2617:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2617:31:3"
},
"nodeType": "YulExpressionStatement",
"src": "2617:31:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2664:1:3",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2667:4:3",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2657:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2657:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "2657:15:3"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2688:1:3",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2691:4:3",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2681:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2681:15:3"
},
"nodeType": "YulExpressionStatement",
"src": "2681:15:3"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "2575:127:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2754:88:3",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2785:22:3",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "2787:16:3"
},
"nodeType": "YulFunctionCall",
"src": "2787:18:3"
},
"nodeType": "YulExpressionStatement",
"src": "2787:18:3"
}
]
},
"condition": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2770:5:3"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2781:1:3",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "2777:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2777:6:3"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "2767:2:3"
},
"nodeType": "YulFunctionCall",
"src": "2767:17:3"
},
"nodeType": "YulIf",
"src": "2764:43:3"
},
{
"nodeType": "YulAssignment",
"src": "2816:20:3",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2827:5:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2834:1:3",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2823:3:3"
},
"nodeType": "YulFunctionCall",
"src": "2823:13:3"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "2816:3:3"
}
]
}
]
},
"name": "increment_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2736:5:3",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "2746:3:3",
"type": ""
}
],
"src": "2707:135:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2966:63:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2983:3:3"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "2988:6:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2976:6:3"
},
"nodeType": "YulFunctionCall",
"src": "2976:19:3"
},
"nodeType": "YulExpressionStatement",
"src": "2976:19:3"
},
{
"nodeType": "YulAssignment",
"src": "3004:19:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3015:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3020:2:3",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3011:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3011:12:3"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "3004:3:3"
}
]
}
]
},
"name": "abi_encode_tuple_packed_t_uint256__to_t_uint256__nonPadded_inplace_fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "2942:3:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "2947:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "2958:3:3",
"type": ""
}
],
"src": "2847:182:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3493:566:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3510:3:3"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3519:3:3",
"type": "",
"value": "120"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3524:36:3",
"type": "",
"value": "0x7b226e616d65223a2022496d6167652023"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "3515:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3515:46:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3503:6:3"
},
"nodeType": "YulFunctionCall",
"src": "3503:59:3"
},
"nodeType": "YulExpressionStatement",
"src": "3503:59:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "3571:27:3",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "3591:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3585:5:3"
},
"nodeType": "YulFunctionCall",
"src": "3585:13:3"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "3575:6:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "3646:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3654:4:3",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3642:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3642:17:3"
},
{
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3665:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3670:2:3",
"type": "",
"value": "17"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3661:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3661:12:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3675:6:3"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nodeType": "YulIdentifier",
"src": "3607:34:3"
},
"nodeType": "YulFunctionCall",
"src": "3607:75:3"
},
"nodeType": "YulExpressionStatement",
"src": "3607:75:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "3691:26:3",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3705:3:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3710:6:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3701:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3701:16:3"
},
"variables": [
{
"name": "_1",
"nodeType": "YulTypedName",
"src": "3695:2:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "3737:2:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3741:2:3",
"type": "",
"value": "17"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3733:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3733:11:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3746:66:3",
"type": "",
"value": "0x222c20226465736372697074696f6e223a2022222c2022696d616765223a2022"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3726:6:3"
},
"nodeType": "YulFunctionCall",
"src": "3726:87:3"
},
"nodeType": "YulExpressionStatement",
"src": "3726:87:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "3822:29:3",
"value": {
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "3844:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3838:5:3"
},
"nodeType": "YulFunctionCall",
"src": "3838:13:3"
},
"variables": [
{
"name": "length_1",
"nodeType": "YulTypedName",
"src": "3826:8:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "3899:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3907:4:3",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3895:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3895:17:3"
},
{
"arguments": [
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "3918:2:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3922:2:3",
"type": "",
"value": "49"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3914:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3914:11:3"
},
{
"name": "length_1",
"nodeType": "YulIdentifier",
"src": "3927:8:3"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nodeType": "YulIdentifier",
"src": "3860:34:3"
},
"nodeType": "YulFunctionCall",
"src": "3860:76:3"
},
"nodeType": "YulExpressionStatement",
"src": "3860:76:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "3945:27:3",
"value": {
"arguments": [
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "3959:2:3"
},
{
"name": "length_1",
"nodeType": "YulIdentifier",
"src": "3963:8:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3955:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3955:17:3"
},
"variables": [
{
"name": "_2",
"nodeType": "YulTypedName",
"src": "3949:2:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "3992:2:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3996:2:3",
"type": "",
"value": "49"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3988:3:3"
},
"nodeType": "YulFunctionCall",
"src": "3988:11:3"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4005:3:3",
"type": "",
"value": "208"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4010:14:3",
"type": "",
"value": "0x2e6a7067227d"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4001:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4001:24:3"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3981:6:3"
},
"nodeType": "YulFunctionCall",
"src": "3981:45:3"
},
"nodeType": "YulExpressionStatement",
"src": "3981:45:3"
},
{
"nodeType": "YulAssignment",
"src": "4035:18:3",
"value": {
"arguments": [
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "4046:2:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4050:2:3",
"type": "",
"value": "55"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4042:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4042:11:3"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "4035:3:3"
}
]
}
]
},
"name": "abi_encode_tuple_packed_t_stringliteral_5d709170f1bd34499883e914b26c14d41a8b1a638a23e194035c26955c336794_t_string_memory_ptr_t_stringliteral_f6815a59c93ba4510bd1764d5c9dece98cd4f94cf7f42099430d20653ffd5f17_t_string_memory_ptr_t_stringliteral_08a837861558948742baccb5a30f7ed0852137fb1de93d758b6497f95b641927__to_t_bytes17_t_string_memory_ptr_t_bytes32_t_string_memory_ptr_t_bytes6__nonPadded_inplace_fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "3461:3:3",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "3466:6:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "3474:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "3485:3:3",
"type": ""
}
],
"src": "3034:1025:3"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4304:214:3",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "4321:3:3"
},
{
"hexValue": "646174613a6170706c69636174696f6e2f6a736f6e3b",
"kind": "string",
"nodeType": "YulLiteral",
"src": "4326:24:3",
"type": "",
"value": "data:application/json;"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4314:6:3"
},
"nodeType": "YulFunctionCall",
"src": "4314:37:3"
},
"nodeType": "YulExpressionStatement",
"src": "4314:37:3"
},
{
"nodeType": "YulVariableDeclaration",
"src": "4360:27:3",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "4380:6:3"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "4374:5:3"
},
"nodeType": "YulFunctionCall",
"src": "4374:13:3"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "4364:6:3",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "4435:6:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4443:4:3",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4431:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4431:17:3"
},
{
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "4454:3:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4459:2:3",
"type": "",
"value": "22"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4450:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4450:12:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "4464:6:3"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nodeType": "YulIdentifier",
"src": "4396:34:3"
},
"nodeType": "YulFunctionCall",
"src": "4396:75:3"
},
"nodeType": "YulExpressionStatement",
"src": "4396:75:3"
},
{
"nodeType": "YulAssignment",
"src": "4480:32:3",
"value": {
"arguments": [
{
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "4495:3:3"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "4500:6:3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4491:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4491:16:3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4509:2:3",
"type": "",
"value": "22"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4487:3:3"
},
"nodeType": "YulFunctionCall",
"src": "4487:25:3"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "4480:3:3"
}
]
}
]
},
"name": "abi_encode_tuple_packed_t_stringliteral_6dcd552de0f9453d9ca1cfb19f4c84f31197bfec5de7a6dd3ddab0ea450b0ce0_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "4280:3:3",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "4285:6:3",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "4296:3:3",
"type": ""
}
],
"src": "4064:454:3"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_array$_t_uint256_$dyn_memory_ptr__to_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n let length := mload(value0)\n mstore(tail_1, length)\n pos := add(headStart, 64)\n let srcPtr := add(value0, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, mload(srcPtr))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function copy_memory_to_memory_with_cleanup(src, dst, length)\n {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n let length := mload(value0)\n mstore(add(headStart, 32), length)\n copy_memory_to_memory_with_cleanup(add(value0, 32), add(headStart, 64), length)\n tail := add(add(headStart, and(add(length, 31), not(31))), 64)\n }\n function panic_error_0x12()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n function panic_error_0x11()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n function checked_div_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := div(x, y)\n }\n function mod_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := mod(x, y)\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n sum := add(x, y)\n if gt(x, sum) { panic_error_0x11() }\n }\n function checked_sub_t_uint256(x, y) -> diff\n {\n diff := sub(x, y)\n if gt(diff, x) { panic_error_0x11() }\n }\n function panic_error_0x32()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0)) { panic_error_0x11() }\n ret := add(value, 1)\n }\n function abi_encode_tuple_packed_t_uint256__to_t_uint256__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, value0)\n end := add(pos, 32)\n }\n function abi_encode_tuple_packed_t_stringliteral_5d709170f1bd34499883e914b26c14d41a8b1a638a23e194035c26955c336794_t_string_memory_ptr_t_stringliteral_f6815a59c93ba4510bd1764d5c9dece98cd4f94cf7f42099430d20653ffd5f17_t_string_memory_ptr_t_stringliteral_08a837861558948742baccb5a30f7ed0852137fb1de93d758b6497f95b641927__to_t_bytes17_t_string_memory_ptr_t_bytes32_t_string_memory_ptr_t_bytes6__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n mstore(pos, shl(120, 0x7b226e616d65223a2022496d6167652023))\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), add(pos, 17), length)\n let _1 := add(pos, length)\n mstore(add(_1, 17), 0x222c20226465736372697074696f6e223a2022222c2022696d616765223a2022)\n let length_1 := mload(value1)\n copy_memory_to_memory_with_cleanup(add(value1, 0x20), add(_1, 49), length_1)\n let _2 := add(_1, length_1)\n mstore(add(_2, 49), shl(208, 0x2e6a7067227d))\n end := add(_2, 55)\n }\n function abi_encode_tuple_packed_t_stringliteral_6dcd552de0f9453d9ca1cfb19f4c84f31197bfec5de7a6dd3ddab0ea450b0ce0_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, \"data:application/json;\")\n let length := mload(value0)\n copy_memory_to_memory_with_cleanup(add(value0, 0x20), add(pos, 22), length)\n end := add(add(pos, length), 22)\n }\n}",
"id": 3,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100415760003560e01c80632607aafa1461004657806385cc6f1c1461006c578063c87b56dd14610081575b600080fd5b610059610054366004610484565b6100a1565b6040519081526020015b60405180910390f35b610074610127565b604051610063919061049d565b61009461008f366004610484565b6102b3565b6040516100639190610505565b60006001548210156100cd576001546003546100bd9042610564565b6100c79190610578565b92915050565b6002546001546100dd919061058c565b82101561011e576100ec610127565b6001546100f9908461059f565b81518110610109576101096105b2565b60200260200101516001546100c7919061058c565b5061270f919050565b60025460609060008167ffffffffffffffff811115610148576101486105c8565b604051908082528060200260200182016040528015610171578160200160208202803683370190505b50905060005b828110156101af5780828281518110610192576101926105b2565b6020908102919091010152806101a7816105de565b915050610177565b506000600354426101c09190610564565b6040516020016101d291815260200190565b6040516020818303038152906040528051906020012060001c905060005b82518110156102aa576000818451610208919061059f565b6102149084841c610578565b61021e908361058c565b90506000848281518110610234576102346105b2565b60200260200101519050848381518110610250576102506105b2565b602002602001015185838151811061026a5761026a6105b2565b60200260200101818152505080858481518110610289576102896105b2565b602002602001018181525050505080806102a2906105de565b9150506101f0565b50909392505050565b606060006102c86102c3846100a1565b610319565b9050600081826040516020016102df9291906105f7565b6040516020818303038152906040529050806040516020016103019190610680565b60405160208183030381529060405292505050919050565b60606000610326836103ac565b600101905060008167ffffffffffffffff811115610346576103466105c8565b6040519080825280601f01601f191660200182016040528015610370576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461037a57509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106103eb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610417576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061043557662386f26fc10000830492506010015b6305f5e100831061044d576305f5e100830492506008015b612710831061046157612710830492506004015b60648310610473576064830492506002015b600a83106100c75760010192915050565b60006020828403121561049657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156104d5578351835292840192918401916001016104b9565b50909695505050505050565b60005b838110156104fc5781810151838201526020016104e4565b50506000910152565b60208152600082518060208401526105248160408501602087016104e1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261057357610573610538565b500490565b60008261058757610587610538565b500690565b808201808211156100c7576100c761054e565b818103818111156100c7576100c761054e565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6000600182016105f0576105f061054e565b5060010190565b707b226e616d65223a2022496d616765202360781b815282516000906106248160118501602088016104e1565b7f222c20226465736372697074696f6e223a2022222c2022696d616765223a202260119184019182015283516106618160318401602088016104e1565b652e6a7067227d60d01b60319290910191820152603701949350505050565b75646174613a6170706c69636174696f6e2f6a736f6e3b60501b8152600082516106b18160168501602087016104e1565b919091016016019291505056fea2646970667358221220056ff93e6de7971bc86f543e588d4fae2215a8c4cacadd1bf350d59de8ecc21264736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2607AAFA EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x85CC6F1C EQ PUSH2 0x6C JUMPI DUP1 PUSH4 0xC87B56DD EQ PUSH2 0x81 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0x484 JUMP JUMPDEST PUSH2 0xA1 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x74 PUSH2 0x127 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x63 SWAP2 SWAP1 PUSH2 0x49D JUMP JUMPDEST PUSH2 0x94 PUSH2 0x8F CALLDATASIZE PUSH1 0x4 PUSH2 0x484 JUMP JUMPDEST PUSH2 0x2B3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x63 SWAP2 SWAP1 PUSH2 0x505 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 SLOAD DUP3 LT ISZERO PUSH2 0xCD JUMPI PUSH1 0x1 SLOAD PUSH1 0x3 SLOAD PUSH2 0xBD SWAP1 TIMESTAMP PUSH2 0x564 JUMP JUMPDEST PUSH2 0xC7 SWAP2 SWAP1 PUSH2 0x578 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 SLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0x58C JUMP JUMPDEST DUP3 LT ISZERO PUSH2 0x11E JUMPI PUSH2 0xEC PUSH2 0x127 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH2 0xF9 SWAP1 DUP5 PUSH2 0x59F JUMP JUMPDEST DUP2 MLOAD DUP2 LT PUSH2 0x109 JUMPI PUSH2 0x109 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 SLOAD PUSH2 0xC7 SWAP2 SWAP1 PUSH2 0x58C JUMP JUMPDEST POP PUSH2 0x270F SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x60 SWAP1 PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x148 JUMPI PUSH2 0x148 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x171 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x1AF JUMPI DUP1 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192 JUMPI PUSH2 0x192 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE DUP1 PUSH2 0x1A7 DUP2 PUSH2 0x5DE JUMP JUMPDEST SWAP2 POP POP PUSH2 0x177 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x3 SLOAD TIMESTAMP PUSH2 0x1C0 SWAP2 SWAP1 PUSH2 0x564 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1D2 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH1 0x0 SHR SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x2AA JUMPI PUSH1 0x0 DUP2 DUP5 MLOAD PUSH2 0x208 SWAP2 SWAP1 PUSH2 0x59F JUMP JUMPDEST PUSH2 0x214 SWAP1 DUP5 DUP5 SHR PUSH2 0x578 JUMP JUMPDEST PUSH2 0x21E SWAP1 DUP4 PUSH2 0x58C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x234 JUMPI PUSH2 0x234 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x250 JUMPI PUSH2 0x250 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x26A JUMPI PUSH2 0x26A PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP1 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x5B2 JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP DUP1 DUP1 PUSH2 0x2A2 SWAP1 PUSH2 0x5DE JUMP JUMPDEST SWAP2 POP POP PUSH2 0x1F0 JUMP JUMPDEST POP SWAP1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C8 PUSH2 0x2C3 DUP5 PUSH2 0xA1 JUMP JUMPDEST PUSH2 0x319 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2DF SWAP3 SWAP2 SWAP1 PUSH2 0x5F7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 POP DUP1 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x301 SWAP2 SWAP1 PUSH2 0x680 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP3 POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x326 DUP4 PUSH2 0x3AC JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x346 JUMPI PUSH2 0x346 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x370 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 ADD PUSH1 0x20 ADD JUMPDEST PUSH1 0x0 NOT ADD PUSH16 0x181899199A1A9B1B9C1CB0B131B232B3 PUSH1 0x81 SHL PUSH1 0xA DUP7 MOD BYTE DUP2 MSTORE8 PUSH1 0xA DUP6 DIV SWAP5 POP DUP5 PUSH2 0x37A JUMPI POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH19 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F01 PUSH1 0x40 SHL DUP4 LT PUSH2 0x3EB JUMPI PUSH19 0x184F03E93FF9F4DAA797ED6E38ED64BF6A1F01 PUSH1 0x40 SHL DUP4 DIV SWAP3 POP PUSH1 0x40 ADD JUMPDEST PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 LT PUSH2 0x417 JUMPI PUSH14 0x4EE2D6D415B85ACEF8100000000 DUP4 DIV SWAP3 POP PUSH1 0x20 ADD JUMPDEST PUSH7 0x2386F26FC10000 DUP4 LT PUSH2 0x435 JUMPI PUSH7 0x2386F26FC10000 DUP4 DIV SWAP3 POP PUSH1 0x10 ADD JUMPDEST PUSH4 0x5F5E100 DUP4 LT PUSH2 0x44D JUMPI PUSH4 0x5F5E100 DUP4 DIV SWAP3 POP PUSH1 0x8 ADD JUMPDEST PUSH2 0x2710 DUP4 LT PUSH2 0x461 JUMPI PUSH2 0x2710 DUP4 DIV SWAP3 POP PUSH1 0x4 ADD JUMPDEST PUSH1 0x64 DUP4 LT PUSH2 0x473 JUMPI PUSH1 0x64 DUP4 DIV SWAP3 POP PUSH1 0x2 ADD JUMPDEST PUSH1 0xA DUP4 LT PUSH2 0xC7 JUMPI PUSH1 0x1 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x496 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x4D5 JUMPI DUP4 MLOAD DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x4B9 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4FC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4E4 JUMP JUMPDEST POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE PUSH1 0x0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x524 DUP2 PUSH1 0x40 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP2 SWAP1 SWAP2 ADD PUSH1 0x40 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x573 JUMPI PUSH2 0x573 PUSH2 0x538 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x587 JUMPI PUSH2 0x587 PUSH2 0x538 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0xC7 JUMPI PUSH2 0xC7 PUSH2 0x54E JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0xC7 JUMPI PUSH2 0xC7 PUSH2 0x54E JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x5F0 JUMPI PUSH2 0x5F0 PUSH2 0x54E JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH17 0x7B226E616D65223A2022496D6167652023 PUSH1 0x78 SHL DUP2 MSTORE DUP3 MLOAD PUSH1 0x0 SWAP1 PUSH2 0x624 DUP2 PUSH1 0x11 DUP6 ADD PUSH1 0x20 DUP9 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH32 0x222C20226465736372697074696F6E223A2022222C2022696D616765223A2022 PUSH1 0x11 SWAP2 DUP5 ADD SWAP2 DUP3 ADD MSTORE DUP4 MLOAD PUSH2 0x661 DUP2 PUSH1 0x31 DUP5 ADD PUSH1 0x20 DUP9 ADD PUSH2 0x4E1 JUMP JUMPDEST PUSH6 0x2E6A7067227D PUSH1 0xD0 SHL PUSH1 0x31 SWAP3 SWAP1 SWAP2 ADD SWAP2 DUP3 ADD MSTORE PUSH1 0x37 ADD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH22 0x646174613A6170706C69636174696F6E2F6A736F6E3B PUSH1 0x50 SHL DUP2 MSTORE PUSH1 0x0 DUP3 MLOAD PUSH2 0x6B1 DUP2 PUSH1 0x16 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x4E1 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD PUSH1 0x16 ADD SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SDIV PUSH16 0xF93E6DE7971BC86F543E588D4FAE2215 0xA8 0xC4 0xCA 0xCA 0xDD SHL RETURN POP 0xD5 SWAP14 0xE8 0xEC 0xC2 SLT PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "121:1727:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;991:342;;;;;;:::i;:::-;;:::i;:::-;;;345:25:3;;;333:2;318:18;991:342:2;;;;;;;;290:695;;;:::i;:::-;;;;;;;:::i;1339:507::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;991:342::-;1047:7;1080:11;;1070:7;:21;1066:240;;;1155:11;;1133:18;;1115:36;;:15;:36;:::i;:::-;1114:52;;;;:::i;:::-;1107:59;991:342;-1:-1:-1;;991:342:2:o;1066:240::-;1211:11;;1197;;:25;;;;:::i;:::-;1187:7;:35;1183:123;;;1259:15;:13;:15::i;:::-;1283:11;;1275:19;;:7;:19;:::i;:::-;1259:36;;;;;;;;:::i;:::-;;;;;;;1245:11;;:50;;;;:::i;1183:123::-;-1:-1:-1;1322:4:2;;991:342;-1:-1:-1;991:342:2:o;290:695::-;384:11;;336:16;;368:13;384:11;434:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;434:20:2;;405:49;;469:9;464:77;488:5;484:1;:9;464:77;;;529:1;514:9;524:1;514:12;;;;;;;;:::i;:::-;;;;;;;;;;:16;495:3;;;;:::i;:::-;;;;464:77;;;;551:12;632:18;;614:15;:36;;;;:::i;:::-;597:54;;;;;;2976:19:3;;3020:2;3011:12;;2847:182;597:54:2;;;;;;;;;;;;;587:65;;;;;;566:136;;551:151;;717:9;712:241;736:9;:16;732:1;:20;712:241;;;773:9;824:1;805:9;:16;:20;;;;:::i;:::-;790:36;;791:9;;;790:36;:::i;:::-;785:42;;:1;:42;:::i;:::-;773:54;;841:12;856:9;866:1;856:12;;;;;;;;:::i;:::-;;;;;;;841:27;;897:9;907:1;897:12;;;;;;;;:::i;:::-;;;;;;;882:9;892:1;882:12;;;;;;;;:::i;:::-;;;;;;:27;;;;;938:4;923:9;933:1;923:12;;;;;;;;:::i;:::-;;;;;;:19;;;;;759:194;;754:3;;;;;:::i;:::-;;;;712:241;;;-1:-1:-1;969:9:2;;290:695;-1:-1:-1;;;290:695:2:o;1339:507::-;1455:13;1493:19;1515:35;1532:17;1541:7;1532:8;:17::i;:::-;1515:16;:35::i;:::-;1493:57;;1561:18;1650:5;1725;1582:184;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1561:205;;1833:4;1790:48;;;;;;;;:::i;:::-;;;;;;;;;;;;;1776:63;;;;1339:507;;;:::o;415:696:0:-;471:13;520:14;537:17;548:5;537:10;:17::i;:::-;557:1;537:21;520:38;;572:20;606:6;595:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;595:18:0;-1:-1:-1;572:41:0;-1:-1:-1;733:28:0;;;749:2;733:28;788:280;-1:-1:-1;;819:5:0;-1:-1:-1;;;953:2:0;942:14;;937:30;819:5;924:44;1012:2;1003:11;;;-1:-1:-1;1032:21:0;788:280;1032:21;-1:-1:-1;1088:6:0;415:696;-1:-1:-1;;;415:696:0:o;9889:890:1:-;9942:7;;-1:-1:-1;;;10017:15:1;;10013:99;;-1:-1:-1;;;10052:15:1;;;-1:-1:-1;10095:2:1;10085:12;10013:99;10138:6;10129:5;:15;10125:99;;10173:6;10164:15;;;-1:-1:-1;10207:2:1;10197:12;10125:99;10250:6;10241:5;:15;10237:99;;10285:6;10276:15;;;-1:-1:-1;10319:2:1;10309:12;10237:99;10362:5;10353;:14;10349:96;;10396:5;10387:14;;;-1:-1:-1;10429:1:1;10419:11;10349:96;10471:5;10462;:14;10458:96;;10505:5;10496:14;;;-1:-1:-1;10538:1:1;10528:11;10458:96;10580:5;10571;:14;10567:96;;10614:5;10605:14;;;-1:-1:-1;10647:1:1;10637:11;10567:96;10689:5;10680;:14;10676:64;;10724:1;10714:11;10766:6;9889:890;-1:-1:-1;;9889:890:1:o;14:180:3:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:3;;14:180;-1:-1:-1;14:180:3:o;381:632::-;552:2;604:21;;;674:13;;577:18;;;696:22;;;523:4;;552:2;775:15;;;;749:2;734:18;;;523:4;818:169;832:6;829:1;826:13;818:169;;;893:13;;881:26;;962:15;;;;927:12;;;;854:1;847:9;818:169;;;-1:-1:-1;1004:3:3;;381:632;-1:-1:-1;;;;;;381:632:3:o;1018:250::-;1103:1;1113:113;1127:6;1124:1;1121:13;1113:113;;;1203:11;;;1197:18;1184:11;;;1177:39;1149:2;1142:10;1113:113;;;-1:-1:-1;;1260:1:3;1242:16;;1235:27;1018:250::o;1273:396::-;1422:2;1411:9;1404:21;1385:4;1454:6;1448:13;1497:6;1492:2;1481:9;1477:18;1470:34;1513:79;1585:6;1580:2;1569:9;1565:18;1560:2;1552:6;1548:15;1513:79;:::i;:::-;1653:2;1632:15;-1:-1:-1;;1628:29:3;1613:45;;;;1660:2;1609:54;;1273:396;-1:-1:-1;;1273:396:3:o;1674:127::-;1735:10;1730:3;1726:20;1723:1;1716:31;1766:4;1763:1;1756:15;1790:4;1787:1;1780:15;1806:127;1867:10;1862:3;1858:20;1855:1;1848:31;1898:4;1895:1;1888:15;1922:4;1919:1;1912:15;1938:120;1978:1;2004;1994:35;;2009:18;;:::i;:::-;-1:-1:-1;2043:9:3;;1938:120::o;2063:112::-;2095:1;2121;2111:35;;2126:18;;:::i;:::-;-1:-1:-1;2160:9:3;;2063:112::o;2180:125::-;2245:9;;;2266:10;;;2263:36;;;2279:18;;:::i;2310:128::-;2377:9;;;2398:11;;;2395:37;;;2412:18;;:::i;2443:127::-;2504:10;2499:3;2495:20;2492:1;2485:31;2535:4;2532:1;2525:15;2559:4;2556:1;2549:15;2575:127;2636:10;2631:3;2627:20;2624:1;2617:31;2667:4;2664:1;2657:15;2691:4;2688:1;2681:15;2707:135;2746:3;2767:17;;;2764:43;;2787:18;;:::i;:::-;-1:-1:-1;2834:1:3;2823:13;;2707:135::o;3034:1025::-;-1:-1:-1;;;3503:59:3;;3585:13;;3485:3;;3607:75;3585:13;3670:2;3661:12;;3654:4;3642:17;;3607:75;:::i;:::-;3746:66;3741:2;3701:16;;;3733:11;;;3726:87;3838:13;;3860:76;3838:13;3922:2;3914:11;;3907:4;3895:17;;3860:76;:::i;:::-;-1:-1:-1;;;3996:2:3;3955:17;;;;3988:11;;;3981:45;4050:2;4042:11;;3034:1025;-1:-1:-1;;;;3034:1025:3:o;4064:454::-;-1:-1:-1;;;4321:3:3;4314:37;4296:3;4380:6;4374:13;4396:75;4464:6;4459:2;4454:3;4450:12;4443:4;4435:6;4431:17;4396:75;:::i;:::-;4491:16;;;;4509:2;4487:25;;4064:454;-1:-1:-1;;4064:454:3:o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "356000",
"executionCost": "88817",
"totalCost": "444817"
},
"external": {
"getImage(uint256)": "infinite",
"randomIndices()": "infinite",
"tokenURI(uint256)": "infinite"
}
},
"methodIdentifiers": {
"getImage(uint256)": "2607aafa",
"randomIndices()": "85cc6f1c",
"tokenURI(uint256)": "c87b56dd"
}
},
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getImage",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "randomIndices",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.17+commit.8df45f5f"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getImage",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "randomIndices",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/Dynamic.sol": "Dynamic"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
},
"sources": {
"@openzeppelin/contracts/utils/Strings.sol": {
"keccak256": "0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a",
"license": "MIT",
"urls": [
"bzz-raw://8c969013129ba9e651a20735ef659fef6d8a1139ea3607bd4b26ddea2d645634",
"dweb:/ipfs/QmVhVa6LGuzAcB8qgDtVHRkucn4ihj5UZr8xBLcJkP6ucb"
]
},
"@openzeppelin/contracts/utils/math/Math.sol": {
"keccak256": "0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6",
"license": "MIT",
"urls": [
"bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b",
"dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz"
]
},
"contracts/Dynamic.sol": {
"keccak256": "0x83067069ee3a207c8f9662137f39c159b23e3fe1ab4789dca82506b704de1646",
"license": "GPL-3.0",
"urls": [
"bzz-raw://22b8964dd1a2c8296bdd7f5587e983183c183a5028c8e84c37de0d255a9e0657",
"dweb:/ipfs/QmVWNDSygH9Mx8UonYGLfofgaPP4C9Tf5uNVvB65FFwN3K"
]
}
},
"version": 1
}
// SPDX-License-Identifier: GPL-3.0
import "@openzeppelin/contracts/utils/Strings.sol";
pragma solidity >=0.8.2 <0.9.0;
contract Dynamic {
uint256 supply = 176;
uint256 style1Count = 44;
uint256 style2Count = 44;
uint256 refreshEverySecond = 10; // 86400 for 24h
function randomIndices() public view returns (uint256[] memory) {
uint256 count = style2Count;
uint256[] memory numberArr = new uint256[](count);
for (uint256 j = 0; j < count; j++) {
numberArr[j] = j;
}
uint256 seed = uint256(
keccak256(abi.encodePacked(block.timestamp / refreshEverySecond)) // Refresh every 10 seconds for testing
);
for (uint256 i = 0; i < numberArr.length; i++) {
uint256 n = i + ((seed >> i) % (numberArr.length - i));
uint256 temp = numberArr[n];
numberArr[n] = numberArr[i];
numberArr[i] = temp;
}
return numberArr;
}
function getImage(uint256 tokenId) public view returns (uint256) {
if (tokenId < style1Count) {
return (block.timestamp / refreshEverySecond) % style1Count;
} else if (tokenId < style1Count + style2Count) {
return style1Count + randomIndices()[tokenId-style1Count];
}
return 9999;
}
function tokenURI(uint256 tokenId)
public
view
returns (
//override
string memory
)
{
string memory image = Strings.toString(getImage(tokenId));
string memory json = string.concat(
'{"name": "Image #',
image,
'", "description": "", "image": "',
image,
'.jpg"}'
);
return string(abi.encodePacked("data:application/json;", json));
}
}
// 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('Dynamic', [])
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
}
// 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;
}
}
// 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