Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save luzianjung/ea33dd03e664d99d0bc2aa364d19182c to your computer and use it in GitHub Desktop.
Save luzianjung/ea33dd03e664d99d0bc2aa364d19182c 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.30+commit.73712a01.js&optimize=false&runs=200&gist=
{
"name": "IERC20",
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"filePath": "Blockchainchallenge/@openzeppelin/contracts/token/ERC20/IERC20.sol",
"pinnedAt": 1759309954512
}
{
"name": "DGTVotesToken",
"address": "0xac9dDc90164D881Ecf646c8d008C006f671D312b",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "burnFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegatee",
"type": "address"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_minter",
"type": "address"
},
{
"internalType": "address",
"name": "_store",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "CheckpointUnorderedInsertion",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegatee",
"type": "address"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "delegateBySig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "ECDSAInvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "ECDSAInvalidSignatureLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "ECDSAInvalidSignatureS",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "increasedSupply",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "cap",
"type": "uint256"
}
],
"name": "ERC20ExceededSafeSupply",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
}
],
"name": "ERC2612ExpiredSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "ERC2612InvalidSigner",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "timepoint",
"type": "uint256"
},
{
"internalType": "uint48",
"name": "clock",
"type": "uint48"
}
],
"name": "ERC5805FutureLookup",
"type": "error"
},
{
"inputs": [],
"name": "ERC6372InconsistentClock",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "currentNonce",
"type": "uint256"
}
],
"name": "InvalidAccountNonce",
"type": "error"
},
{
"inputs": [],
"name": "InvalidShortString",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "bits",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "SafeCastOverflowedUintDowncast",
"type": "error"
},
{
"inputs": [
{
"internalType": "string",
"name": "str",
"type": "string"
}
],
"name": "StringTooLong",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
}
],
"name": "VotesExpiredSignature",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "delegator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "fromDelegate",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "toDelegate",
"type": "address"
}
],
"name": "DelegateChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "previousVotes",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newVotes",
"type": "uint256"
}
],
"name": "DelegateVotesChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EIP712DomainChanged",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint32",
"name": "pos",
"type": "uint32"
}
],
"name": "checkpoints",
"outputs": [
{
"components": [
{
"internalType": "uint48",
"name": "_key",
"type": "uint48"
},
{
"internalType": "uint208",
"name": "_value",
"type": "uint208"
}
],
"internalType": "struct Checkpoints.Checkpoint208",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "clock",
"outputs": [
{
"internalType": "uint48",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CLOCK_MODE",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "delegates",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "eip712Domain",
"outputs": [
{
"internalType": "bytes1",
"name": "fields",
"type": "bytes1"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "version",
"type": "string"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "verifyingContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "uint256[]",
"name": "extensions",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "timepoint",
"type": "uint256"
}
],
"name": "getPastTotalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "timepoint",
"type": "uint256"
}
],
"name": "getPastVotes",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getVotes",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minter",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "numCheckpoints",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "store",
"outputs": [
{
"internalType": "contract ICharityProjectStore",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"filePath": "Blockchainchallenge/Contracts/DGTVotesToken.sol",
"pinnedAt": 1759310681953
}
{
"name": "Vault",
"address": "0xb0661db32c8b7cdbad3fa9dd9828f8b9f262ac16",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "usdcAddress",
"type": "address"
},
{
"internalType": "address",
"name": "storeAddress",
"type": "address"
},
{
"internalType": "address",
"name": "governanceAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyReleased",
"type": "error"
},
{
"inputs": [],
"name": "AmountZero",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "wholeUSDC",
"type": "uint256"
}
],
"name": "depositUSDC",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Insufficient",
"type": "error"
},
{
"inputs": [],
"name": "OnlyGovernance",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "wholeUSDC",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "rawTransferred",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "dgtMinted",
"type": "uint256"
}
],
"name": "Deposited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldGov",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newGov",
"type": "address"
}
],
"name": "GovernanceChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "wholeUSDC",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "charity",
"type": "address"
}
],
"name": "MilestoneReleased",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "wholeDGT",
"type": "uint256"
}
],
"name": "redeemDGT",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "wholeDGT",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "rawReturned",
"type": "uint256"
}
],
"name": "Redeemed",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "releaseMilestone",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newGov",
"type": "address"
}
],
"name": "setGovernance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "dgtToken",
"outputs": [
{
"internalType": "contract DGTVotesToken",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dgtTokenAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "wholeUSDC",
"type": "uint256"
}
],
"name": "previewDepositUSDC",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "wholeDGT",
"type": "uint256"
}
],
"name": "previewRedeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "released",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "remainingCapacity",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "store",
"outputs": [
{
"internalType": "contract IStoreView",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "usdc",
"outputs": [
{
"internalType": "contract IERC20Like",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"filePath": "Blockchainchallenge/Contracts/Vault.sol",
"pinnedAt": 1759240836381
}
{
"name": "SimpleGovernorDirect",
"address": "0xb9670a82055a51386d4a46ead64afc956bda44e8",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "cancel",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "execute",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token_",
"type": "address"
},
{
"internalType": "uint64",
"name": "votingDelay_",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "votingPeriod_",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "proposalThreshold_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "quorumAbsolute_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "ProposalCanceled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "proposer",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "target",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint64",
"name": "startBlock",
"type": "uint64"
},
{
"indexed": false,
"internalType": "uint64",
"name": "endBlock",
"type": "uint64"
},
{
"indexed": false,
"internalType": "uint256",
"name": "quorum",
"type": "uint256"
}
],
"name": "ProposalCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "ProposalExecuted",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "quorumAbsolute",
"type": "uint256"
}
],
"name": "propose",
"outputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newQuorum",
"type": "uint256"
}
],
"name": "setDefaultQuorum",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newThreshold",
"type": "uint256"
}
],
"name": "setProposalThreshold",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newDelay",
"type": "uint64"
}
],
"name": "setVotingDelay",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newPeriod",
"type": "uint64"
}
],
"name": "setVotingPeriod",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "bool",
"name": "support",
"type": "bool"
}
],
"name": "vote",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "voter",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "support",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "weight",
"type": "uint256"
}
],
"name": "VoteCast",
"type": "event"
},
{
"stateMutability": "payable",
"type": "receive"
},
{
"inputs": [],
"name": "defaultQuorum",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "hasVoted",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "nextId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "proposals",
"outputs": [
{
"internalType": "address",
"name": "proposer",
"type": "address"
},
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint64",
"name": "startBlock",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "endBlock",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "forVotes",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "againstVotes",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "quorum",
"type": "uint256"
},
{
"internalType": "bool",
"name": "executed",
"type": "bool"
},
{
"internalType": "bool",
"name": "canceled",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "proposalThreshold",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "state",
"outputs": [
{
"internalType": "enum SimpleGovernorDirect.ProposalState",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "votesToken",
"outputs": [
{
"internalType": "contract IVotes",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "votingDelay",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "votingPeriod",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
}
],
"filePath": "Blockchainchallenge/Contracts/Gov.sol",
"pinnedAt": 1759332464799
}
{
"name": "CharityProjectStore",
"address": "0xe7c254e1cd3305e975abaa5428b0944ded361c83",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "addMilestoneAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_charity",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyAttached",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "_vault",
"type": "address"
},
{
"internalType": "address",
"name": "_dgt",
"type": "address"
}
],
"name": "attachVaultAndToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "Finalized",
"type": "error"
},
{
"inputs": [],
"name": "finalizeProject",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "OnlyCreator",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "MilestoneAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
}
],
"name": "ProjectFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "details",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalAmountNeeded",
"type": "uint256"
}
],
"name": "ProjectInfoUpdated",
"type": "event"
},
{
"inputs": [
{
"internalType": "string",
"name": "_details",
"type": "string"
}
],
"name": "storeProjectDetails",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "storeProjectName",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "storeTotalAmountNeeded",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "dgt",
"type": "address"
}
],
"name": "VaultAttached",
"type": "event"
},
{
"inputs": [],
"name": "charity",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "creator",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dgt",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "finalized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "milestoneAmounts",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "milestoneCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectDetails",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectName",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalAmountNeeded",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"filePath": "Blockchainchallenge/Contracts/ProjectDetails.sol",
"pinnedAt": 1759237357539
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (governance/utils/IVotes.sol)
pragma solidity >=0.8.4;
/**
* @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.
*/
interface IVotes {
/**
* @dev The signature used has expired.
*/
error VotesExpiredSignature(uint256 expiry);
/**
* @dev Emitted when an account changes their delegate.
*/
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
/**
* @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of voting units.
*/
event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes);
/**
* @dev Returns the current amount of votes that `account` has.
*/
function getVotes(address account) external view returns (uint256);
/**
* @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is
* configured to use block numbers, this will return the value at the end of the corresponding block.
*/
function getPastVotes(address account, uint256 timepoint) external view returns (uint256);
/**
* @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is
* configured to use block numbers, this will return the value at the end of the corresponding block.
*
* NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
* Votes that have not been delegated are still part of total supply, even though they would not participate in a
* vote.
*/
function getPastTotalSupply(uint256 timepoint) external view returns (uint256);
/**
* @dev Returns the delegate that `account` has chosen.
*/
function delegates(address account) external view returns (address);
/**
* @dev Delegates votes from the sender to `delegatee`.
*/
function delegate(address delegatee) external;
/**
* @dev Delegates votes from signer to `delegatee`.
*/
function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external;
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (governance/utils/Votes.sol)
pragma solidity ^0.8.20;
import {IERC5805} from "../../interfaces/IERC5805.sol";
import {Context} from "../../utils/Context.sol";
import {Nonces} from "../../utils/Nonces.sol";
import {EIP712} from "../../utils/cryptography/EIP712.sol";
import {Checkpoints} from "../../utils/structs/Checkpoints.sol";
import {SafeCast} from "../../utils/math/SafeCast.sol";
import {ECDSA} from "../../utils/cryptography/ECDSA.sol";
import {Time} from "../../utils/types/Time.sol";
/**
* @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be
* transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of
* "representative" that will pool delegated voting units from different accounts and can then use it to vote in
* decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to
* delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative.
*
* This contract is often combined with a token contract such that voting units correspond to token units. For an
* example, see {ERC721Votes}.
*
* The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed
* at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the
* cost of this history tracking optional.
*
* When using this module the derived contract must implement {_getVotingUnits} (for example, make it return
* {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the
* previous example, it would be included in {ERC721-_update}).
*/
abstract contract Votes is Context, EIP712, Nonces, IERC5805 {
using Checkpoints for Checkpoints.Trace208;
bytes32 private constant DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
mapping(address account => address) private _delegatee;
mapping(address delegatee => Checkpoints.Trace208) private _delegateCheckpoints;
Checkpoints.Trace208 private _totalCheckpoints;
/**
* @dev The clock was incorrectly modified.
*/
error ERC6372InconsistentClock();
/**
* @dev Lookup to future votes is not available.
*/
error ERC5805FutureLookup(uint256 timepoint, uint48 clock);
/**
* @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based
* checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match.
*/
function clock() public view virtual returns (uint48) {
return Time.blockNumber();
}
/**
* @dev Machine-readable description of the clock as specified in ERC-6372.
*/
// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() public view virtual returns (string memory) {
// Check that the clock was not modified
if (clock() != Time.blockNumber()) {
revert ERC6372InconsistentClock();
}
return "mode=blocknumber&from=default";
}
/**
* @dev Validate that a timepoint is in the past, and return it as a uint48.
*/
function _validateTimepoint(uint256 timepoint) internal view returns (uint48) {
uint48 currentTimepoint = clock();
if (timepoint >= currentTimepoint) revert ERC5805FutureLookup(timepoint, currentTimepoint);
return SafeCast.toUint48(timepoint);
}
/**
* @dev Returns the current amount of votes that `account` has.
*/
function getVotes(address account) public view virtual returns (uint256) {
return _delegateCheckpoints[account].latest();
}
/**
* @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is
* configured to use block numbers, this will return the value at the end of the corresponding block.
*
* Requirements:
*
* - `timepoint` must be in the past. If operating using block numbers, the block must be already mined.
*/
function getPastVotes(address account, uint256 timepoint) public view virtual returns (uint256) {
return _delegateCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint));
}
/**
* @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is
* configured to use block numbers, this will return the value at the end of the corresponding block.
*
* NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
* Votes that have not been delegated are still part of total supply, even though they would not participate in a
* vote.
*
* Requirements:
*
* - `timepoint` must be in the past. If operating using block numbers, the block must be already mined.
*/
function getPastTotalSupply(uint256 timepoint) public view virtual returns (uint256) {
return _totalCheckpoints.upperLookupRecent(_validateTimepoint(timepoint));
}
/**
* @dev Returns the current total supply of votes.
*/
function _getTotalSupply() internal view virtual returns (uint256) {
return _totalCheckpoints.latest();
}
/**
* @dev Returns the delegate that `account` has chosen.
*/
function delegates(address account) public view virtual returns (address) {
return _delegatee[account];
}
/**
* @dev Delegates votes from the sender to `delegatee`.
*/
function delegate(address delegatee) public virtual {
address account = _msgSender();
_delegate(account, delegatee);
}
/**
* @dev Delegates votes from signer to `delegatee`.
*/
function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
if (block.timestamp > expiry) {
revert VotesExpiredSignature(expiry);
}
address signer = ECDSA.recover(
_hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry))),
v,
r,
s
);
_useCheckedNonce(signer, nonce);
_delegate(signer, delegatee);
}
/**
* @dev Delegate all of `account`'s voting units to `delegatee`.
*
* Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}.
*/
function _delegate(address account, address delegatee) internal virtual {
address oldDelegate = delegates(account);
_delegatee[account] = delegatee;
emit DelegateChanged(account, oldDelegate, delegatee);
_moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account));
}
/**
* @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to`
* should be zero. Total supply of voting units will be adjusted with mints and burns.
*/
function _transferVotingUnits(address from, address to, uint256 amount) internal virtual {
if (from == address(0)) {
_push(_totalCheckpoints, _add, SafeCast.toUint208(amount));
}
if (to == address(0)) {
_push(_totalCheckpoints, _subtract, SafeCast.toUint208(amount));
}
_moveDelegateVotes(delegates(from), delegates(to), amount);
}
/**
* @dev Moves delegated votes from one delegate to another.
*/
function _moveDelegateVotes(address from, address to, uint256 amount) internal virtual {
if (from != to && amount > 0) {
if (from != address(0)) {
(uint256 oldValue, uint256 newValue) = _push(
_delegateCheckpoints[from],
_subtract,
SafeCast.toUint208(amount)
);
emit DelegateVotesChanged(from, oldValue, newValue);
}
if (to != address(0)) {
(uint256 oldValue, uint256 newValue) = _push(
_delegateCheckpoints[to],
_add,
SafeCast.toUint208(amount)
);
emit DelegateVotesChanged(to, oldValue, newValue);
}
}
}
/**
* @dev Get number of checkpoints for `account`.
*/
function _numCheckpoints(address account) internal view virtual returns (uint32) {
return SafeCast.toUint32(_delegateCheckpoints[account].length());
}
/**
* @dev Get the `pos`-th checkpoint for `account`.
*/
function _checkpoints(
address account,
uint32 pos
) internal view virtual returns (Checkpoints.Checkpoint208 memory) {
return _delegateCheckpoints[account].at(pos);
}
function _push(
Checkpoints.Trace208 storage store,
function(uint208, uint208) view returns (uint208) op,
uint208 delta
) private returns (uint208 oldValue, uint208 newValue) {
return store.push(clock(), op(store.latest(), delta));
}
function _add(uint208 a, uint208 b) private pure returns (uint208) {
return a + b;
}
function _subtract(uint208 a, uint208 b) private pure returns (uint208) {
return a - b;
}
/**
* @dev Must return the voting units held by an account.
*/
function _getVotingUnits(address) internal view virtual returns (uint256);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol)
pragma solidity >=0.4.16;
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5805.sol)
pragma solidity >=0.8.4;
import {IVotes} from "../governance/utils/IVotes.sol";
import {IERC6372} from "./IERC6372.sol";
interface IERC5805 is IERC6372, IVotes {}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC6372.sol)
pragma solidity >=0.4.16;
interface IERC6372 {
/**
* @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
*/
function clock() external view returns (uint48);
/**
* @dev Description of the clock
*/
// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() external view returns (string memory);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* Both values are immutable: they can only be set once during construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return 18;
}
/// @inheritdoc IERC20
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/// @inheritdoc IERC20
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/// @inheritdoc IERC20
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
*
* ```solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner`'s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Permit.sol)
pragma solidity ^0.8.20;
import {IERC20Permit} from "./IERC20Permit.sol";
import {ERC20} from "../ERC20.sol";
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
import {Nonces} from "../../../utils/Nonces.sol";
/**
* @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
bytes32 private constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev Permit deadline has expired.
*/
error ERC2612ExpiredSignature(uint256 deadline);
/**
* @dev Mismatched signature.
*/
error ERC2612InvalidSigner(address signer, address owner);
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
*
* It's a good idea to use the same `name` that is defined as the ERC-20 token name.
*/
constructor(string memory name) EIP712(name, "1") {}
/// @inheritdoc IERC20Permit
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
if (block.timestamp > deadline) {
revert ERC2612ExpiredSignature(deadline);
}
bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, v, r, s);
if (signer != owner) {
revert ERC2612InvalidSigner(signer, owner);
}
_approve(owner, spender, value);
}
/// @inheritdoc IERC20Permit
function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
return super.nonces(owner);
}
/// @inheritdoc IERC20Permit
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
return _domainSeparatorV4();
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Votes.sol)
pragma solidity ^0.8.20;
import {ERC20} from "../ERC20.sol";
import {Votes} from "../../../governance/utils/Votes.sol";
import {Checkpoints} from "../../../utils/structs/Checkpoints.sol";
/**
* @dev Extension of ERC-20 to support Compound-like voting and delegation. This version is more generic than Compound's,
* and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1.
*
* NOTE: This contract does not provide interface compatibility with Compound's COMP token.
*
* This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
* by calling the {Votes-delegate} function directly, or by providing a signature to be used with {Votes-delegateBySig}. Voting
* power can be queried through the public accessors {Votes-getVotes} and {Votes-getPastVotes}.
*
* By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it
* requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.
*/
abstract contract ERC20Votes is ERC20, Votes {
/**
* @dev Total supply cap has been exceeded, introducing a risk of votes overflowing.
*/
error ERC20ExceededSafeSupply(uint256 increasedSupply, uint256 cap);
/**
* @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1).
*
* This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwise a uint256,
* so that checkpoints can be stored in the Trace208 structure used by {Votes}. Increasing this value will not
* remove the underlying limitation, and will cause {_update} to fail because of a math overflow in
* {Votes-_transferVotingUnits}. An override could be used to further restrict the total supply (to a lower value) if
* additional logic requires it. When resolving override conflicts on this function, the minimum should be
* returned.
*/
function _maxSupply() internal view virtual returns (uint256) {
return type(uint208).max;
}
/**
* @dev Move voting power when tokens are transferred.
*
* Emits a {IVotes-DelegateVotesChanged} event.
*/
function _update(address from, address to, uint256 value) internal virtual override {
super._update(from, to, value);
if (from == address(0)) {
uint256 supply = totalSupply();
uint256 cap = _maxSupply();
if (supply > cap) {
revert ERC20ExceededSafeSupply(supply, cap);
}
}
_transferVotingUnits(from, to, value);
}
/**
* @dev Returns the voting units of an `account`.
*
* WARNING: Overriding this function may compromise the internal vote accounting.
* `ERC20Votes` assumes tokens map to voting units 1:1 and this is not easy to change.
*/
function _getVotingUnits(address account) internal view virtual override returns (uint256) {
return balanceOf(account);
}
/**
* @dev Get number of checkpoints for `account`.
*/
function numCheckpoints(address account) public view virtual returns (uint32) {
return _numCheckpoints(account);
}
/**
* @dev Get the `pos`-th checkpoint for `account`.
*/
function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint208 memory) {
return _checkpoints(account, pos);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(
bytes32 hash,
bytes memory signature
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly ("memory-safe") {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/EIP712.sol)
pragma solidity ^0.8.20;
import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
*
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*
* @custom:oz-upgrades-unsafe-allow state-variable-immutable
*/
abstract contract EIP712 is IERC5267 {
using ShortStrings for *;
bytes32 private constant TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _cachedDomainSeparator;
uint256 private immutable _cachedChainId;
address private immutable _cachedThis;
bytes32 private immutable _hashedName;
bytes32 private immutable _hashedVersion;
ShortString private immutable _name;
ShortString private immutable _version;
// slither-disable-next-line constable-states
string private _nameFallback;
// slither-disable-next-line constable-states
string private _versionFallback;
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
_name = name.toShortStringWithFallback(_nameFallback);
_version = version.toShortStringWithFallback(_versionFallback);
_hashedName = keccak256(bytes(name));
_hashedVersion = keccak256(bytes(version));
_cachedChainId = block.chainid;
_cachedDomainSeparator = _buildDomainSeparator();
_cachedThis = address(this);
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
return _cachedDomainSeparator;
} else {
return _buildDomainSeparator();
}
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/// @inheritdoc IERC5267
function eip712Domain()
public
view
virtual
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
return (
hex"0f", // 01111
_EIP712Name(),
_EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
/**
* @dev The name parameter for the EIP712 domain.
*
* NOTE: By default this function reads _name which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Name() internal view returns (string memory) {
return _name.toStringWithFallback(_nameFallback);
}
/**
* @dev The version parameter for the EIP712 domain.
*
* NOTE: By default this function reads _version which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Version() internal view returns (string memory) {
return _version.toStringWithFallback(_versionFallback);
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)
pragma solidity ^0.8.20;
import {Strings} from "../Strings.sol";
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an ERC-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
assembly ("memory-safe") {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an ERC-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
}
/**
* @dev Returns the keccak256 digest of an ERC-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(hex"19_00", validator, data));
}
/**
* @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.
*/
function toDataWithIntendedValidatorHash(
address validator,
bytes32 messageHash
) internal pure returns (bytes32 digest) {
assembly ("memory-safe") {
mstore(0x00, hex"19_00")
mstore(0x02, shl(96, validator))
mstore(0x16, messageHash)
digest := keccak256(0x00, 0x36)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
assembly ("memory-safe") {
let ptr := mload(0x40)
mstore(ptr, hex"19_01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
import {Panic} from "../Panic.sol";
import {SafeCast} from "./SafeCast.sol";
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Return the 512-bit addition of two uint256.
*
* The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.
*/
function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
assembly ("memory-safe") {
low := add(a, b)
high := lt(low, a)
}
}
/**
* @dev Return the 512-bit multiplication of two uint256.
*
* The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.
*/
function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
// 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use
// the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = high * 2²⁵⁶ + low.
assembly ("memory-safe") {
let mm := mulmod(a, b, not(0))
low := mul(a, b)
high := sub(sub(mm, low), lt(mm, low))
}
}
/**
* @dev Returns the addition of two unsigned integers, with a success flag (no overflow).
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a + b;
success = c >= a;
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a - b;
success = c <= a;
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a * b;
assembly ("memory-safe") {
// Only true when the multiplication doesn't overflow
// (c / a == b) || (a == 0)
success := or(eq(div(c, a), b), iszero(a))
}
// equivalent to: success ? c : 0
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the division of two unsigned integers, with a success flag (no division by zero).
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
success = b > 0;
assembly ("memory-safe") {
// The `DIV` opcode returns zero when the denominator is 0.
result := div(a, b)
}
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
success = b > 0;
assembly ("memory-safe") {
// The `MOD` opcode returns zero when the denominator is 0.
result := mod(a, b)
}
}
}
/**
* @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.
*/
function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {
(bool success, uint256 result) = tryAdd(a, b);
return ternary(success, result, type(uint256).max);
}
/**
* @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.
*/
function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {
(, uint256 result) = trySub(a, b);
return result;
}
/**
* @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.
*/
function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {
(bool success, uint256 result) = tryMul(a, b);
return ternary(success, result, type(uint256).max);
}
/**
* @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
*
* IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
* However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
* one branch when needed, making this function more expensive.
*/
function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {
unchecked {
// branchless ternary works because:
// b ^ (a ^ b) == a
// b ^ 0 == b
return b ^ ((a ^ b) * SafeCast.toUint(condition));
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return ternary(a > b, a, b);
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return ternary(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 towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
Panic.panic(Panic.DIVISION_BY_ZERO);
}
// The following calculation ensures accurate ceiling division without overflow.
// Since a is non-zero, (a - 1) / b will not overflow.
// The largest possible result occurs when (a - 1) / b is type(uint256).max,
// but the largest value we can obtain is type(uint256).max - 1, which happens
// when a = type(uint256).max and b = 1.
unchecked {
return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);
}
}
/**
* @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
*
* 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 {
(uint256 high, uint256 low) = mul512(x, y);
// Handle non-overflow cases, 256 by 256 division.
if (high == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return low / denominator;
}
// Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.
if (denominator <= high) {
Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [high low].
uint256 remainder;
assembly ("memory-safe") {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
high := sub(high, gt(remainder, low))
low := sub(low, 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.
uint256 twos = denominator & (0 - denominator);
assembly ("memory-safe") {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [high low] by twos.
low := div(low, twos)
// Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from high into low.
low |= high * twos;
// Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such
// that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv ≡ 1 mod 2⁴.
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⁸
inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶
inverse *= 2 - denominator * inverse; // inverse mod 2³²
inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴
inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸
inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶
// 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²⁵⁶. Since the preconditions guarantee that the outcome is
// less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high
// is no longer required.
result = low * inverse;
return result;
}
}
/**
* @dev 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) {
return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);
}
/**
* @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.
*/
function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {
unchecked {
(uint256 high, uint256 low) = mul512(x, y);
if (high >= 1 << n) {
Panic.panic(Panic.UNDER_OVERFLOW);
}
return (high << (256 - n)) | (low >> n);
}
}
/**
* @dev Calculates x * y >> n with full precision, following the selected rounding direction.
*/
function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {
return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);
}
/**
* @dev Calculate the modular multiplicative inverse of a number in Z/nZ.
*
* If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
* If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
*
* If the input value is not inversible, 0 is returned.
*
* NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the
* inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
*/
function invMod(uint256 a, uint256 n) internal pure returns (uint256) {
unchecked {
if (n == 0) return 0;
// The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)
// Used to compute integers x and y such that: ax + ny = gcd(a, n).
// When the gcd is 1, then the inverse of a modulo n exists and it's x.
// ax + ny = 1
// ax = 1 + (-y)n
// ax ≡ 1 (mod n) # x is the inverse of a modulo n
// If the remainder is 0 the gcd is n right away.
uint256 remainder = a % n;
uint256 gcd = n;
// Therefore the initial coefficients are:
// ax + ny = gcd(a, n) = n
// 0a + 1n = n
int256 x = 0;
int256 y = 1;
while (remainder != 0) {
uint256 quotient = gcd / remainder;
(gcd, remainder) = (
// The old remainder is the next gcd to try.
remainder,
// Compute the next remainder.
// Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd
// where gcd is at most n (capped to type(uint256).max)
gcd - remainder * quotient
);
(x, y) = (
// Increment the coefficient of a.
y,
// Decrement the coefficient of n.
// Can overflow, but the result is casted to uint256 so that the
// next value of y is "wrapped around" to a value between 0 and n - 1.
x - y * int256(quotient)
);
}
if (gcd != 1) return 0; // No inverse exists.
return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.
}
}
/**
* @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
*
* From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
* prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that
* `a**(p-2)` is the modular multiplicative inverse of a in Fp.
*
* NOTE: this function does NOT check that `p` is a prime greater than `2`.
*/
function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {
unchecked {
return Math.modExp(a, p - 2, p);
}
}
/**
* @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
*
* Requirements:
* - modulus can't be zero
* - underlying staticcall to precompile must succeed
*
* IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
* sure the chain you're using it on supports the precompiled contract for modular exponentiation
* at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
* the underlying function will succeed given the lack of a revert, but the result may be incorrectly
* interpreted as 0.
*/
function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {
(bool success, uint256 result) = tryModExp(b, e, m);
if (!success) {
Panic.panic(Panic.DIVISION_BY_ZERO);
}
return result;
}
/**
* @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
* It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
* to operate modulo 0 or if the underlying precompile reverted.
*
* IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
* you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
* https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
* of a revert, but the result may be incorrectly interpreted as 0.
*/
function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {
if (m == 0) return (false, 0);
assembly ("memory-safe") {
let ptr := mload(0x40)
// | Offset | Content | Content (Hex) |
// |-----------|------------|--------------------------------------------------------------------|
// | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x60:0x7f | value of b | 0x<.............................................................b> |
// | 0x80:0x9f | value of e | 0x<.............................................................e> |
// | 0xa0:0xbf | value of m | 0x<.............................................................m> |
mstore(ptr, 0x20)
mstore(add(ptr, 0x20), 0x20)
mstore(add(ptr, 0x40), 0x20)
mstore(add(ptr, 0x60), b)
mstore(add(ptr, 0x80), e)
mstore(add(ptr, 0xa0), m)
// Given the result < m, it's guaranteed to fit in 32 bytes,
// so we can use the memory scratch space located at offset 0.
success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)
result := mload(0x00)
}
}
/**
* @dev Variant of {modExp} that supports inputs of arbitrary length.
*/
function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {
(bool success, bytes memory result) = tryModExp(b, e, m);
if (!success) {
Panic.panic(Panic.DIVISION_BY_ZERO);
}
return result;
}
/**
* @dev Variant of {tryModExp} that supports inputs of arbitrary length.
*/
function tryModExp(
bytes memory b,
bytes memory e,
bytes memory m
) internal view returns (bool success, bytes memory result) {
if (_zeroBytes(m)) return (false, new bytes(0));
uint256 mLen = m.length;
// Encode call args in result and move the free memory pointer
result = abi.encodePacked(b.length, e.length, mLen, b, e, m);
assembly ("memory-safe") {
let dataPtr := add(result, 0x20)
// Write result on top of args to avoid allocating extra memory.
success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)
// Overwrite the length.
// result.length > returndatasize() is guaranteed because returndatasize() == m.length
mstore(result, mLen)
// Set the memory pointer after the returned data.
mstore(0x40, add(dataPtr, mLen))
}
}
/**
* @dev Returns whether the provided byte array is zero.
*/
function _zeroBytes(bytes memory byteArray) private pure returns (bool) {
for (uint256 i = 0; i < byteArray.length; ++i) {
if (byteArray[i] != 0) {
return false;
}
}
return true;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* This method is based on Newton's method for computing square roots; the algorithm is restricted to only
* using integer operations.
*/
function sqrt(uint256 a) internal pure returns (uint256) {
unchecked {
// Take care of easy edge cases when a == 0 or a == 1
if (a <= 1) {
return a;
}
// In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a
// sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between
// the current value as `ε_n = | x_n - sqrt(a) |`.
//
// For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root
// of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is
// bigger than any uint256.
//
// By noticing that
// `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`
// we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar
// to the msb function.
uint256 aa = a;
uint256 xn = 1;
if (aa >= (1 << 128)) {
aa >>= 128;
xn <<= 64;
}
if (aa >= (1 << 64)) {
aa >>= 64;
xn <<= 32;
}
if (aa >= (1 << 32)) {
aa >>= 32;
xn <<= 16;
}
if (aa >= (1 << 16)) {
aa >>= 16;
xn <<= 8;
}
if (aa >= (1 << 8)) {
aa >>= 8;
xn <<= 4;
}
if (aa >= (1 << 4)) {
aa >>= 4;
xn <<= 2;
}
if (aa >= (1 << 2)) {
xn <<= 1;
}
// We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).
//
// We can refine our estimation by noticing that the middle of that interval minimizes the error.
// If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).
// This is going to be our x_0 (and ε_0)
xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)
// From here, Newton's method give us:
// x_{n+1} = (x_n + a / x_n) / 2
//
// One should note that:
// x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a
// = ((x_n² + a) / (2 * x_n))² - a
// = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a
// = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)
// = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)
// = (x_n² - a)² / (2 * x_n)²
// = ((x_n² - a) / (2 * x_n))²
// ≥ 0
// Which proves that for all n ≥ 1, sqrt(a) ≤ x_n
//
// This gives us the proof of quadratic convergence of the sequence:
// ε_{n+1} = | x_{n+1} - sqrt(a) |
// = | (x_n + a / x_n) / 2 - sqrt(a) |
// = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |
// = | (x_n - sqrt(a))² / (2 * x_n) |
// = | ε_n² / (2 * x_n) |
// = ε_n² / | (2 * x_n) |
//
// For the first iteration, we have a special case where x_0 is known:
// ε_1 = ε_0² / | (2 * x_0) |
// ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))
// ≤ 2**(2*e-4) / (3 * 2**(e-1))
// ≤ 2**(e-3) / 3
// ≤ 2**(e-3-log2(3))
// ≤ 2**(e-4.5)
//
// For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:
// ε_{n+1} = ε_n² / | (2 * x_n) |
// ≤ (2**(e-k))² / (2 * 2**(e-1))
// ≤ 2**(2*e-2*k) / 2**e
// ≤ 2**(e-2*k)
xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above
xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5
xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9
xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18
xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36
xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72
// Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision
// ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either
// sqrt(a) or sqrt(a) + 1.
return xn - SafeCast.toUint(xn > a / xn);
}
}
/**
* @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 x) internal pure returns (uint256 r) {
// If value has upper 128 bits set, log2 result is at least 128
r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
// If upper 64 bits of 128-bit half set, add 64 to result
r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
// If upper 32 bits of 64-bit half set, add 32 to result
r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
// If upper 16 bits of 32-bit half set, add 16 to result
r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
// If upper 8 bits of 16-bit half set, add 8 to result
r |= SafeCast.toUint((x >> r) > 0xff) << 3;
// If upper 4 bits of 8-bit half set, add 4 to result
r |= SafeCast.toUint((x >> r) > 0xf) << 2;
// Shifts value right by the current result and use it as an index into this lookup table:
//
// | x (4 bits) | index | table[index] = MSB position |
// |------------|---------|-----------------------------|
// | 0000 | 0 | table[0] = 0 |
// | 0001 | 1 | table[1] = 0 |
// | 0010 | 2 | table[2] = 1 |
// | 0011 | 3 | table[3] = 1 |
// | 0100 | 4 | table[4] = 2 |
// | 0101 | 5 | table[5] = 2 |
// | 0110 | 6 | table[6] = 2 |
// | 0111 | 7 | table[7] = 2 |
// | 1000 | 8 | table[8] = 3 |
// | 1001 | 9 | table[9] = 3 |
// | 1010 | 10 | table[10] = 3 |
// | 1011 | 11 | table[11] = 3 |
// | 1100 | 12 | table[12] = 3 |
// | 1101 | 13 | table[13] = 3 |
// | 1110 | 14 | table[14] = 3 |
// | 1111 | 15 | table[15] = 3 |
//
// The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.
assembly ("memory-safe") {
r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))
}
}
/**
* @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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* 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 x) internal pure returns (uint256 r) {
// If value has upper 128 bits set, log2 result is at least 128
r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
// If upper 64 bits of 128-bit half set, add 64 to result
r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
// If upper 32 bits of 64-bit half set, add 32 to result
r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
// If upper 16 bits of 32-bit half set, add 16 to result
r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
// Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8
return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);
}
/**
* @dev Return the log in base 256, 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.
pragma solidity ^0.8.20;
/**
* @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` restores this intuition by
* reverting the transaction when such an operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeCast {
/**
* @dev Value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);
/**
* @dev An int value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedIntToUint(int256 value);
/**
* @dev Value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);
/**
* @dev An uint value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedUintToInt(uint256 value);
/**
* @dev Returns the downcasted uint248 from uint256, reverting on
* overflow (when the input is greater than largest uint248).
*
* Counterpart to Solidity's `uint248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*/
function toUint248(uint256 value) internal pure returns (uint248) {
if (value > type(uint248).max) {
revert SafeCastOverflowedUintDowncast(248, value);
}
return uint248(value);
}
/**
* @dev Returns the downcasted uint240 from uint256, reverting on
* overflow (when the input is greater than largest uint240).
*
* Counterpart to Solidity's `uint240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*/
function toUint240(uint256 value) internal pure returns (uint240) {
if (value > type(uint240).max) {
revert SafeCastOverflowedUintDowncast(240, value);
}
return uint240(value);
}
/**
* @dev Returns the downcasted uint232 from uint256, reverting on
* overflow (when the input is greater than largest uint232).
*
* Counterpart to Solidity's `uint232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*/
function toUint232(uint256 value) internal pure returns (uint232) {
if (value > type(uint232).max) {
revert SafeCastOverflowedUintDowncast(232, value);
}
return uint232(value);
}
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
function toUint224(uint256 value) internal pure returns (uint224) {
if (value > type(uint224).max) {
revert SafeCastOverflowedUintDowncast(224, value);
}
return uint224(value);
}
/**
* @dev Returns the downcasted uint216 from uint256, reverting on
* overflow (when the input is greater than largest uint216).
*
* Counterpart to Solidity's `uint216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*/
function toUint216(uint256 value) internal pure returns (uint216) {
if (value > type(uint216).max) {
revert SafeCastOverflowedUintDowncast(216, value);
}
return uint216(value);
}
/**
* @dev Returns the downcasted uint208 from uint256, reverting on
* overflow (when the input is greater than largest uint208).
*
* Counterpart to Solidity's `uint208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*/
function toUint208(uint256 value) internal pure returns (uint208) {
if (value > type(uint208).max) {
revert SafeCastOverflowedUintDowncast(208, value);
}
return uint208(value);
}
/**
* @dev Returns the downcasted uint200 from uint256, reverting on
* overflow (when the input is greater than largest uint200).
*
* Counterpart to Solidity's `uint200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*/
function toUint200(uint256 value) internal pure returns (uint200) {
if (value > type(uint200).max) {
revert SafeCastOverflowedUintDowncast(200, value);
}
return uint200(value);
}
/**
* @dev Returns the downcasted uint192 from uint256, reverting on
* overflow (when the input is greater than largest uint192).
*
* Counterpart to Solidity's `uint192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*/
function toUint192(uint256 value) internal pure returns (uint192) {
if (value > type(uint192).max) {
revert SafeCastOverflowedUintDowncast(192, value);
}
return uint192(value);
}
/**
* @dev Returns the downcasted uint184 from uint256, reverting on
* overflow (when the input is greater than largest uint184).
*
* Counterpart to Solidity's `uint184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*/
function toUint184(uint256 value) internal pure returns (uint184) {
if (value > type(uint184).max) {
revert SafeCastOverflowedUintDowncast(184, value);
}
return uint184(value);
}
/**
* @dev Returns the downcasted uint176 from uint256, reverting on
* overflow (when the input is greater than largest uint176).
*
* Counterpart to Solidity's `uint176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*/
function toUint176(uint256 value) internal pure returns (uint176) {
if (value > type(uint176).max) {
revert SafeCastOverflowedUintDowncast(176, value);
}
return uint176(value);
}
/**
* @dev Returns the downcasted uint168 from uint256, reverting on
* overflow (when the input is greater than largest uint168).
*
* Counterpart to Solidity's `uint168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*/
function toUint168(uint256 value) internal pure returns (uint168) {
if (value > type(uint168).max) {
revert SafeCastOverflowedUintDowncast(168, value);
}
return uint168(value);
}
/**
* @dev Returns the downcasted uint160 from uint256, reverting on
* overflow (when the input is greater than largest uint160).
*
* Counterpart to Solidity's `uint160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*/
function toUint160(uint256 value) internal pure returns (uint160) {
if (value > type(uint160).max) {
revert SafeCastOverflowedUintDowncast(160, value);
}
return uint160(value);
}
/**
* @dev Returns the downcasted uint152 from uint256, reverting on
* overflow (when the input is greater than largest uint152).
*
* Counterpart to Solidity's `uint152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*/
function toUint152(uint256 value) internal pure returns (uint152) {
if (value > type(uint152).max) {
revert SafeCastOverflowedUintDowncast(152, value);
}
return uint152(value);
}
/**
* @dev Returns the downcasted uint144 from uint256, reverting on
* overflow (when the input is greater than largest uint144).
*
* Counterpart to Solidity's `uint144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*/
function toUint144(uint256 value) internal pure returns (uint144) {
if (value > type(uint144).max) {
revert SafeCastOverflowedUintDowncast(144, value);
}
return uint144(value);
}
/**
* @dev Returns the downcasted uint136 from uint256, reverting on
* overflow (when the input is greater than largest uint136).
*
* Counterpart to Solidity's `uint136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*/
function toUint136(uint256 value) internal pure returns (uint136) {
if (value > type(uint136).max) {
revert SafeCastOverflowedUintDowncast(136, value);
}
return uint136(value);
}
/**
* @dev Returns the downcasted uint128 from uint256, reverting on
* overflow (when the input is greater than largest uint128).
*
* Counterpart to Solidity's `uint128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*/
function toUint128(uint256 value) internal pure returns (uint128) {
if (value > type(uint128).max) {
revert SafeCastOverflowedUintDowncast(128, value);
}
return uint128(value);
}
/**
* @dev Returns the downcasted uint120 from uint256, reverting on
* overflow (when the input is greater than largest uint120).
*
* Counterpart to Solidity's `uint120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*/
function toUint120(uint256 value) internal pure returns (uint120) {
if (value > type(uint120).max) {
revert SafeCastOverflowedUintDowncast(120, value);
}
return uint120(value);
}
/**
* @dev Returns the downcasted uint112 from uint256, reverting on
* overflow (when the input is greater than largest uint112).
*
* Counterpart to Solidity's `uint112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*/
function toUint112(uint256 value) internal pure returns (uint112) {
if (value > type(uint112).max) {
revert SafeCastOverflowedUintDowncast(112, value);
}
return uint112(value);
}
/**
* @dev Returns the downcasted uint104 from uint256, reverting on
* overflow (when the input is greater than largest uint104).
*
* Counterpart to Solidity's `uint104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*/
function toUint104(uint256 value) internal pure returns (uint104) {
if (value > type(uint104).max) {
revert SafeCastOverflowedUintDowncast(104, value);
}
return uint104(value);
}
/**
* @dev Returns the downcasted uint96 from uint256, reverting on
* overflow (when the input is greater than largest uint96).
*
* Counterpart to Solidity's `uint96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*/
function toUint96(uint256 value) internal pure returns (uint96) {
if (value > type(uint96).max) {
revert SafeCastOverflowedUintDowncast(96, value);
}
return uint96(value);
}
/**
* @dev Returns the downcasted uint88 from uint256, reverting on
* overflow (when the input is greater than largest uint88).
*
* Counterpart to Solidity's `uint88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*/
function toUint88(uint256 value) internal pure returns (uint88) {
if (value > type(uint88).max) {
revert SafeCastOverflowedUintDowncast(88, value);
}
return uint88(value);
}
/**
* @dev Returns the downcasted uint80 from uint256, reverting on
* overflow (when the input is greater than largest uint80).
*
* Counterpart to Solidity's `uint80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*/
function toUint80(uint256 value) internal pure returns (uint80) {
if (value > type(uint80).max) {
revert SafeCastOverflowedUintDowncast(80, value);
}
return uint80(value);
}
/**
* @dev Returns the downcasted uint72 from uint256, reverting on
* overflow (when the input is greater than largest uint72).
*
* Counterpart to Solidity's `uint72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*/
function toUint72(uint256 value) internal pure returns (uint72) {
if (value > type(uint72).max) {
revert SafeCastOverflowedUintDowncast(72, value);
}
return uint72(value);
}
/**
* @dev Returns the downcasted uint64 from uint256, reverting on
* overflow (when the input is greater than largest uint64).
*
* Counterpart to Solidity's `uint64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*/
function toUint64(uint256 value) internal pure returns (uint64) {
if (value > type(uint64).max) {
revert SafeCastOverflowedUintDowncast(64, value);
}
return uint64(value);
}
/**
* @dev Returns the downcasted uint56 from uint256, reverting on
* overflow (when the input is greater than largest uint56).
*
* Counterpart to Solidity's `uint56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*/
function toUint56(uint256 value) internal pure returns (uint56) {
if (value > type(uint56).max) {
revert SafeCastOverflowedUintDowncast(56, value);
}
return uint56(value);
}
/**
* @dev Returns the downcasted uint48 from uint256, reverting on
* overflow (when the input is greater than largest uint48).
*
* Counterpart to Solidity's `uint48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*/
function toUint48(uint256 value) internal pure returns (uint48) {
if (value > type(uint48).max) {
revert SafeCastOverflowedUintDowncast(48, value);
}
return uint48(value);
}
/**
* @dev Returns the downcasted uint40 from uint256, reverting on
* overflow (when the input is greater than largest uint40).
*
* Counterpart to Solidity's `uint40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*/
function toUint40(uint256 value) internal pure returns (uint40) {
if (value > type(uint40).max) {
revert SafeCastOverflowedUintDowncast(40, value);
}
return uint40(value);
}
/**
* @dev Returns the downcasted uint32 from uint256, reverting on
* overflow (when the input is greater than largest uint32).
*
* Counterpart to Solidity's `uint32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*/
function toUint32(uint256 value) internal pure returns (uint32) {
if (value > type(uint32).max) {
revert SafeCastOverflowedUintDowncast(32, value);
}
return uint32(value);
}
/**
* @dev Returns the downcasted uint24 from uint256, reverting on
* overflow (when the input is greater than largest uint24).
*
* Counterpart to Solidity's `uint24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*/
function toUint24(uint256 value) internal pure returns (uint24) {
if (value > type(uint24).max) {
revert SafeCastOverflowedUintDowncast(24, value);
}
return uint24(value);
}
/**
* @dev Returns the downcasted uint16 from uint256, reverting on
* overflow (when the input is greater than largest uint16).
*
* Counterpart to Solidity's `uint16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*/
function toUint16(uint256 value) internal pure returns (uint16) {
if (value > type(uint16).max) {
revert SafeCastOverflowedUintDowncast(16, value);
}
return uint16(value);
}
/**
* @dev Returns the downcasted uint8 from uint256, reverting on
* overflow (when the input is greater than largest uint8).
*
* Counterpart to Solidity's `uint8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*/
function toUint8(uint256 value) internal pure returns (uint8) {
if (value > type(uint8).max) {
revert SafeCastOverflowedUintDowncast(8, value);
}
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*/
function toUint256(int256 value) internal pure returns (uint256) {
if (value < 0) {
revert SafeCastOverflowedIntToUint(value);
}
return uint256(value);
}
/**
* @dev Returns the downcasted int248 from int256, reverting on
* overflow (when the input is less than smallest int248 or
* greater than largest int248).
*
* Counterpart to Solidity's `int248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*/
function toInt248(int256 value) internal pure returns (int248 downcasted) {
downcasted = int248(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(248, value);
}
}
/**
* @dev Returns the downcasted int240 from int256, reverting on
* overflow (when the input is less than smallest int240 or
* greater than largest int240).
*
* Counterpart to Solidity's `int240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*/
function toInt240(int256 value) internal pure returns (int240 downcasted) {
downcasted = int240(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(240, value);
}
}
/**
* @dev Returns the downcasted int232 from int256, reverting on
* overflow (when the input is less than smallest int232 or
* greater than largest int232).
*
* Counterpart to Solidity's `int232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*/
function toInt232(int256 value) internal pure returns (int232 downcasted) {
downcasted = int232(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(232, value);
}
}
/**
* @dev Returns the downcasted int224 from int256, reverting on
* overflow (when the input is less than smallest int224 or
* greater than largest int224).
*
* Counterpart to Solidity's `int224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
function toInt224(int256 value) internal pure returns (int224 downcasted) {
downcasted = int224(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(224, value);
}
}
/**
* @dev Returns the downcasted int216 from int256, reverting on
* overflow (when the input is less than smallest int216 or
* greater than largest int216).
*
* Counterpart to Solidity's `int216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*/
function toInt216(int256 value) internal pure returns (int216 downcasted) {
downcasted = int216(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(216, value);
}
}
/**
* @dev Returns the downcasted int208 from int256, reverting on
* overflow (when the input is less than smallest int208 or
* greater than largest int208).
*
* Counterpart to Solidity's `int208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*/
function toInt208(int256 value) internal pure returns (int208 downcasted) {
downcasted = int208(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(208, value);
}
}
/**
* @dev Returns the downcasted int200 from int256, reverting on
* overflow (when the input is less than smallest int200 or
* greater than largest int200).
*
* Counterpart to Solidity's `int200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*/
function toInt200(int256 value) internal pure returns (int200 downcasted) {
downcasted = int200(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(200, value);
}
}
/**
* @dev Returns the downcasted int192 from int256, reverting on
* overflow (when the input is less than smallest int192 or
* greater than largest int192).
*
* Counterpart to Solidity's `int192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*/
function toInt192(int256 value) internal pure returns (int192 downcasted) {
downcasted = int192(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(192, value);
}
}
/**
* @dev Returns the downcasted int184 from int256, reverting on
* overflow (when the input is less than smallest int184 or
* greater than largest int184).
*
* Counterpart to Solidity's `int184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*/
function toInt184(int256 value) internal pure returns (int184 downcasted) {
downcasted = int184(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(184, value);
}
}
/**
* @dev Returns the downcasted int176 from int256, reverting on
* overflow (when the input is less than smallest int176 or
* greater than largest int176).
*
* Counterpart to Solidity's `int176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*/
function toInt176(int256 value) internal pure returns (int176 downcasted) {
downcasted = int176(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(176, value);
}
}
/**
* @dev Returns the downcasted int168 from int256, reverting on
* overflow (when the input is less than smallest int168 or
* greater than largest int168).
*
* Counterpart to Solidity's `int168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*/
function toInt168(int256 value) internal pure returns (int168 downcasted) {
downcasted = int168(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(168, value);
}
}
/**
* @dev Returns the downcasted int160 from int256, reverting on
* overflow (when the input is less than smallest int160 or
* greater than largest int160).
*
* Counterpart to Solidity's `int160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*/
function toInt160(int256 value) internal pure returns (int160 downcasted) {
downcasted = int160(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(160, value);
}
}
/**
* @dev Returns the downcasted int152 from int256, reverting on
* overflow (when the input is less than smallest int152 or
* greater than largest int152).
*
* Counterpart to Solidity's `int152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*/
function toInt152(int256 value) internal pure returns (int152 downcasted) {
downcasted = int152(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(152, value);
}
}
/**
* @dev Returns the downcasted int144 from int256, reverting on
* overflow (when the input is less than smallest int144 or
* greater than largest int144).
*
* Counterpart to Solidity's `int144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*/
function toInt144(int256 value) internal pure returns (int144 downcasted) {
downcasted = int144(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(144, value);
}
}
/**
* @dev Returns the downcasted int136 from int256, reverting on
* overflow (when the input is less than smallest int136 or
* greater than largest int136).
*
* Counterpart to Solidity's `int136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*/
function toInt136(int256 value) internal pure returns (int136 downcasted) {
downcasted = int136(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(136, value);
}
}
/**
* @dev Returns the downcasted int128 from int256, reverting on
* overflow (when the input is less than smallest int128 or
* greater than largest int128).
*
* Counterpart to Solidity's `int128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*/
function toInt128(int256 value) internal pure returns (int128 downcasted) {
downcasted = int128(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(128, value);
}
}
/**
* @dev Returns the downcasted int120 from int256, reverting on
* overflow (when the input is less than smallest int120 or
* greater than largest int120).
*
* Counterpart to Solidity's `int120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*/
function toInt120(int256 value) internal pure returns (int120 downcasted) {
downcasted = int120(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(120, value);
}
}
/**
* @dev Returns the downcasted int112 from int256, reverting on
* overflow (when the input is less than smallest int112 or
* greater than largest int112).
*
* Counterpart to Solidity's `int112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*/
function toInt112(int256 value) internal pure returns (int112 downcasted) {
downcasted = int112(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(112, value);
}
}
/**
* @dev Returns the downcasted int104 from int256, reverting on
* overflow (when the input is less than smallest int104 or
* greater than largest int104).
*
* Counterpart to Solidity's `int104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*/
function toInt104(int256 value) internal pure returns (int104 downcasted) {
downcasted = int104(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(104, value);
}
}
/**
* @dev Returns the downcasted int96 from int256, reverting on
* overflow (when the input is less than smallest int96 or
* greater than largest int96).
*
* Counterpart to Solidity's `int96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*/
function toInt96(int256 value) internal pure returns (int96 downcasted) {
downcasted = int96(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(96, value);
}
}
/**
* @dev Returns the downcasted int88 from int256, reverting on
* overflow (when the input is less than smallest int88 or
* greater than largest int88).
*
* Counterpart to Solidity's `int88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*/
function toInt88(int256 value) internal pure returns (int88 downcasted) {
downcasted = int88(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(88, value);
}
}
/**
* @dev Returns the downcasted int80 from int256, reverting on
* overflow (when the input is less than smallest int80 or
* greater than largest int80).
*
* Counterpart to Solidity's `int80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*/
function toInt80(int256 value) internal pure returns (int80 downcasted) {
downcasted = int80(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(80, value);
}
}
/**
* @dev Returns the downcasted int72 from int256, reverting on
* overflow (when the input is less than smallest int72 or
* greater than largest int72).
*
* Counterpart to Solidity's `int72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*/
function toInt72(int256 value) internal pure returns (int72 downcasted) {
downcasted = int72(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(72, value);
}
}
/**
* @dev Returns the downcasted int64 from int256, reverting on
* overflow (when the input is less than smallest int64 or
* greater than largest int64).
*
* Counterpart to Solidity's `int64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*/
function toInt64(int256 value) internal pure returns (int64 downcasted) {
downcasted = int64(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(64, value);
}
}
/**
* @dev Returns the downcasted int56 from int256, reverting on
* overflow (when the input is less than smallest int56 or
* greater than largest int56).
*
* Counterpart to Solidity's `int56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*/
function toInt56(int256 value) internal pure returns (int56 downcasted) {
downcasted = int56(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(56, value);
}
}
/**
* @dev Returns the downcasted int48 from int256, reverting on
* overflow (when the input is less than smallest int48 or
* greater than largest int48).
*
* Counterpart to Solidity's `int48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*/
function toInt48(int256 value) internal pure returns (int48 downcasted) {
downcasted = int48(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(48, value);
}
}
/**
* @dev Returns the downcasted int40 from int256, reverting on
* overflow (when the input is less than smallest int40 or
* greater than largest int40).
*
* Counterpart to Solidity's `int40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*/
function toInt40(int256 value) internal pure returns (int40 downcasted) {
downcasted = int40(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(40, value);
}
}
/**
* @dev Returns the downcasted int32 from int256, reverting on
* overflow (when the input is less than smallest int32 or
* greater than largest int32).
*
* Counterpart to Solidity's `int32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*/
function toInt32(int256 value) internal pure returns (int32 downcasted) {
downcasted = int32(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(32, value);
}
}
/**
* @dev Returns the downcasted int24 from int256, reverting on
* overflow (when the input is less than smallest int24 or
* greater than largest int24).
*
* Counterpart to Solidity's `int24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*/
function toInt24(int256 value) internal pure returns (int24 downcasted) {
downcasted = int24(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(24, value);
}
}
/**
* @dev Returns the downcasted int16 from int256, reverting on
* overflow (when the input is less than smallest int16 or
* greater than largest int16).
*
* Counterpart to Solidity's `int16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*/
function toInt16(int256 value) internal pure returns (int16 downcasted) {
downcasted = int16(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(16, value);
}
}
/**
* @dev Returns the downcasted int8 from int256, reverting on
* overflow (when the input is less than smallest int8 or
* greater than largest int8).
*
* Counterpart to Solidity's `int8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*/
function toInt8(int256 value) internal pure returns (int8 downcasted) {
downcasted = int8(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(8, value);
}
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
if (value > uint256(type(int256).max)) {
revert SafeCastOverflowedUintToInt(value);
}
return int256(value);
}
/**
* @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
*/
function toUint(bool b) internal pure returns (uint256 u) {
assembly ("memory-safe") {
u := iszero(iszero(b))
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
import {SafeCast} from "./SafeCast.sol";
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
*
* IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
* However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
* one branch when needed, making this function more expensive.
*/
function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {
unchecked {
// branchless ternary works because:
// b ^ (a ^ b) == a
// b ^ 0 == b
return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));
}
}
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return ternary(a > b, a, b);
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return ternary(a < b, a, b);
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson.
// Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,
// taking advantage of the most significant (or "sign" bit) in two's complement representation.
// This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,
// the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).
int256 mask = n >> 255;
// A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.
return uint256((n + mask) ^ mask);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides tracking nonces for addresses. Nonces will only increment.
*/
abstract contract Nonces {
/**
* @dev The nonce used for an `account` is not the expected current nonce.
*/
error InvalidAccountNonce(address account, uint256 currentNonce);
mapping(address account => uint256) private _nonces;
/**
* @dev Returns the next unused nonce for an address.
*/
function nonces(address owner) public view virtual returns (uint256) {
return _nonces[owner];
}
/**
* @dev Consumes a nonce.
*
* Returns the current value and increments nonce.
*/
function _useNonce(address owner) internal virtual returns (uint256) {
// For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
// decremented or reset. This guarantees that the nonce never overflows.
unchecked {
// It is important to do x++ and not ++x here.
return _nonces[owner]++;
}
}
/**
* @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
*/
function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
uint256 current = _useNonce(owner);
if (nonce != current) {
revert InvalidAccountNonce(owner, current);
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)
pragma solidity ^0.8.20;
/**
* @dev Helper library for emitting standardized panic codes.
*
* ```solidity
* contract Example {
* using Panic for uint256;
*
* // Use any of the declared internal constants
* function foo() { Panic.GENERIC.panic(); }
*
* // Alternatively
* function foo() { Panic.panic(Panic.GENERIC); }
* }
* ```
*
* Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
*
* _Available since v5.1._
*/
// slither-disable-next-line unused-state
library Panic {
/// @dev generic / unspecified error
uint256 internal constant GENERIC = 0x00;
/// @dev used by the assert() builtin
uint256 internal constant ASSERT = 0x01;
/// @dev arithmetic underflow or overflow
uint256 internal constant UNDER_OVERFLOW = 0x11;
/// @dev division or modulo by zero
uint256 internal constant DIVISION_BY_ZERO = 0x12;
/// @dev enum conversion error
uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
/// @dev invalid encoding in storage
uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
/// @dev empty array pop
uint256 internal constant EMPTY_ARRAY_POP = 0x31;
/// @dev array out of bounds access
uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
/// @dev resource error (too large allocation or too large array)
uint256 internal constant RESOURCE_ERROR = 0x41;
/// @dev calling invalid internal function
uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;
/// @dev Reverts with a panic code. Recommended to use with
/// the internal constants with predefined codes.
function panic(uint256 code) internal pure {
assembly ("memory-safe") {
mstore(0x00, 0x4e487b71)
mstore(0x20, code)
revert(0x1c, 0x24)
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
assembly ("memory-safe") {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using
* {toShortStringWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SafeCast} from "./math/SafeCast.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
using SafeCast for *;
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
uint256 private constant SPECIAL_CHARS_LOOKUP =
(1 << 0x08) | // backspace
(1 << 0x09) | // tab
(1 << 0x0a) | // newline
(1 << 0x0c) | // form feed
(1 << 0x0d) | // carriage return
(1 << 0x22) | // double quote
(1 << 0x5c); // backslash
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev The string being parsed contains characters that are not in scope of the given base.
*/
error StringsInvalidChar();
/**
* @dev The string being parsed is not a properly formatted address.
*/
error StringsInvalidAddressFormat();
/**
* @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;
assembly ("memory-safe") {
ptr := add(add(buffer, 0x20), length)
}
while (true) {
ptr--;
assembly ("memory-safe") {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @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) {
uint256 localValue = value;
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] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
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);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal
* representation, according to EIP-55.
*/
function toChecksumHexString(address addr) internal pure returns (string memory) {
bytes memory buffer = bytes(toHexString(addr));
// hash the hex part of buffer (skip length + 2 bytes, length 40)
uint256 hashValue;
assembly ("memory-safe") {
hashValue := shr(96, keccak256(add(buffer, 0x22), 40))
}
for (uint256 i = 41; i > 1; --i) {
// possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)
if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {
// case shift by xoring with 0x20
buffer[i] ^= 0x20;
}
hashValue >>= 4;
}
return string(buffer);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
/**
* @dev Parse a decimal string and returns the value as a `uint256`.
*
* Requirements:
* - The string must be formatted as `[0-9]*`
* - The result must fit into an `uint256` type
*/
function parseUint(string memory input) internal pure returns (uint256) {
return parseUint(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and
* `end` (excluded).
*
* Requirements:
* - The substring must be formatted as `[0-9]*`
* - The result must fit into an `uint256` type
*/
function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {
(bool success, uint256 value) = tryParseUint(input, begin, end);
if (!success) revert StringsInvalidChar();
return value;
}
/**
* @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.
*
* NOTE: This function will revert if the result does not fit in a `uint256`.
*/
function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {
return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid
* character.
*
* NOTE: This function will revert if the result does not fit in a `uint256`.
*/
function tryParseUint(
string memory input,
uint256 begin,
uint256 end
) internal pure returns (bool success, uint256 value) {
if (end > bytes(input).length || begin > end) return (false, 0);
return _tryParseUintUncheckedBounds(input, begin, end);
}
/**
* @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that
* `begin <= end <= input.length`. Other inputs would result in undefined behavior.
*/
function _tryParseUintUncheckedBounds(
string memory input,
uint256 begin,
uint256 end
) private pure returns (bool success, uint256 value) {
bytes memory buffer = bytes(input);
uint256 result = 0;
for (uint256 i = begin; i < end; ++i) {
uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));
if (chr > 9) return (false, 0);
result *= 10;
result += chr;
}
return (true, result);
}
/**
* @dev Parse a decimal string and returns the value as a `int256`.
*
* Requirements:
* - The string must be formatted as `[-+]?[0-9]*`
* - The result must fit in an `int256` type.
*/
function parseInt(string memory input) internal pure returns (int256) {
return parseInt(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and
* `end` (excluded).
*
* Requirements:
* - The substring must be formatted as `[-+]?[0-9]*`
* - The result must fit in an `int256` type.
*/
function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {
(bool success, int256 value) = tryParseInt(input, begin, end);
if (!success) revert StringsInvalidChar();
return value;
}
/**
* @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if
* the result does not fit in a `int256`.
*
* NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.
*/
function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {
return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);
}
uint256 private constant ABS_MIN_INT256 = 2 ** 255;
/**
* @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid
* character or if the result does not fit in a `int256`.
*
* NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.
*/
function tryParseInt(
string memory input,
uint256 begin,
uint256 end
) internal pure returns (bool success, int256 value) {
if (end > bytes(input).length || begin > end) return (false, 0);
return _tryParseIntUncheckedBounds(input, begin, end);
}
/**
* @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that
* `begin <= end <= input.length`. Other inputs would result in undefined behavior.
*/
function _tryParseIntUncheckedBounds(
string memory input,
uint256 begin,
uint256 end
) private pure returns (bool success, int256 value) {
bytes memory buffer = bytes(input);
// Check presence of a negative sign.
bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty
bool positiveSign = sign == bytes1("+");
bool negativeSign = sign == bytes1("-");
uint256 offset = (positiveSign || negativeSign).toUint();
(bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);
if (absSuccess && absValue < ABS_MIN_INT256) {
return (true, negativeSign ? -int256(absValue) : int256(absValue));
} else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {
return (true, type(int256).min);
} else return (false, 0);
}
/**
* @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as a `uint256`.
*
* Requirements:
* - The string must be formatted as `(0x)?[0-9a-fA-F]*`
* - The result must fit in an `uint256` type.
*/
function parseHexUint(string memory input) internal pure returns (uint256) {
return parseHexUint(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and
* `end` (excluded).
*
* Requirements:
* - The substring must be formatted as `(0x)?[0-9a-fA-F]*`
* - The result must fit in an `uint256` type.
*/
function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {
(bool success, uint256 value) = tryParseHexUint(input, begin, end);
if (!success) revert StringsInvalidChar();
return value;
}
/**
* @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.
*
* NOTE: This function will revert if the result does not fit in a `uint256`.
*/
function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {
return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an
* invalid character.
*
* NOTE: This function will revert if the result does not fit in a `uint256`.
*/
function tryParseHexUint(
string memory input,
uint256 begin,
uint256 end
) internal pure returns (bool success, uint256 value) {
if (end > bytes(input).length || begin > end) return (false, 0);
return _tryParseHexUintUncheckedBounds(input, begin, end);
}
/**
* @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that
* `begin <= end <= input.length`. Other inputs would result in undefined behavior.
*/
function _tryParseHexUintUncheckedBounds(
string memory input,
uint256 begin,
uint256 end
) private pure returns (bool success, uint256 value) {
bytes memory buffer = bytes(input);
// skip 0x prefix if present
bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty
uint256 offset = hasPrefix.toUint() * 2;
uint256 result = 0;
for (uint256 i = begin + offset; i < end; ++i) {
uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));
if (chr > 15) return (false, 0);
result *= 16;
unchecked {
// Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).
// This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.
result += chr;
}
}
return (true, result);
}
/**
* @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as an `address`.
*
* Requirements:
* - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`
*/
function parseAddress(string memory input) internal pure returns (address) {
return parseAddress(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and
* `end` (excluded).
*
* Requirements:
* - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`
*/
function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {
(bool success, address value) = tryParseAddress(input, begin, end);
if (!success) revert StringsInvalidAddressFormat();
return value;
}
/**
* @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly
* formatted address. See {parseAddress-string} requirements.
*/
function tryParseAddress(string memory input) internal pure returns (bool success, address value) {
return tryParseAddress(input, 0, bytes(input).length);
}
/**
* @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly
* formatted address. See {parseAddress-string-uint256-uint256} requirements.
*/
function tryParseAddress(
string memory input,
uint256 begin,
uint256 end
) internal pure returns (bool success, address value) {
if (end > bytes(input).length || begin > end) return (false, address(0));
bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty
uint256 expectedLength = 40 + hasPrefix.toUint() * 2;
// check that input is the correct length
if (end - begin == expectedLength) {
// length guarantees that this does not overflow, and value is at most type(uint160).max
(bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);
return (s, address(uint160(v)));
} else {
return (false, address(0));
}
}
function _tryParseChr(bytes1 chr) private pure returns (uint8) {
uint8 value = uint8(chr);
// Try to parse `chr`:
// - Case 1: [0-9]
// - Case 2: [a-f]
// - Case 3: [A-F]
// - otherwise not supported
unchecked {
if (value > 47 && value < 58) value -= 48;
else if (value > 96 && value < 103) value -= 87;
else if (value > 64 && value < 71) value -= 55;
else return type(uint8).max;
}
return value;
}
/**
* @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.
*
* WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.
*
* NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of
* RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode
* characters that are not in this range, but other tooling may provide different results.
*/
function escapeJSON(string memory input) internal pure returns (string memory) {
bytes memory buffer = bytes(input);
bytes memory output = new bytes(2 * buffer.length); // worst case scenario
uint256 outputLength = 0;
for (uint256 i; i < buffer.length; ++i) {
bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));
if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {
output[outputLength++] = "\\";
if (char == 0x08) output[outputLength++] = "b";
else if (char == 0x09) output[outputLength++] = "t";
else if (char == 0x0a) output[outputLength++] = "n";
else if (char == 0x0c) output[outputLength++] = "f";
else if (char == 0x0d) output[outputLength++] = "r";
else if (char == 0x5c) output[outputLength++] = "\\";
else if (char == 0x22) {
// solhint-disable-next-line quotes
output[outputLength++] = '"';
}
} else {
output[outputLength++] = char;
}
}
// write the actual length and deallocate unused memory
assembly ("memory-safe") {
mstore(output, outputLength)
mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))
}
return string(output);
}
/**
* @dev Reads a bytes32 from a bytes array without bounds checking.
*
* NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the
* assembly block as such would prevent some optimizations.
*/
function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {
// This is not memory safe in the general case, but all calls to this private function are within bounds.
assembly ("memory-safe") {
value := mload(add(add(buffer, 0x20), offset))
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/structs/Checkpoints.sol)
// This file was procedurally generated from scripts/generate/templates/Checkpoints.js.
pragma solidity ^0.8.20;
import {Math} from "../math/Math.sol";
/**
* @dev This library defines the `Trace*` struct, for checkpointing values as they change at different points in
* time, and later looking up past values by block number. See {Votes} as an example.
*
* To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new
* checkpoint for the current transaction block using the {push} function.
*/
library Checkpoints {
/**
* @dev A value was attempted to be inserted on a past checkpoint.
*/
error CheckpointUnorderedInsertion();
struct Trace224 {
Checkpoint224[] _checkpoints;
}
struct Checkpoint224 {
uint32 _key;
uint224 _value;
}
/**
* @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint.
*
* Returns previous value and new value.
*
* IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the
* library.
*/
function push(
Trace224 storage self,
uint32 key,
uint224 value
) internal returns (uint224 oldValue, uint224 newValue) {
return _insert(self._checkpoints, key, value);
}
/**
* @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
* there is none.
*/
function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {
uint256 len = self._checkpoints.length;
uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);
return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*/
function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) {
uint256 len = self._checkpoints.length;
uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*
* NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high
* keys).
*/
function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) {
uint256 len = self._checkpoints.length;
uint256 low = 0;
uint256 high = len;
if (len > 5) {
uint256 mid = len - Math.sqrt(len);
if (key < _unsafeAccess(self._checkpoints, mid)._key) {
high = mid;
} else {
low = mid + 1;
}
}
uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
*/
function latest(Trace224 storage self) internal view returns (uint224) {
uint256 pos = self._checkpoints.length;
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
* in the most recent checkpoint.
*/
function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) {
uint256 pos = self._checkpoints.length;
if (pos == 0) {
return (false, 0, 0);
} else {
Checkpoint224 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1);
return (true, ckpt._key, ckpt._value);
}
}
/**
* @dev Returns the number of checkpoints.
*/
function length(Trace224 storage self) internal view returns (uint256) {
return self._checkpoints.length;
}
/**
* @dev Returns checkpoint at given position.
*/
function at(Trace224 storage self, uint32 pos) internal view returns (Checkpoint224 memory) {
return self._checkpoints[pos];
}
/**
* @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
* or by updating the last one.
*/
function _insert(
Checkpoint224[] storage self,
uint32 key,
uint224 value
) private returns (uint224 oldValue, uint224 newValue) {
uint256 pos = self.length;
if (pos > 0) {
Checkpoint224 storage last = _unsafeAccess(self, pos - 1);
uint32 lastKey = last._key;
uint224 lastValue = last._value;
// Checkpoint keys must be non-decreasing.
if (lastKey > key) {
revert CheckpointUnorderedInsertion();
}
// Update or push new checkpoint
if (lastKey == key) {
last._value = value;
} else {
self.push(Checkpoint224({_key: key, _value: value}));
}
return (lastValue, value);
} else {
self.push(Checkpoint224({_key: key, _value: value}));
return (0, value);
}
}
/**
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _upperBinaryLookup(
Checkpoint224[] storage self,
uint32 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key > key) {
high = mid;
} else {
low = mid + 1;
}
}
return high;
}
/**
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _lowerBinaryLookup(
Checkpoint224[] storage self,
uint32 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key < key) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
/**
* @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
*/
function _unsafeAccess(
Checkpoint224[] storage self,
uint256 pos
) private pure returns (Checkpoint224 storage result) {
assembly {
mstore(0, self.slot)
result.slot := add(keccak256(0, 0x20), pos)
}
}
struct Trace208 {
Checkpoint208[] _checkpoints;
}
struct Checkpoint208 {
uint48 _key;
uint208 _value;
}
/**
* @dev Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint.
*
* Returns previous value and new value.
*
* IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the
* library.
*/
function push(
Trace208 storage self,
uint48 key,
uint208 value
) internal returns (uint208 oldValue, uint208 newValue) {
return _insert(self._checkpoints, key, value);
}
/**
* @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
* there is none.
*/
function lowerLookup(Trace208 storage self, uint48 key) internal view returns (uint208) {
uint256 len = self._checkpoints.length;
uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);
return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*/
function upperLookup(Trace208 storage self, uint48 key) internal view returns (uint208) {
uint256 len = self._checkpoints.length;
uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*
* NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high
* keys).
*/
function upperLookupRecent(Trace208 storage self, uint48 key) internal view returns (uint208) {
uint256 len = self._checkpoints.length;
uint256 low = 0;
uint256 high = len;
if (len > 5) {
uint256 mid = len - Math.sqrt(len);
if (key < _unsafeAccess(self._checkpoints, mid)._key) {
high = mid;
} else {
low = mid + 1;
}
}
uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
*/
function latest(Trace208 storage self) internal view returns (uint208) {
uint256 pos = self._checkpoints.length;
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
* in the most recent checkpoint.
*/
function latestCheckpoint(Trace208 storage self) internal view returns (bool exists, uint48 _key, uint208 _value) {
uint256 pos = self._checkpoints.length;
if (pos == 0) {
return (false, 0, 0);
} else {
Checkpoint208 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1);
return (true, ckpt._key, ckpt._value);
}
}
/**
* @dev Returns the number of checkpoints.
*/
function length(Trace208 storage self) internal view returns (uint256) {
return self._checkpoints.length;
}
/**
* @dev Returns checkpoint at given position.
*/
function at(Trace208 storage self, uint32 pos) internal view returns (Checkpoint208 memory) {
return self._checkpoints[pos];
}
/**
* @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
* or by updating the last one.
*/
function _insert(
Checkpoint208[] storage self,
uint48 key,
uint208 value
) private returns (uint208 oldValue, uint208 newValue) {
uint256 pos = self.length;
if (pos > 0) {
Checkpoint208 storage last = _unsafeAccess(self, pos - 1);
uint48 lastKey = last._key;
uint208 lastValue = last._value;
// Checkpoint keys must be non-decreasing.
if (lastKey > key) {
revert CheckpointUnorderedInsertion();
}
// Update or push new checkpoint
if (lastKey == key) {
last._value = value;
} else {
self.push(Checkpoint208({_key: key, _value: value}));
}
return (lastValue, value);
} else {
self.push(Checkpoint208({_key: key, _value: value}));
return (0, value);
}
}
/**
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _upperBinaryLookup(
Checkpoint208[] storage self,
uint48 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key > key) {
high = mid;
} else {
low = mid + 1;
}
}
return high;
}
/**
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _lowerBinaryLookup(
Checkpoint208[] storage self,
uint48 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key < key) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
/**
* @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
*/
function _unsafeAccess(
Checkpoint208[] storage self,
uint256 pos
) private pure returns (Checkpoint208 storage result) {
assembly {
mstore(0, self.slot)
result.slot := add(keccak256(0, 0x20), pos)
}
}
struct Trace160 {
Checkpoint160[] _checkpoints;
}
struct Checkpoint160 {
uint96 _key;
uint160 _value;
}
/**
* @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint.
*
* Returns previous value and new value.
*
* IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the
* library.
*/
function push(
Trace160 storage self,
uint96 key,
uint160 value
) internal returns (uint160 oldValue, uint160 newValue) {
return _insert(self._checkpoints, key, value);
}
/**
* @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if
* there is none.
*/
function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {
uint256 len = self._checkpoints.length;
uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len);
return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*/
function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) {
uint256 len = self._checkpoints.length;
uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero
* if there is none.
*
* NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high
* keys).
*/
function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) {
uint256 len = self._checkpoints.length;
uint256 low = 0;
uint256 high = len;
if (len > 5) {
uint256 mid = len - Math.sqrt(len);
if (key < _unsafeAccess(self._checkpoints, mid)._key) {
high = mid;
} else {
low = mid + 1;
}
}
uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high);
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints.
*/
function latest(Trace160 storage self) internal view returns (uint160) {
uint256 pos = self._checkpoints.length;
return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value;
}
/**
* @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
* in the most recent checkpoint.
*/
function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) {
uint256 pos = self._checkpoints.length;
if (pos == 0) {
return (false, 0, 0);
} else {
Checkpoint160 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1);
return (true, ckpt._key, ckpt._value);
}
}
/**
* @dev Returns the number of checkpoints.
*/
function length(Trace160 storage self) internal view returns (uint256) {
return self._checkpoints.length;
}
/**
* @dev Returns checkpoint at given position.
*/
function at(Trace160 storage self, uint32 pos) internal view returns (Checkpoint160 memory) {
return self._checkpoints[pos];
}
/**
* @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
* or by updating the last one.
*/
function _insert(
Checkpoint160[] storage self,
uint96 key,
uint160 value
) private returns (uint160 oldValue, uint160 newValue) {
uint256 pos = self.length;
if (pos > 0) {
Checkpoint160 storage last = _unsafeAccess(self, pos - 1);
uint96 lastKey = last._key;
uint160 lastValue = last._value;
// Checkpoint keys must be non-decreasing.
if (lastKey > key) {
revert CheckpointUnorderedInsertion();
}
// Update or push new checkpoint
if (lastKey == key) {
last._value = value;
} else {
self.push(Checkpoint160({_key: key, _value: value}));
}
return (lastValue, value);
} else {
self.push(Checkpoint160({_key: key, _value: value}));
return (0, value);
}
}
/**
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _upperBinaryLookup(
Checkpoint160[] storage self,
uint96 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key > key) {
high = mid;
} else {
low = mid + 1;
}
}
return high;
}
/**
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
function _lowerBinaryLookup(
Checkpoint160[] storage self,
uint96 key,
uint256 low,
uint256 high
) private view returns (uint256) {
while (low < high) {
uint256 mid = Math.average(low, high);
if (_unsafeAccess(self, mid)._key < key) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
/**
* @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
*/
function _unsafeAccess(
Checkpoint160[] storage self,
uint256 pos
) private pure returns (Checkpoint160 storage result) {
assembly {
mstore(0, self.slot)
result.slot := add(keccak256(0, 0x20), pos)
}
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/types/Time.sol)
pragma solidity ^0.8.20;
import {Math} from "../math/Math.sol";
import {SafeCast} from "../math/SafeCast.sol";
/**
* @dev This library provides helpers for manipulating time-related objects.
*
* It uses the following types:
* - `uint48` for timepoints
* - `uint32` for durations
*
* While the library doesn't provide specific types for timepoints and duration, it does provide:
* - a `Delay` type to represent duration that can be programmed to change value automatically at a given point
* - additional helper functions
*/
library Time {
using Time for *;
/**
* @dev Get the block timestamp as a Timepoint.
*/
function timestamp() internal view returns (uint48) {
return SafeCast.toUint48(block.timestamp);
}
/**
* @dev Get the block number as a Timepoint.
*/
function blockNumber() internal view returns (uint48) {
return SafeCast.toUint48(block.number);
}
// ==================================================== Delay =====================================================
/**
* @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the
* future. The "effect" timepoint describes when the transitions happens from the "old" value to the "new" value.
* This allows updating the delay applied to some operation while keeping some guarantees.
*
* In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for
* some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set
* the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should
* still apply for some time.
*
*
* The `Delay` type is 112 bits long, and packs the following:
*
* ```
* | [uint48]: effect date (timepoint)
* | | [uint32]: value before (duration)
* ↓ ↓ ↓ [uint32]: value after (duration)
* 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC
* ```
*
* NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently
* supported.
*/
type Delay is uint112;
/**
* @dev Wrap a duration into a Delay to add the one-step "update in the future" feature
*/
function toDelay(uint32 duration) internal pure returns (Delay) {
return Delay.wrap(duration);
}
/**
* @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled
* change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered.
*/
function _getFullAt(
Delay self,
uint48 timepoint
) private pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {
(valueBefore, valueAfter, effect) = self.unpack();
return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect);
}
/**
* @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the
* effect timepoint is 0, then the pending value should not be considered.
*/
function getFull(Delay self) internal view returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {
return _getFullAt(self, timestamp());
}
/**
* @dev Get the current value.
*/
function get(Delay self) internal view returns (uint32) {
(uint32 delay, , ) = self.getFull();
return delay;
}
/**
* @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to
* enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the
* new delay becomes effective.
*/
function withUpdate(
Delay self,
uint32 newValue,
uint32 minSetback
) internal view returns (Delay updatedDelay, uint48 effect) {
uint32 value = self.get();
uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0));
effect = timestamp() + setback;
return (pack(value, newValue, effect), effect);
}
/**
* @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint).
*/
function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {
uint112 raw = Delay.unwrap(self);
valueAfter = uint32(raw);
valueBefore = uint32(raw >> 32);
effect = uint48(raw >> 64);
return (valueBefore, valueAfter, effect);
}
/**
* @dev pack the components into a Delay object.
*/
function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) {
return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter));
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
return address(0);
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library Assert {
event AssertionEvent(
bool passed,
string message,
string methodName
);
event AssertionEventUint(
bool passed,
string message,
string methodName,
uint256 returned,
uint256 expected
);
event AssertionEventInt(
bool passed,
string message,
string methodName,
int256 returned,
int256 expected
);
event AssertionEventBool(
bool passed,
string message,
string methodName,
bool returned,
bool expected
);
event AssertionEventAddress(
bool passed,
string message,
string methodName,
address returned,
address expected
);
event AssertionEventBytes32(
bool passed,
string message,
string methodName,
bytes32 returned,
bytes32 expected
);
event AssertionEventString(
bool passed,
string message,
string methodName,
string returned,
string expected
);
event AssertionEventUintInt(
bool passed,
string message,
string methodName,
uint256 returned,
int256 expected
);
event AssertionEventIntUint(
bool passed,
string message,
string methodName,
int256 returned,
uint256 expected
);
function ok(bool a, string memory message) public returns (bool result) {
result = a;
emit AssertionEvent(result, message, "ok");
}
function equal(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventUint(result, message, "equal", a, b);
}
function equal(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventInt(result, message, "equal", a, b);
}
function equal(bool a, bool b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBool(result, message, "equal", a, b);
}
// TODO: only for certain versions of solc
//function equal(fixed a, fixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function equal(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
function equal(address a, address b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventAddress(result, message, "equal", a, b);
}
function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBytes32(result, message, "equal", a, b);
}
function equal(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "equal", a, b);
}
function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventUint(result, message, "notEqual", a, b);
}
function notEqual(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventInt(result, message, "notEqual", a, b);
}
function notEqual(bool a, bool b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBool(result, message, "notEqual", a, b);
}
// TODO: only for certain versions of solc
//function notEqual(fixed a, fixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
function notEqual(address a, address b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventAddress(result, message, "notEqual", a, b);
}
function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBytes32(result, message, "notEqual", a, b);
}
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "notEqual", a, b);
}
/*----------------- Greater than --------------------*/
function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventUint(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventInt(result, message, "greaterThan", a, b);
}
// TODO: safely compare between uint and int
function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative uint "a" always greater
result = true;
} else {
result = (a > uint(b));
}
emit AssertionEventUintInt(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative uint "b" always greater
result = false;
} else {
result = (uint(a) > b);
}
emit AssertionEventIntUint(result, message, "greaterThan", a, b);
}
/*----------------- Lesser than --------------------*/
function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventUint(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventInt(result, message, "lesserThan", a, b);
}
// TODO: safely compare between uint and int
function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative int "b" always lesser
result = false;
} else {
result = (a < uint(b));
}
emit AssertionEventUintInt(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative int "a" always lesser
result = true;
} else {
result = (uint(a) < b);
}
emit AssertionEventIntUint(result, message, "lesserThan", a, b);
}
}
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
ref: refs/heads/main
DIRCh��p [�@h��p [�@���ƴ��i�/��֚i�Hk��y�$.deps/remix-tests/remix_accounts.solh��p �@h��p �@�������b 2�H"��(���,�Dz!.deps/remix-tests/remix_tests.solh��q/�A@h��q/�A@������o#q{K���Sc��X�W�n.prettierrc.jsonh��q/4�h��q/4����m���8JD� �wP?���M�
README.txth��q.P@h��q.P@���+��^x;n��G�g�f6�contracts/1_Storage.solh��q.n��h��q.n�����tz����¬����a�\i�contracts/2_Owner.solh��q.�@h��q.�@���HV��Qh��s��#(F��rcontracts/3_Ballot.solh��q/���h��q/������T3�<W�p�%@������(remix.config.jsonh��q.�_�h��q.�_�����Q=Imv8�n{s9'/�:pSB�6scripts/deploy_with_ethers.tsh��q.���h��q.�������ܠ��ݾ?87G�k�)P�.�scripts/deploy_with_web3.tsh��q.�&@h��q.�&@�������޶�Z��͂���WZscripts/ethers-lib.tsh��q.�h�h��q.�h�������e�N��;&��P�]��scripts/web3-lib.tsh��q.��h��q.������In��ˠ/�ds�9���5��[tests/Ballot_test.solh��q//@h��q//@�����7�Ûv�%��1���$�s��tests/storage.test.js2�x1O�7؉�{X�r��F
x���A
�0E]��$��$-".�x�!��H�J��xz�.ܻ�o��K)I����� �Zd�(z҃FC6�ib�`�w&���^Q���Bn�D��� �߾̅R>���]?��G��^�U�^
�%�[M�(�Va�^ \���7�r��E}L1G�
x�+)JMU��d040031Q(J�ͬ�OLN�/�+)�+��a��eaf�~�k�2'xpd��_�EuIj1T鎝Ә��^y(}=��c� ���7�U(l
x�K��OR�0a��RPP*(��JM.Q�RP*J�ͬpIMK,�)Q�I��g��$� � ��.�p�z�%�E���z�E�J\����
x��Q[k�0ݳ��O6$��<l��A�` ��X e��k�%O��4�����d��窣\��7/�׫���+U��4�\�a�Q�����j�i4Nnk o�*��~���"ŻT\�4 T�X����ɳ��0C��+�10��l�֒U!��C�T0���Xwjq4��++�Ia���z�#*D���dq�Ajmy�#���W� �|���q��^�/�&��h�G��l'���5+k���:��Q��͵*�t�t߉�hZ_EC`Ҕ��L/�8Ύ�i�0�ZD'f��98�STT��Q�(�] ������F�=Ϊ�?t�)J'���XЯV�脺;���Ze8J���Z� eJzD
_�V�� \�q��C�ucuygg�ar<JF��{��j7��5q��7�[�L��hw�<��ZO����հ\"�<�>�5�
x�M��J�@E}�W\�Є���RhA�i|��f���솝 ZJ�]����0Ý3�Ni}����&����`z�V%a`� ��!-!.��P ��׀����'Ú2�p̢<dz%ńN<i�w���8˯ ���gp��ƨGAI��087^�?���U�C�M�
�5����~p1���"} :r|=���G���@����I�]��eYD��z����"�/�W֔�(J�F�b��)$��� �`[�/ed�%�9���o��[ʬo�UU��7�=]�<9��3��"��߱�6e1��&itN����3
x��X�۸�g���b{�h7w���A�{u��6h���b����Ć"U���=��^ )�9\Q}�4/��73�
����x���nn���o���G^�4��Bi���~?���ŗ��l�iV� �����7���[����Cq���n��a��G˭@�BY���=ܵ���5�W��:�J4�P��� }A�P`�,Wr�7�RI�Yi�@�eps�n��R0�H<@�H�#�c�phx��� Y���
vJÞiζ fQ���:��i4(-00\��y��Xݗ>Л`==���ƮI���V�}ۓ�
�����*%��j� �;���؆Y�P%� ��:z���U�&W��t����r;I����
A��6����S�y�=�2��y��ɓ�"K梷�e�%������I���)(kۀU��Dm� �v��L�-��R�8������8�$�/��-��l�G`����Y�zt~����>1��ֽ�EߑH�Ft�S?~�z�C>���hL�����
^B�0�}�ֳKn,�8$�ˋHj��4s����}����NÉ+(�1jY�qY/�5��>���.��f4� TG�Z^2!�/ �V��fG:�<�:�Z����(6f� �a=.��Hg�U���o��Rc��Q�_X�f^ :�Y �WHC\��@~�~K%��J/B2�?@����\�2��$l���ԅAY�^ށ� �CPa/��s���
��i��UR�����L5Щ�����dE�nS��t�UT�"X 4�4 ��6p�_�>(|���?��#ha�KQO�y0�����L�Lo�?D�]o�EQ����u��������"c�H�ͨ�!����~�V't������r9&�S��I��#�������U�1* ���C?Q�Iq��F��;�<I���p��Q;�"+�]/K�KP�=�� x���{��G�Z��u2|ǵ��t�S�'E?k�w�5� �g�gǜ��08_>b�;,�K�8�ʡ���o���Ġ{t$:��;۠&O1Y暨hܣ�X���n< �Q��-�J��.A�
����Q��Y����J*J�c�4f����v%0����W�H 5�y�������R��l�.��XZq�T�qmKE�
�_ �� �"��)#>v�I7�۪���E�G5��E��#��f��b^*W�|MQ��L�s��ؒ�9��Y@X��P��e��}jt>>}^I.6B�nWp�!�0sZ���� Ld�'xps}����ap��i�!��Y�V��7�N�L�
����pX�/��y1
�T��^Kw�Q�8|�a��1!���$y8������;���������{u&bς��y�e�p#�U�m�mW�P�^�#��7���߶LW.4 3�6��E���,$�(Q3�C��P��G}��0O�>���w~�ս��3`�_�� �+ �rg����� 7^rB��P姩�� �̸�$;�ۜ�`<-F2��K<n{�g���X���`X��-\ۗ����g1�C�B�b���o�v����r:�X5�kʕ�<X�w�~zZg7+���w��5�gr�{'3J�e��4�Pr�܏�)�|u@I� n!�(K�a�_9�C���Ŋ}�����x�e�0�G���q���K���U]:�0ex� pi���������P�*1�� �܉83��!f���jJ]q߈ݤz\��/>��y�[�{�"��2<L"( ���� F�hO��Rzy����3&}����v�` .K�Wt��<�]Oݒ~�=f����_�����*#y�)/ʯ;� �W�H~� ���ܟ���Zܛ���[��Ed3�4/޻dr�KCa�55�ly�@���
l��XoUˬ�4p��/ �c"�����ӥ�v=e�|�R�;H�#�}��i��4��MHP.G`�N����r��q̾ �% 'b�u �ä��&��Ss�E��z�}�H+��ݿ������ߝ����I��H�>Q:e��a��/��q�@�S=]��I�0!̙ � ��2�5%�nFa\bu!�~AmP�K%�t��ѷ�x�d_�ϷH��r�ě�D�4MRS��x�cq�����tl�
x�+)JMU0�`01000P(J�ͬ�-I-.)f0J\!:��yi�h����Ԟ�ن�Y<
x�uT�n�6�_�N�E�"M{ �i�i���v��%�46'�HuHE�������Dq�͛7oX[_���.�[�>��������m���������J�5u|@K;=؈��K�uC��^(�� �+��X�u��h�$v,!"rGP���h|��H-F���\�@���:�┷5$-�cKt����.׻cKXz�D���pV��.jv�hY��^�•R�t)������޶��I��L�]�RMK�d���zK�S�~�P�F��H7o%w~ĩ��n�=Zꭟ���*�Ǥ z��Q���+uY����zG�x�-� �6#��ik},���>����2p��=�"+�67����&�H����%���ji4���Ywi6_W��u,F�/��P@�EC��r-:ͨR�n�Ԍ�%�����S����"��ՑrƱ��a'�;���X�=�&*��Wn3@�2$�@�~H�t�xi�����/K�4S|L~y\��� ^��.�ÓR�s�2�7�c6<h,/N�}��?���<���qn=dpG��{�Xn^���< t�
-���c��������$��}9�K�k+�� 5��`Km�> �������B�=iIe%� ��c�m�ԃ%ҺG*!���B��� C�>�M��;N�N;G���ߤS\���&;%79?�o�b�iIK/�<�iT%¨�ۏ%��D7��FC�\�'�������Y,?� �~�&~���g7S�WKh��/���-K��� ~tW(~����~]RߔJ9�����Uq Ə�R���%�
x�+)JMU023d01000P�KI-(fH8�7Nc�HE��]��]�ze�?�߆f&&
zE�%%��EE�zY��y ���+V{��g����oı�syP�A��.��z%% ��Zx��lQxZ`?���뾻 6&��%&�3�,k^$n޺t�䆬ؽ>q_�v߃�T���Y���������Xj�M���3�R��5}�e������̂�b�#7��n��T����8�$9?է���$�����Օ�k-i���}ڻ���/�g� 6pd
x�}�ێ#5�����IF�$�b�@�j5Ҟ��wȱ�;nW(�� �}wd�!�a5��tW�_����}��w_�V���۟�o�&��ΐ���$/��Û�g�uQDU�B`g��g��]/X���z��r�)
[X"&{%f��J��h�M6E���)p�_������I�#�)����;Ӫ��([o|*
P����أ������V�#�����x �Ue}���%Ǻ�8��Xo� ؙl[���)[�,5� ������-��s$����8ڐc���� ]��qO(��%US�"��T��
MAG�)�d�R�@��t-{D���젼�rn����ϦD!&f�/2^�= v�)��i!I"��8��{�ʇ�\��RT*QJ�2�#I����&�s��皅���Ō���P1XC*�n��-�S�m����f�ѝ����Hs��]�� ��P.0�Gk���)�2I��&�W�4����.���fu����!�v��z���a����u2� ��j�~�V(�!�F
�����j�II��Git��e��渚MZ�<�h�;��,pi`T`΄�ȸI4���ij�k�K�F$QJ�X|���A5.wHE���g���-b�$��W�Dg8(Q� �A�\�o_�دS'�V���A�84;gu���~��_o1�c�O���ƙ�;����{��\c��jt�<�Toz�G����L���!�u�� V����H���� m�������%_�g��J4
x�+)JMU042`040031Q0�.�/JLO�+��a�+'z)��:o��&����43��P�F���y�E`eU�g-�zhͼ7Rw$6ǰf΀*3�wJ���/� �$:50cA[qG����˚��E<-�
x�ՒOO1�9�S<���ϦBD��R�=P���=�Z;�cJ���'$m�ֲ=��f<���.�.���]��2 ��I ��p8���q�$0ޙ{���$�z`P���@ݔ� �̦�L Y�~^�����K���ȩ�ꍑ�S�g&Jv"���rM9�V?%&Y�#.�/3��V�Y��GO�K)/�� �ɛ!�A��I+�Y�� ��|'#1-�rwW;����A�兏K��u,�������q�jc��@�E�h+&k�ܤ��j�� �$�O������< ���� y�i%]��ƕ�%qa\ʹY������m���R���/��73������ƽ�֟��+kx_O��a�~<��]�U���g<�
x�mSMo�@�_������F��8iڪR*�Cʡ���æ�k��Z6��b��VFb;o��J+������;U�����
Kkj�N� ����b)�����:`)M>��J�������<�zp���g�ʫ�l!%�Po�q���O+�Tc��*]4��j�n���� ���w��������¡RNZ��h'v���!<���;E��,3k-X;�[*�:��bI;�ڬ��z]�l��[�Zu�Y������jz՜��������!���Vg���H� ��S�z�G@A�6A'm��ٚZ9���`~�]�'m[�94o�4D���5o*g;�Q��2E��*]��n��Y��� �FR����̪�@3��_�}�ǦTY �P�fK�yW����JU�
YQK�$�"?�o�[��,(�;p����@���T�3I�9�5�v6f���:��b�,���������:�hCJ`�V〉*
����T� � �o��p�������<�v߇k���q�r����Ag2,h����pTǔ���NN�9�$��hc%C-b�[������3�z �b]���� �fįys ��NHg<d?��[�S���t��E�y�#,�%~�{\~�h����il����1��
x����
�0 �=�)B�2ă��[����n٬�f�� c�.+l0cB{J�� ��ɪ�����e)\}�{�Py���l���X<N�r�t���|X��E���RH��/����D\[<s�� �,NV�R�&�3�0<{�;U<������6^p��k���xH�����%�pυ._ݢ6��̢�
x�-̽
�0Fa�\�;�C��3�UAD�P���M��5-�E�wQ{�N�� ���$�q�׬dM�Sv2d�Ln�cUfs��\}���}dž���� 9�a��J�B��W�'.��k�G<^�hu���Fa�$� `k�b��0Ħc G!:���8�>���Q�?z���N�@�
x�͖�N�@�{��re���j!A�!$T��Ro��8��즻k B�{�>��؉q��$�l�ߌg�?��m8�68���������=u�I�ܹ��(�s�}��|�� c&�xJ@r��T��r��t��߻� ��-��Õ�(|�"Sq�rv�/M��܇��v�JP6�)JIƘ����$S4���Ŀh��Q8�L N�@�
K$Q|�����
r��L�2?8��c��]�C��\W���)H�(�D��c�P~�#Q�tS�h!��0s}�8�N ���˴foMɥ����_/`�f>1û��2�yrO f��S'N,��WC���#�Mt# �5N��EgڋZ��'-K��\�?����5�{!4 �F`[����؄ �Zm d�R/��|W9y����pC�.��������9p�����P�($�L��A;��Ty}GWg�>�X��^/�6�E�I��`QM����K���u��J���.���
�=W_G���ZE�T1A�!���Il�E�p�3A�$��K�r¶������ J�ϸ�i�)��8EBV��9��N��%��q���9��K]UkE6�G��;��҄}ԩh�I�>]�Rf-��ˑ�#%�t��frT�L�xI�Fw�/�H
P/���םN縷ڽqt����F�貂���?���3����~�K����x�����6�7Dvsu�>���i�P�2���?�&�,T�1Q�#�i���\&P�MS"��c����E����lz-��&�t�w��^f�z&)�7{W�<��]� �F����m�]���֕{�y�ʊ�n\U�Te��/*+��i�V��a�c�.)�갊�Z���^�����q`=I�pv�
�p"&�:b�״O�/}��
x�+)JMU047c040031QHI-�ɯ�/�,ɈO-�H-*�+)f���-�X�W]l���jU�4� ����$c��; v��������Q� ��z��!f��d&�����޶Q�֞m�ػ�\�lT!�,��u��S��m>d�����c�_����8�G
x�]SMk�@�ٿ�
��Y��PH�iJ �:�z�HK�J�bv�����l+�V��kv&�}�O��_>ئ��؁�b �c%�A���d~v6�~r[�-�b���r�T(׮��%���b]�?֖�0\��=�EdïEh{In{�IP۠4�.��s�� ^fe c�r�d,{P����;W���O1X��Z�8�#����aw38���'�O:�h�h��(l]�t��}7f1�N�f�L~���ާx����}����W�M&���fS�2}�խ+�q7V�?O'�|��W�V�1u�Ŷ
�\�����6��+؀� )�6�imMj����jz�����2zQ@�XW$|�B��@Za��L�&�̏����K���ȕ]4��®V,�-i59j4�T���x�4-I��6d}39�u��lͿ�Qɒ̐�����d���thk�����W[�$]p��P�>��$�������'�ұ`���f�8�L���c��Ԕ�����gz��lz�q�}��۾�b(��c{L�d[��lz׳��H��� �=4M?��1�������T�����i���_�a4레dk����W���2s@��K {���?�x��
x�M��j�0�]�?2P骔�bZ{�Q�c��1��H'��>�v�UH�ϗ��x|Z�e���SC
���{*�%u����l��)�������+S㝊5�*�pCd^5 Ohő�{G#$m�)M��6���l����(����zcF���M��)�rث�aH����}oBTζS;�f�dz�j�>�lGu�� ��:�=o��N/�FU�ȃ@��u��m�˕���D�z�UA,�`$����n�N�<Ñ�5c q�g+�杣||&�q�)ն��,y����
����0�/��e����ݦ)m�{Q� .I��*���
x�m��k�@�{޿❪�%��Zz(�����d������ID����K-���}��͏Ir� ��0�z���/UJڑ���f�Udg�Z-�� ��rWH8��L��(x �x��� � z���V��l��Q�dT��#,�UTj�W�!QK�d�w�rl�YF�o+��Ԫ���Å��9n���=Y��B��V�<��I���i� ] �y'�����w��"��RZY4��\�����V:eetW� ����\�8u@��E���>�qeu?�R����b���k_@jEt!����K����{��
x�+)JMU�0c040031QpJ���/�/I-.�+��a�ɛ����s)�M���0=w0���$�(1=U�6����|���eU%W�4��ڦ���wm�&�
30bd8b20b9d33cbbad38e4b6b5bb4ad6f6194fd9
{
"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 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": {
"@_96": {
"entryPoint": null,
"id": 96,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_address_fromMemory": {
"entryPoint": 334,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_address_fromMemory": {
"entryPoint": 354,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 295,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 264,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 260,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 312,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:1199:1",
"nodeType": "YulBlock",
"src": "0:1199:1",
"statements": [
{
"body": {
"nativeSrc": "47:35:1",
"nodeType": "YulBlock",
"src": "47:35:1",
"statements": [
{
"nativeSrc": "57:19:1",
"nodeType": "YulAssignment",
"src": "57:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "73:2:1",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "67:5:1",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nativeSrc": "67:9:1",
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "57:6:1",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "7:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "40:6:1",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
}
],
"src": "7:75:1"
},
{
"body": {
"nativeSrc": "177:28:1",
"nodeType": "YulBlock",
"src": "177:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "194:1:1",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "197:1:1",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "187:6:1",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nativeSrc": "187:12:1",
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "88:117:1",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body": {
"nativeSrc": "300:28:1",
"nodeType": "YulBlock",
"src": "300:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "317:1:1",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "320:1:1",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "310:6:1",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nativeSrc": "310:12:1",
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "211:117:1",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body": {
"nativeSrc": "379:81:1",
"nodeType": "YulBlock",
"src": "379:81:1",
"statements": [
{
"nativeSrc": "389:65:1",
"nodeType": "YulAssignment",
"src": "389:65:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "404:5:1",
"nodeType": "YulIdentifier",
"src": "404:5:1"
},
{
"kind": "number",
"nativeSrc": "411:42:1",
"nodeType": "YulLiteral",
"src": "411:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "400:3:1",
"nodeType": "YulIdentifier",
"src": "400:3:1"
},
"nativeSrc": "400:54:1",
"nodeType": "YulFunctionCall",
"src": "400:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "389:7:1",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nativeSrc": "334:126:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "361:5:1",
"nodeType": "YulTypedName",
"src": "361:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "371:7:1",
"nodeType": "YulTypedName",
"src": "371:7:1",
"type": ""
}
],
"src": "334:126:1"
},
{
"body": {
"nativeSrc": "511:51:1",
"nodeType": "YulBlock",
"src": "511:51:1",
"statements": [
{
"nativeSrc": "521:35:1",
"nodeType": "YulAssignment",
"src": "521:35:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "550:5:1",
"nodeType": "YulIdentifier",
"src": "550:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nativeSrc": "532:17:1",
"nodeType": "YulIdentifier",
"src": "532:17:1"
},
"nativeSrc": "532:24:1",
"nodeType": "YulFunctionCall",
"src": "532:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "521:7:1",
"nodeType": "YulIdentifier",
"src": "521:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nativeSrc": "466:96:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "493:5:1",
"nodeType": "YulTypedName",
"src": "493:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "503:7:1",
"nodeType": "YulTypedName",
"src": "503:7:1",
"type": ""
}
],
"src": "466:96:1"
},
{
"body": {
"nativeSrc": "611:79:1",
"nodeType": "YulBlock",
"src": "611:79:1",
"statements": [
{
"body": {
"nativeSrc": "668:16:1",
"nodeType": "YulBlock",
"src": "668:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "677:1:1",
"nodeType": "YulLiteral",
"src": "677:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "680:1:1",
"nodeType": "YulLiteral",
"src": "680:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "670:6:1",
"nodeType": "YulIdentifier",
"src": "670:6:1"
},
"nativeSrc": "670:12:1",
"nodeType": "YulFunctionCall",
"src": "670:12:1"
},
"nativeSrc": "670:12:1",
"nodeType": "YulExpressionStatement",
"src": "670:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "634:5:1",
"nodeType": "YulIdentifier",
"src": "634:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "659:5:1",
"nodeType": "YulIdentifier",
"src": "659:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "641:17:1",
"nodeType": "YulIdentifier",
"src": "641:17:1"
},
"nativeSrc": "641:24:1",
"nodeType": "YulFunctionCall",
"src": "641:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "631:2:1",
"nodeType": "YulIdentifier",
"src": "631:2:1"
},
"nativeSrc": "631:35:1",
"nodeType": "YulFunctionCall",
"src": "631:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "624:6:1",
"nodeType": "YulIdentifier",
"src": "624:6:1"
},
"nativeSrc": "624:43:1",
"nodeType": "YulFunctionCall",
"src": "624:43:1"
},
"nativeSrc": "621:63:1",
"nodeType": "YulIf",
"src": "621:63:1"
}
]
},
"name": "validator_revert_t_address",
"nativeSrc": "568:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "604:5:1",
"nodeType": "YulTypedName",
"src": "604:5:1",
"type": ""
}
],
"src": "568:122:1"
},
{
"body": {
"nativeSrc": "759:80:1",
"nodeType": "YulBlock",
"src": "759:80:1",
"statements": [
{
"nativeSrc": "769:22:1",
"nodeType": "YulAssignment",
"src": "769:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "784:6:1",
"nodeType": "YulIdentifier",
"src": "784:6:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "778:5:1",
"nodeType": "YulIdentifier",
"src": "778:5:1"
},
"nativeSrc": "778:13:1",
"nodeType": "YulFunctionCall",
"src": "778:13:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "769:5:1",
"nodeType": "YulIdentifier",
"src": "769:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "827:5:1",
"nodeType": "YulIdentifier",
"src": "827:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nativeSrc": "800:26:1",
"nodeType": "YulIdentifier",
"src": "800:26:1"
},
"nativeSrc": "800:33:1",
"nodeType": "YulFunctionCall",
"src": "800:33:1"
},
"nativeSrc": "800:33:1",
"nodeType": "YulExpressionStatement",
"src": "800:33:1"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "696:143:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "737:6:1",
"nodeType": "YulTypedName",
"src": "737:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "745:3:1",
"nodeType": "YulTypedName",
"src": "745:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "753:5:1",
"nodeType": "YulTypedName",
"src": "753:5:1",
"type": ""
}
],
"src": "696:143:1"
},
{
"body": {
"nativeSrc": "922:274:1",
"nodeType": "YulBlock",
"src": "922:274:1",
"statements": [
{
"body": {
"nativeSrc": "968:83:1",
"nodeType": "YulBlock",
"src": "968:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "970:77:1",
"nodeType": "YulIdentifier",
"src": "970:77:1"
},
"nativeSrc": "970:79:1",
"nodeType": "YulFunctionCall",
"src": "970:79:1"
},
"nativeSrc": "970:79:1",
"nodeType": "YulExpressionStatement",
"src": "970:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "943:7:1",
"nodeType": "YulIdentifier",
"src": "943:7:1"
},
{
"name": "headStart",
"nativeSrc": "952:9:1",
"nodeType": "YulIdentifier",
"src": "952:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "939:3:1",
"nodeType": "YulIdentifier",
"src": "939:3:1"
},
"nativeSrc": "939:23:1",
"nodeType": "YulFunctionCall",
"src": "939:23:1"
},
{
"kind": "number",
"nativeSrc": "964:2:1",
"nodeType": "YulLiteral",
"src": "964:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "935:3:1",
"nodeType": "YulIdentifier",
"src": "935:3:1"
},
"nativeSrc": "935:32:1",
"nodeType": "YulFunctionCall",
"src": "935:32:1"
},
"nativeSrc": "932:119:1",
"nodeType": "YulIf",
"src": "932:119:1"
},
{
"nativeSrc": "1061:128:1",
"nodeType": "YulBlock",
"src": "1061:128:1",
"statements": [
{
"nativeSrc": "1076:15:1",
"nodeType": "YulVariableDeclaration",
"src": "1076:15:1",
"value": {
"kind": "number",
"nativeSrc": "1090:1:1",
"nodeType": "YulLiteral",
"src": "1090:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "1080:6:1",
"nodeType": "YulTypedName",
"src": "1080:6:1",
"type": ""
}
]
},
{
"nativeSrc": "1105:74:1",
"nodeType": "YulAssignment",
"src": "1105:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1151:9:1",
"nodeType": "YulIdentifier",
"src": "1151:9:1"
},
{
"name": "offset",
"nativeSrc": "1162:6:1",
"nodeType": "YulIdentifier",
"src": "1162:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1147:3:1",
"nodeType": "YulIdentifier",
"src": "1147:3:1"
},
"nativeSrc": "1147:22:1",
"nodeType": "YulFunctionCall",
"src": "1147:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "1171:7:1",
"nodeType": "YulIdentifier",
"src": "1171:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "1115:31:1",
"nodeType": "YulIdentifier",
"src": "1115:31:1"
},
"nativeSrc": "1115:64:1",
"nodeType": "YulFunctionCall",
"src": "1115:64:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "1105:6:1",
"nodeType": "YulIdentifier",
"src": "1105:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_address_fromMemory",
"nativeSrc": "845:351:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "892:9:1",
"nodeType": "YulTypedName",
"src": "892:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "903:7:1",
"nodeType": "YulTypedName",
"src": "903:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "915:6:1",
"nodeType": "YulTypedName",
"src": "915:6:1",
"type": ""
}
],
"src": "845:351:1"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "60c060405234801561000f575f5ffd5b506040516115d53803806115d583398181016040528101906100319190610162565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610096576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250505061018d565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61013182610108565b9050919050565b61014181610127565b811461014b575f5ffd5b50565b5f8151905061015c81610138565b92915050565b5f6020828403121561017757610176610104565b5b5f6101848482850161014e565b91505092915050565b60805160a0516113fd6101d85f395f61073001525f81816102d801528181610308015281816104270152818161060801528181610754015281816109040152610a2301526113fd5ff3fe608060405234801561000f575f5ffd5b50600436106100fe575f3560e01c8063934aa02311610095578063dfab10ed11610064578063dfab10ed14610250578063ed026dbc1461026c578063eeafe9da14610288578063fbfa77cf146102b8576100fe565b8063934aa023146101da57806399cacc9e146101f85780639a33e30014610214578063b3f05b9714610232576100fe565b80632accd144116100d15780632accd144146101765780632af8afca14610194578063344612c7146101b25780637417882c146101d0576100fe565b806302d05d3f146101025780630681ca55146101205780631decc1cf1461013e57806321ecc6091461015a575b5f5ffd5b61010a6102d6565b6040516101179190610d84565b60405180910390f35b6101286102fa565b6040516101359190610db5565b60405180910390f35b61015860048036038101906101539190610e37565b610306565b005b610174600480360381019061016f9190610eac565b610425565b005b61017e61054f565b60405161018b9190610f47565b60405180910390f35b61019c6105db565b6040516101a99190610d84565b60405180910390f35b6101ba610600565b6040516101c79190610db5565b60405180910390f35b6101d8610606565b005b6101e261072e565b6040516101ef9190610d84565b60405180910390f35b610212600480360381019061020d9190610eac565b610752565b005b61021c610865565b6040516102299190610f47565b60405180910390f35b61023a6108f1565b6040516102479190610f81565b60405180910390f35b61026a60048036038101906102659190610e37565b610902565b005b61028660048036038101906102819190610fc4565b610a21565b005b6102a2600480360381019061029d9190610eac565b610d00565b6040516102af9190610db5565b60405180910390f35b6102c0610d20565b6040516102cd9190610d84565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f600480549050905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038b576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156103d0576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181600291826103e1929190611236565b507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae1276001600260035460405161041993929190611384565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156104ef576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600481908060018154018082558091505060019003905f5260205f20015f90919091909150557fc4bb392c6343f357e3d1657b96ba539bd19d29fb258328b3eddc49d619352ac9816040516105449190610db5565b60405180910390a150565b6002805461055c90611066565b80601f016020809104026020016040519081016040528092919081815260200182805461058890611066565b80156105d35780601f106105aa576101008083540402835291602001916105d3565b820191905f5260205f20905b8154815290600101906020018083116105b657829003601f168201915b505050505081565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156106d0576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015f5f6101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167f2e017d1517bd7e5860886e09e2a2a50b35fafd176efc5b78a6377a18507e77be60405160405180910390a2565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d7576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff161561081c576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806003819055507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae1276001600260035460405161085a93929190611384565b60405180910390a150565b6001805461087290611066565b80601f016020809104026020016040519081016040528092919081815260200182805461089e90611066565b80156108e95780601f106108c0576101008083540402835291602001916108e9565b820191905f5260205f20905b8154815290600101906020018083116108cc57829003601f168201915b505050505081565b5f5f9054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610987576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156109cc576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181600191826109dd929190611236565b507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae12760016002600354604051610a1593929190611384565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa6576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610b0b57505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610b42576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580610beb57505f73ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610c22576040517f3ca9d61700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f402dc0e0b3cc5e6e72bd9d0ffaf398abfe958172835feb52d2c4ebdb6e58ea6660405160405180910390a35050565b60048181548110610d0f575f80fd5b905f5260205f20015f915090505481565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d6e82610d45565b9050919050565b610d7e81610d64565b82525050565b5f602082019050610d975f830184610d75565b92915050565b5f819050919050565b610daf81610d9d565b82525050565b5f602082019050610dc85f830184610da6565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112610df757610df6610dd6565b5b8235905067ffffffffffffffff811115610e1457610e13610dda565b5b602083019150836001820283011115610e3057610e2f610dde565b5b9250929050565b5f5f60208385031215610e4d57610e4c610dce565b5b5f83013567ffffffffffffffff811115610e6a57610e69610dd2565b5b610e7685828601610de2565b92509250509250929050565b610e8b81610d9d565b8114610e95575f5ffd5b50565b5f81359050610ea681610e82565b92915050565b5f60208284031215610ec157610ec0610dce565b5b5f610ece84828501610e98565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610f1982610ed7565b610f238185610ee1565b9350610f33818560208601610ef1565b610f3c81610eff565b840191505092915050565b5f6020820190508181035f830152610f5f8184610f0f565b905092915050565b5f8115159050919050565b610f7b81610f67565b82525050565b5f602082019050610f945f830184610f72565b92915050565b610fa381610d64565b8114610fad575f5ffd5b50565b5f81359050610fbe81610f9a565b92915050565b5f5f60408385031215610fda57610fd9610dce565b5b5f610fe785828601610fb0565b9250506020610ff885828601610fb0565b9150509250929050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061107d57607f821691505b6020821081036110905761108f611039565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026110f27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826110b7565b6110fc86836110b7565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61113761113261112d84610d9d565b611114565b610d9d565b9050919050565b5f819050919050565b6111508361111d565b61116461115c8261113e565b8484546110c3565b825550505050565b5f5f905090565b61117b61116c565b611186818484611147565b505050565b5b818110156111a95761119e5f82611173565b60018101905061118c565b5050565b601f8211156111ee576111bf81611096565b6111c8846110a8565b810160208510156111d7578190505b6111eb6111e3856110a8565b83018261118b565b50505b505050565b5f82821c905092915050565b5f61120e5f19846008026111f3565b1980831691505092915050565b5f61122683836111ff565b9150826002028217905092915050565b6112408383611002565b67ffffffffffffffff8111156112595761125861100c565b5b6112638254611066565b61126e8282856111ad565b5f601f83116001811461129b575f8415611289578287013590505b611293858261121b565b8655506112fa565b601f1984166112a986611096565b5f5b828110156112d0578489013582556001820191506020850194506020810190506112ab565b868310156112ed57848901356112e9601f8916826111ff565b8355505b6001600288020188555050505b50505050505050565b5f815461130f81611066565b6113198186610ee1565b9450600182165f811461133357600181146113495761137b565b60ff19831686528115156020028601935061137b565b61135285611096565b5f5b8381101561137357815481890152600182019150602081019050611354565b808801955050505b50505092915050565b5f6060820190508181035f83015261139c8186611303565b905081810360208301526113b08185611303565b90506113bf6040830184610da6565b94935050505056fea2646970667358221220477b2cf3639854266010eb8b342e3987d4aaeff17d8bef6e1dab73953787a80b64736f6c634300081e0033",
"opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x15D5 CODESIZE SUB DUP1 PUSH2 0x15D5 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x31 SWAP2 SWAP1 PUSH2 0x162 JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x96 JUMPI PUSH1 0x40 MLOAD PUSH32 0xD92E233D00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x80 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xA0 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP POP PUSH2 0x18D JUMP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x131 DUP3 PUSH2 0x108 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x141 DUP2 PUSH2 0x127 JUMP JUMPDEST DUP2 EQ PUSH2 0x14B JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP PUSH2 0x15C DUP2 PUSH2 0x138 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x177 JUMPI PUSH2 0x176 PUSH2 0x104 JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0x184 DUP5 DUP3 DUP6 ADD PUSH2 0x14E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH2 0x13FD PUSH2 0x1D8 PUSH0 CODECOPY PUSH0 PUSH2 0x730 ADD MSTORE PUSH0 DUP2 DUP2 PUSH2 0x2D8 ADD MSTORE DUP2 DUP2 PUSH2 0x308 ADD MSTORE DUP2 DUP2 PUSH2 0x427 ADD MSTORE DUP2 DUP2 PUSH2 0x608 ADD MSTORE DUP2 DUP2 PUSH2 0x754 ADD MSTORE DUP2 DUP2 PUSH2 0x904 ADD MSTORE PUSH2 0xA23 ADD MSTORE PUSH2 0x13FD PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xFE JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x934AA023 GT PUSH2 0x95 JUMPI DUP1 PUSH4 0xDFAB10ED GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xDFAB10ED EQ PUSH2 0x250 JUMPI DUP1 PUSH4 0xED026DBC EQ PUSH2 0x26C JUMPI DUP1 PUSH4 0xEEAFE9DA EQ PUSH2 0x288 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x2B8 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x934AA023 EQ PUSH2 0x1DA JUMPI DUP1 PUSH4 0x99CACC9E EQ PUSH2 0x1F8 JUMPI DUP1 PUSH4 0x9A33E300 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0xB3F05B97 EQ PUSH2 0x232 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x2ACCD144 GT PUSH2 0xD1 JUMPI DUP1 PUSH4 0x2ACCD144 EQ PUSH2 0x176 JUMPI DUP1 PUSH4 0x2AF8AFCA EQ PUSH2 0x194 JUMPI DUP1 PUSH4 0x344612C7 EQ PUSH2 0x1B2 JUMPI DUP1 PUSH4 0x7417882C EQ PUSH2 0x1D0 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x2D05D3F EQ PUSH2 0x102 JUMPI DUP1 PUSH4 0x681CA55 EQ PUSH2 0x120 JUMPI DUP1 PUSH4 0x1DECC1CF EQ PUSH2 0x13E JUMPI DUP1 PUSH4 0x21ECC609 EQ PUSH2 0x15A JUMPI JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x10A PUSH2 0x2D6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x117 SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x128 PUSH2 0x2FA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x135 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x158 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x153 SWAP2 SWAP1 PUSH2 0xE37 JUMP JUMPDEST PUSH2 0x306 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x174 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x16F SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x425 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x17E PUSH2 0x54F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18B SWAP2 SWAP1 PUSH2 0xF47 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x19C PUSH2 0x5DB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1A9 SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1BA PUSH2 0x600 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1C7 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1D8 PUSH2 0x606 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E2 PUSH2 0x72E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1EF SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x212 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x20D SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x752 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x21C PUSH2 0x865 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x229 SWAP2 SWAP1 PUSH2 0xF47 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x23A PUSH2 0x8F1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x247 SWAP2 SWAP1 PUSH2 0xF81 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x26A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x265 SWAP2 SWAP1 PUSH2 0xE37 JUMP JUMPDEST PUSH2 0x902 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x286 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x281 SWAP2 SWAP1 PUSH2 0xFC4 JUMP JUMPDEST PUSH2 0xA21 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2A2 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x29D SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0xD00 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2AF SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2C0 PUSH2 0xD20 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2CD SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH0 PUSH1 0x4 DUP1 SLOAD SWAP1 POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x38B JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x3D0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 DUP2 PUSH1 0x2 SWAP2 DUP3 PUSH2 0x3E1 SWAP3 SWAP2 SWAP1 PUSH2 0x1236 JUMP JUMPDEST POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x419 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x4AA JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x4EF JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x4 DUP2 SWAP1 DUP1 PUSH1 0x1 DUP2 SLOAD ADD DUP1 DUP3 SSTORE DUP1 SWAP2 POP POP PUSH1 0x1 SWAP1 SUB SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 ADD PUSH0 SWAP1 SWAP2 SWAP1 SWAP2 SWAP1 SWAP2 POP SSTORE PUSH32 0xC4BB392C6343F357E3D1657B96BA539BD19D29FB258328B3EDDC49D619352AC9 DUP2 PUSH1 0x40 MLOAD PUSH2 0x544 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH2 0x55C SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x588 SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x5D3 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x5AA JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x5D3 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x5B6 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x6 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x68B JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x6D0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH0 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x2E017D1517BD7E5860886E09E2A2A50B35FAFD176EFC5B78A6377A18507E77BE PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x7D7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x81C JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x3 DUP2 SWAP1 SSTORE POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x85A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH2 0x872 SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x89E SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x8E9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x8C0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x8E9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x8CC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x987 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x9CC JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 DUP2 PUSH1 0x1 SWAP2 DUP3 PUSH2 0x9DD SWAP3 SWAP2 SWAP1 PUSH2 0x1236 JUMP JUMPDEST POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0xA15 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xAA6 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0xB0B JUMPI POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST ISZERO PUSH2 0xB42 JUMPI PUSH1 0x40 MLOAD PUSH32 0xD92E233D00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO DUP1 PUSH2 0xBEB JUMPI POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x6 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO JUMPDEST ISZERO PUSH2 0xC22 JUMPI PUSH1 0x40 MLOAD PUSH32 0x3CA9D61700000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x5 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x6 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x402DC0E0B3CC5E6E72BD9D0FFAF398ABFE958172835FEB52D2C4EBDB6E58EA66 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x4 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0xD0F JUMPI PUSH0 DUP1 REVERT JUMPDEST SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 ADD PUSH0 SWAP2 POP SWAP1 POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0xD6E DUP3 PUSH2 0xD45 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xD7E DUP2 PUSH2 0xD64 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xD97 PUSH0 DUP4 ADD DUP5 PUSH2 0xD75 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xDAF DUP2 PUSH2 0xD9D JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xDC8 PUSH0 DUP4 ADD DUP5 PUSH2 0xDA6 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xDF7 JUMPI PUSH2 0xDF6 PUSH2 0xDD6 JUMP JUMPDEST JUMPDEST DUP3 CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xE14 JUMPI PUSH2 0xE13 PUSH2 0xDDA JUMP JUMPDEST JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x1 DUP3 MUL DUP4 ADD GT ISZERO PUSH2 0xE30 JUMPI PUSH2 0xE2F PUSH2 0xDDE JUMP JUMPDEST JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x20 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xE4D JUMPI PUSH2 0xE4C PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 DUP4 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xE6A JUMPI PUSH2 0xE69 PUSH2 0xDD2 JUMP JUMPDEST JUMPDEST PUSH2 0xE76 DUP6 DUP3 DUP7 ADD PUSH2 0xDE2 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xE8B DUP2 PUSH2 0xD9D JUMP JUMPDEST DUP2 EQ PUSH2 0xE95 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xEA6 DUP2 PUSH2 0xE82 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEC1 JUMPI PUSH2 0xEC0 PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0xECE DUP5 DUP3 DUP6 ADD PUSH2 0xE98 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 MCOPY PUSH0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0xF19 DUP3 PUSH2 0xED7 JUMP JUMPDEST PUSH2 0xF23 DUP2 DUP6 PUSH2 0xEE1 JUMP JUMPDEST SWAP4 POP PUSH2 0xF33 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0xF3C DUP2 PUSH2 0xEFF JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0xF5F DUP2 DUP5 PUSH2 0xF0F JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 ISZERO ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xF7B DUP2 PUSH2 0xF67 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xF94 PUSH0 DUP4 ADD DUP5 PUSH2 0xF72 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xFA3 DUP2 PUSH2 0xD64 JUMP JUMPDEST DUP2 EQ PUSH2 0xFAD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xFBE DUP2 PUSH2 0xF9A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDA JUMPI PUSH2 0xFD9 PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0xFE7 DUP6 DUP3 DUP7 ADD PUSH2 0xFB0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xFF8 DUP6 DUP3 DUP7 ADD PUSH2 0xFB0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x107D JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1090 JUMPI PUSH2 0x108F PUSH2 0x1039 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP DUP2 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 PUSH1 0x1F DUP4 ADD DIV SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHL SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x8 DUP4 MUL PUSH2 0x10F2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 PUSH2 0x10B7 JUMP JUMPDEST PUSH2 0x10FC DUP7 DUP4 PUSH2 0x10B7 JUMP JUMPDEST SWAP6 POP DUP1 NOT DUP5 AND SWAP4 POP DUP1 DUP7 AND DUP5 OR SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x1137 PUSH2 0x1132 PUSH2 0x112D DUP5 PUSH2 0xD9D JUMP JUMPDEST PUSH2 0x1114 JUMP JUMPDEST PUSH2 0xD9D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1150 DUP4 PUSH2 0x111D JUMP JUMPDEST PUSH2 0x1164 PUSH2 0x115C DUP3 PUSH2 0x113E JUMP JUMPDEST DUP5 DUP5 SLOAD PUSH2 0x10C3 JUMP JUMPDEST DUP3 SSTORE POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x117B PUSH2 0x116C JUMP JUMPDEST PUSH2 0x1186 DUP2 DUP5 DUP5 PUSH2 0x1147 JUMP JUMPDEST POP POP POP JUMP JUMPDEST JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x11A9 JUMPI PUSH2 0x119E PUSH0 DUP3 PUSH2 0x1173 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x118C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH2 0x11EE JUMPI PUSH2 0x11BF DUP2 PUSH2 0x1096 JUMP JUMPDEST PUSH2 0x11C8 DUP5 PUSH2 0x10A8 JUMP JUMPDEST DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH2 0x11D7 JUMPI DUP2 SWAP1 POP JUMPDEST PUSH2 0x11EB PUSH2 0x11E3 DUP6 PUSH2 0x10A8 JUMP JUMPDEST DUP4 ADD DUP3 PUSH2 0x118B JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x120E PUSH0 NOT DUP5 PUSH1 0x8 MUL PUSH2 0x11F3 JUMP JUMPDEST NOT DUP1 DUP4 AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x1226 DUP4 DUP4 PUSH2 0x11FF JUMP JUMPDEST SWAP2 POP DUP3 PUSH1 0x2 MUL DUP3 OR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1240 DUP4 DUP4 PUSH2 0x1002 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1259 JUMPI PUSH2 0x1258 PUSH2 0x100C JUMP JUMPDEST JUMPDEST PUSH2 0x1263 DUP3 SLOAD PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x126E DUP3 DUP3 DUP6 PUSH2 0x11AD JUMP JUMPDEST PUSH0 PUSH1 0x1F DUP4 GT PUSH1 0x1 DUP2 EQ PUSH2 0x129B JUMPI PUSH0 DUP5 ISZERO PUSH2 0x1289 JUMPI DUP3 DUP8 ADD CALLDATALOAD SWAP1 POP JUMPDEST PUSH2 0x1293 DUP6 DUP3 PUSH2 0x121B JUMP JUMPDEST DUP7 SSTORE POP PUSH2 0x12FA JUMP JUMPDEST PUSH1 0x1F NOT DUP5 AND PUSH2 0x12A9 DUP7 PUSH2 0x1096 JUMP JUMPDEST PUSH0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x12D0 JUMPI DUP5 DUP10 ADD CALLDATALOAD DUP3 SSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP6 ADD SWAP5 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x12AB JUMP JUMPDEST DUP7 DUP4 LT ISZERO PUSH2 0x12ED JUMPI DUP5 DUP10 ADD CALLDATALOAD PUSH2 0x12E9 PUSH1 0x1F DUP10 AND DUP3 PUSH2 0x11FF JUMP JUMPDEST DUP4 SSTORE POP JUMPDEST PUSH1 0x1 PUSH1 0x2 DUP9 MUL ADD DUP9 SSTORE POP POP POP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 DUP2 SLOAD PUSH2 0x130F DUP2 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1319 DUP2 DUP7 PUSH2 0xEE1 JUMP JUMPDEST SWAP5 POP PUSH1 0x1 DUP3 AND PUSH0 DUP2 EQ PUSH2 0x1333 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x1349 JUMPI PUSH2 0x137B JUMP JUMPDEST PUSH1 0xFF NOT DUP4 AND DUP7 MSTORE DUP2 ISZERO ISZERO PUSH1 0x20 MUL DUP7 ADD SWAP4 POP PUSH2 0x137B JUMP JUMPDEST PUSH2 0x1352 DUP6 PUSH2 0x1096 JUMP JUMPDEST PUSH0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1373 JUMPI DUP2 SLOAD DUP2 DUP10 ADD MSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x1354 JUMP JUMPDEST DUP1 DUP9 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x139C DUP2 DUP7 PUSH2 0x1303 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x13B0 DUP2 DUP6 PUSH2 0x1303 JUMP JUMPDEST SWAP1 POP PUSH2 0x13BF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xDA6 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFBALANCE PUSH28 0x2CF3639854266010EB8B342E3987D4AAEFF17D8BEF6E1DAB73953787 0xA8 SIGNEXTEND PUSH5 0x736F6C6343 STOP ADDMOD 0x1E STOP CALLER ",
"sourceMap": "58:2985:0:-:0;;;1217:220;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1281:1;1261:22;;:8;:22;;;1257:48;;1292:13;;;;;;;;;;;;;;1257:48;1325:10;1315:20;;;;;;;;;;1355:8;1345:18;;;;;;;;;;1217:220;58:2985;;88:117:1;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:143::-;753:5;784:6;778:13;769:22;;800:33;827:5;800:33;:::i;:::-;696:143;;;;:::o;845:351::-;915:6;964:2;952:9;943:7;939:23;935:32;932:119;;;970:79;;:::i;:::-;932:119;1090:1;1115:64;1171:7;1162:6;1151:9;1147:22;1115:64;:::i;:::-;1105:74;;1061:128;845:351;;;;:::o;58:2985:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@addMilestoneAmount_176": {
"entryPoint": 1061,
"id": 176,
"parameterSlots": 1,
"returnSlots": 0
},
"@attachVaultAndToken_250": {
"entryPoint": 2593,
"id": 250,
"parameterSlots": 2,
"returnSlots": 0
},
"@charity_13": {
"entryPoint": 1838,
"id": 13,
"parameterSlots": 0,
"returnSlots": 0
},
"@creator_11": {
"entryPoint": 726,
"id": 11,
"parameterSlots": 0,
"returnSlots": 0
},
"@dgt_28": {
"entryPoint": 1499,
"id": 28,
"parameterSlots": 0,
"returnSlots": 0
},
"@finalizeProject_193": {
"entryPoint": 1542,
"id": 193,
"parameterSlots": 0,
"returnSlots": 0
},
"@finalized_15": {
"entryPoint": 2289,
"id": 15,
"parameterSlots": 0,
"returnSlots": 0
},
"@milestoneAmounts_24": {
"entryPoint": 3328,
"id": 24,
"parameterSlots": 0,
"returnSlots": 0
},
"@milestoneCount_259": {
"entryPoint": 762,
"id": 259,
"parameterSlots": 0,
"returnSlots": 1
},
"@projectDetails_19": {
"entryPoint": 1359,
"id": 19,
"parameterSlots": 0,
"returnSlots": 0
},
"@projectName_17": {
"entryPoint": 2149,
"id": 17,
"parameterSlots": 0,
"returnSlots": 0
},
"@storeProjectDetails_136": {
"entryPoint": 774,
"id": 136,
"parameterSlots": 2,
"returnSlots": 0
},
"@storeProjectName_116": {
"entryPoint": 2306,
"id": 116,
"parameterSlots": 2,
"returnSlots": 0
},
"@storeTotalAmountNeeded_156": {
"entryPoint": 1874,
"id": 156,
"parameterSlots": 1,
"returnSlots": 0
},
"@totalAmountNeeded_21": {
"entryPoint": 1536,
"id": 21,
"parameterSlots": 0,
"returnSlots": 0
},
"@vault_26": {
"entryPoint": 3360,
"id": 26,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_decode_t_address": {
"entryPoint": 4016,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_string_calldata_ptr": {
"entryPoint": 3554,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_t_uint256": {
"entryPoint": 3736,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_address": {
"entryPoint": 4036,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_tuple_t_string_calldata_ptr": {
"entryPoint": 3639,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 3756,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_address_to_t_address_fromStack": {
"entryPoint": 3445,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_bool_to_t_bool_fromStack": {
"entryPoint": 3954,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 3855,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack": {
"entryPoint": 4867,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 3494,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
"entryPoint": 3460,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed": {
"entryPoint": 3969,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 3911,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_storage_t_string_storage_t_uint256__to_t_string_memory_ptr_t_string_memory_ptr_t_uint256__fromStack_reversed": {
"entryPoint": 4996,
"id": null,
"parameterSlots": 4,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 3509,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_dataslot_t_string_storage": {
"entryPoint": 4246,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_calldata_ptr": {
"entryPoint": 4098,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 3799,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 3809,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"clean_up_bytearray_end_slots_t_string_storage": {
"entryPoint": 4525,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"cleanup_t_address": {
"entryPoint": 3428,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_bool": {
"entryPoint": 3943,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 3397,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 3485,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"clear_storage_range_t_bytes1": {
"entryPoint": 4491,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"convert_t_uint256_to_t_uint256": {
"entryPoint": 4381,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_byte_array_to_storage_from_t_string_calldata_ptr_to_t_string_storage": {
"entryPoint": 4662,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"copy_memory_to_memory_with_cleanup": {
"entryPoint": 3825,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"divide_by_32_ceil": {
"entryPoint": 4264,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_byte_array_length": {
"entryPoint": 4198,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_used_part_and_set_length_of_short_byte_array": {
"entryPoint": 4635,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"identity": {
"entryPoint": 4372,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"mask_bytes_dynamic": {
"entryPoint": 4607,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"panic_error_0x22": {
"entryPoint": 4153,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 4108,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"prepare_store_t_uint256": {
"entryPoint": 4414,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490": {
"entryPoint": 3546,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": {
"entryPoint": 3542,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef": {
"entryPoint": 3550,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": 3538,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 3534,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 3839,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"shift_left_dynamic": {
"entryPoint": 4279,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"shift_right_unsigned_dynamic": {
"entryPoint": 4595,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"storage_set_to_zero_t_uint256": {
"entryPoint": 4467,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"update_byte_slice_dynamic32": {
"entryPoint": 4291,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"update_storage_value_t_uint256_to_t_uint256": {
"entryPoint": 4423,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 3994,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 3714,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"zero_value_for_split_t_uint256": {
"entryPoint": 4460,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:12481:1",
"nodeType": "YulBlock",
"src": "0:12481:1",
"statements": [
{
"body": {
"nativeSrc": "52:81:1",
"nodeType": "YulBlock",
"src": "52:81:1",
"statements": [
{
"nativeSrc": "62:65:1",
"nodeType": "YulAssignment",
"src": "62:65:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "77:5:1",
"nodeType": "YulIdentifier",
"src": "77:5:1"
},
{
"kind": "number",
"nativeSrc": "84:42:1",
"nodeType": "YulLiteral",
"src": "84:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "73:3:1",
"nodeType": "YulIdentifier",
"src": "73:3:1"
},
"nativeSrc": "73:54:1",
"nodeType": "YulFunctionCall",
"src": "73:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "62:7:1",
"nodeType": "YulIdentifier",
"src": "62:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nativeSrc": "7:126:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "34:5:1",
"nodeType": "YulTypedName",
"src": "34:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "44:7:1",
"nodeType": "YulTypedName",
"src": "44:7:1",
"type": ""
}
],
"src": "7:126:1"
},
{
"body": {
"nativeSrc": "184:51:1",
"nodeType": "YulBlock",
"src": "184:51:1",
"statements": [
{
"nativeSrc": "194:35:1",
"nodeType": "YulAssignment",
"src": "194:35:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "223:5:1",
"nodeType": "YulIdentifier",
"src": "223:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nativeSrc": "205:17:1",
"nodeType": "YulIdentifier",
"src": "205:17:1"
},
"nativeSrc": "205:24:1",
"nodeType": "YulFunctionCall",
"src": "205:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "194:7:1",
"nodeType": "YulIdentifier",
"src": "194:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nativeSrc": "139:96:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "166:5:1",
"nodeType": "YulTypedName",
"src": "166:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "176:7:1",
"nodeType": "YulTypedName",
"src": "176:7:1",
"type": ""
}
],
"src": "139:96:1"
},
{
"body": {
"nativeSrc": "306:53:1",
"nodeType": "YulBlock",
"src": "306:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "323:3:1",
"nodeType": "YulIdentifier",
"src": "323:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "346:5:1",
"nodeType": "YulIdentifier",
"src": "346:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "328:17:1",
"nodeType": "YulIdentifier",
"src": "328:17:1"
},
"nativeSrc": "328:24:1",
"nodeType": "YulFunctionCall",
"src": "328:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "316:6:1",
"nodeType": "YulIdentifier",
"src": "316:6:1"
},
"nativeSrc": "316:37:1",
"nodeType": "YulFunctionCall",
"src": "316:37:1"
},
"nativeSrc": "316:37:1",
"nodeType": "YulExpressionStatement",
"src": "316:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nativeSrc": "241:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "294:5:1",
"nodeType": "YulTypedName",
"src": "294:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "301:3:1",
"nodeType": "YulTypedName",
"src": "301:3:1",
"type": ""
}
],
"src": "241:118:1"
},
{
"body": {
"nativeSrc": "463:124:1",
"nodeType": "YulBlock",
"src": "463:124:1",
"statements": [
{
"nativeSrc": "473:26:1",
"nodeType": "YulAssignment",
"src": "473:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "485:9:1",
"nodeType": "YulIdentifier",
"src": "485:9:1"
},
{
"kind": "number",
"nativeSrc": "496:2:1",
"nodeType": "YulLiteral",
"src": "496:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "481:3:1",
"nodeType": "YulIdentifier",
"src": "481:3:1"
},
"nativeSrc": "481:18:1",
"nodeType": "YulFunctionCall",
"src": "481:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "473:4:1",
"nodeType": "YulIdentifier",
"src": "473:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "553:6:1",
"nodeType": "YulIdentifier",
"src": "553:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "566:9:1",
"nodeType": "YulIdentifier",
"src": "566:9:1"
},
{
"kind": "number",
"nativeSrc": "577:1:1",
"nodeType": "YulLiteral",
"src": "577:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "562:3:1",
"nodeType": "YulIdentifier",
"src": "562:3:1"
},
"nativeSrc": "562:17:1",
"nodeType": "YulFunctionCall",
"src": "562:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nativeSrc": "509:43:1",
"nodeType": "YulIdentifier",
"src": "509:43:1"
},
"nativeSrc": "509:71:1",
"nodeType": "YulFunctionCall",
"src": "509:71:1"
},
"nativeSrc": "509:71:1",
"nodeType": "YulExpressionStatement",
"src": "509:71:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nativeSrc": "365:222:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "435:9:1",
"nodeType": "YulTypedName",
"src": "435:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "447:6:1",
"nodeType": "YulTypedName",
"src": "447:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "458:4:1",
"nodeType": "YulTypedName",
"src": "458:4:1",
"type": ""
}
],
"src": "365:222:1"
},
{
"body": {
"nativeSrc": "638:32:1",
"nodeType": "YulBlock",
"src": "638:32:1",
"statements": [
{
"nativeSrc": "648:16:1",
"nodeType": "YulAssignment",
"src": "648:16:1",
"value": {
"name": "value",
"nativeSrc": "659:5:1",
"nodeType": "YulIdentifier",
"src": "659:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "648:7:1",
"nodeType": "YulIdentifier",
"src": "648:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "593:77:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "620:5:1",
"nodeType": "YulTypedName",
"src": "620:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "630:7:1",
"nodeType": "YulTypedName",
"src": "630:7:1",
"type": ""
}
],
"src": "593:77:1"
},
{
"body": {
"nativeSrc": "741:53:1",
"nodeType": "YulBlock",
"src": "741:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "758:3:1",
"nodeType": "YulIdentifier",
"src": "758:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "781:5:1",
"nodeType": "YulIdentifier",
"src": "781:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "763:17:1",
"nodeType": "YulIdentifier",
"src": "763:17:1"
},
"nativeSrc": "763:24:1",
"nodeType": "YulFunctionCall",
"src": "763:24:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "751:6:1",
"nodeType": "YulIdentifier",
"src": "751:6:1"
},
"nativeSrc": "751:37:1",
"nodeType": "YulFunctionCall",
"src": "751:37:1"
},
"nativeSrc": "751:37:1",
"nodeType": "YulExpressionStatement",
"src": "751:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "676:118:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "729:5:1",
"nodeType": "YulTypedName",
"src": "729:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "736:3:1",
"nodeType": "YulTypedName",
"src": "736:3:1",
"type": ""
}
],
"src": "676:118:1"
},
{
"body": {
"nativeSrc": "898:124:1",
"nodeType": "YulBlock",
"src": "898:124:1",
"statements": [
{
"nativeSrc": "908:26:1",
"nodeType": "YulAssignment",
"src": "908:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "920:9:1",
"nodeType": "YulIdentifier",
"src": "920:9:1"
},
{
"kind": "number",
"nativeSrc": "931:2:1",
"nodeType": "YulLiteral",
"src": "931:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "916:3:1",
"nodeType": "YulIdentifier",
"src": "916:3:1"
},
"nativeSrc": "916:18:1",
"nodeType": "YulFunctionCall",
"src": "916:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "908:4:1",
"nodeType": "YulIdentifier",
"src": "908:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "988:6:1",
"nodeType": "YulIdentifier",
"src": "988:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1001:9:1",
"nodeType": "YulIdentifier",
"src": "1001:9:1"
},
{
"kind": "number",
"nativeSrc": "1012:1:1",
"nodeType": "YulLiteral",
"src": "1012:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "997:3:1",
"nodeType": "YulIdentifier",
"src": "997:3:1"
},
"nativeSrc": "997:17:1",
"nodeType": "YulFunctionCall",
"src": "997:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "944:43:1",
"nodeType": "YulIdentifier",
"src": "944:43:1"
},
"nativeSrc": "944:71:1",
"nodeType": "YulFunctionCall",
"src": "944:71:1"
},
"nativeSrc": "944:71:1",
"nodeType": "YulExpressionStatement",
"src": "944:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nativeSrc": "800:222:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "870:9:1",
"nodeType": "YulTypedName",
"src": "870:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "882:6:1",
"nodeType": "YulTypedName",
"src": "882:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "893:4:1",
"nodeType": "YulTypedName",
"src": "893:4:1",
"type": ""
}
],
"src": "800:222:1"
},
{
"body": {
"nativeSrc": "1068:35:1",
"nodeType": "YulBlock",
"src": "1068:35:1",
"statements": [
{
"nativeSrc": "1078:19:1",
"nodeType": "YulAssignment",
"src": "1078:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1094:2:1",
"nodeType": "YulLiteral",
"src": "1094:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "1088:5:1",
"nodeType": "YulIdentifier",
"src": "1088:5:1"
},
"nativeSrc": "1088:9:1",
"nodeType": "YulFunctionCall",
"src": "1088:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "1078:6:1",
"nodeType": "YulIdentifier",
"src": "1078:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1028:75:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "1061:6:1",
"nodeType": "YulTypedName",
"src": "1061:6:1",
"type": ""
}
],
"src": "1028:75:1"
},
{
"body": {
"nativeSrc": "1198:28:1",
"nodeType": "YulBlock",
"src": "1198:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1215:1:1",
"nodeType": "YulLiteral",
"src": "1215:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1218:1:1",
"nodeType": "YulLiteral",
"src": "1218:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1208:6:1",
"nodeType": "YulIdentifier",
"src": "1208:6:1"
},
"nativeSrc": "1208:12:1",
"nodeType": "YulFunctionCall",
"src": "1208:12:1"
},
"nativeSrc": "1208:12:1",
"nodeType": "YulExpressionStatement",
"src": "1208:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1109:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1109:117:1"
},
{
"body": {
"nativeSrc": "1321:28:1",
"nodeType": "YulBlock",
"src": "1321:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1338:1:1",
"nodeType": "YulLiteral",
"src": "1338:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1341:1:1",
"nodeType": "YulLiteral",
"src": "1341:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1331:6:1",
"nodeType": "YulIdentifier",
"src": "1331:6:1"
},
"nativeSrc": "1331:12:1",
"nodeType": "YulFunctionCall",
"src": "1331:12:1"
},
"nativeSrc": "1331:12:1",
"nodeType": "YulExpressionStatement",
"src": "1331:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "1232:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1232:117:1"
},
{
"body": {
"nativeSrc": "1444:28:1",
"nodeType": "YulBlock",
"src": "1444:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1461:1:1",
"nodeType": "YulLiteral",
"src": "1461:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1464:1:1",
"nodeType": "YulLiteral",
"src": "1464:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1454:6:1",
"nodeType": "YulIdentifier",
"src": "1454:6:1"
},
"nativeSrc": "1454:12:1",
"nodeType": "YulFunctionCall",
"src": "1454:12:1"
},
"nativeSrc": "1454:12:1",
"nodeType": "YulExpressionStatement",
"src": "1454:12:1"
}
]
},
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "1355:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1355:117:1"
},
{
"body": {
"nativeSrc": "1567:28:1",
"nodeType": "YulBlock",
"src": "1567:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1584:1:1",
"nodeType": "YulLiteral",
"src": "1584:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1587:1:1",
"nodeType": "YulLiteral",
"src": "1587:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1577:6:1",
"nodeType": "YulIdentifier",
"src": "1577:6:1"
},
"nativeSrc": "1577:12:1",
"nodeType": "YulFunctionCall",
"src": "1577:12:1"
},
"nativeSrc": "1577:12:1",
"nodeType": "YulExpressionStatement",
"src": "1577:12:1"
}
]
},
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "1478:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1478:117:1"
},
{
"body": {
"nativeSrc": "1690:28:1",
"nodeType": "YulBlock",
"src": "1690:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1707:1:1",
"nodeType": "YulLiteral",
"src": "1707:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1710:1:1",
"nodeType": "YulLiteral",
"src": "1710:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1700:6:1",
"nodeType": "YulIdentifier",
"src": "1700:6:1"
},
"nativeSrc": "1700:12:1",
"nodeType": "YulFunctionCall",
"src": "1700:12:1"
},
"nativeSrc": "1700:12:1",
"nodeType": "YulExpressionStatement",
"src": "1700:12:1"
}
]
},
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "1601:117:1",
"nodeType": "YulFunctionDefinition",
"src": "1601:117:1"
},
{
"body": {
"nativeSrc": "1813:478:1",
"nodeType": "YulBlock",
"src": "1813:478:1",
"statements": [
{
"body": {
"nativeSrc": "1862:83:1",
"nodeType": "YulBlock",
"src": "1862:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "1864:77:1",
"nodeType": "YulIdentifier",
"src": "1864:77:1"
},
"nativeSrc": "1864:79:1",
"nodeType": "YulFunctionCall",
"src": "1864:79:1"
},
"nativeSrc": "1864:79:1",
"nodeType": "YulExpressionStatement",
"src": "1864:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "offset",
"nativeSrc": "1841:6:1",
"nodeType": "YulIdentifier",
"src": "1841:6:1"
},
{
"kind": "number",
"nativeSrc": "1849:4:1",
"nodeType": "YulLiteral",
"src": "1849:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1837:3:1",
"nodeType": "YulIdentifier",
"src": "1837:3:1"
},
"nativeSrc": "1837:17:1",
"nodeType": "YulFunctionCall",
"src": "1837:17:1"
},
{
"name": "end",
"nativeSrc": "1856:3:1",
"nodeType": "YulIdentifier",
"src": "1856:3:1"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "1833:3:1",
"nodeType": "YulIdentifier",
"src": "1833:3:1"
},
"nativeSrc": "1833:27:1",
"nodeType": "YulFunctionCall",
"src": "1833:27:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "1826:6:1",
"nodeType": "YulIdentifier",
"src": "1826:6:1"
},
"nativeSrc": "1826:35:1",
"nodeType": "YulFunctionCall",
"src": "1826:35:1"
},
"nativeSrc": "1823:122:1",
"nodeType": "YulIf",
"src": "1823:122:1"
},
{
"nativeSrc": "1954:30:1",
"nodeType": "YulAssignment",
"src": "1954:30:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "1977:6:1",
"nodeType": "YulIdentifier",
"src": "1977:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "1964:12:1",
"nodeType": "YulIdentifier",
"src": "1964:12:1"
},
"nativeSrc": "1964:20:1",
"nodeType": "YulFunctionCall",
"src": "1964:20:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "1954:6:1",
"nodeType": "YulIdentifier",
"src": "1954:6:1"
}
]
},
{
"body": {
"nativeSrc": "2027:83:1",
"nodeType": "YulBlock",
"src": "2027:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "2029:77:1",
"nodeType": "YulIdentifier",
"src": "2029:77:1"
},
"nativeSrc": "2029:79:1",
"nodeType": "YulFunctionCall",
"src": "2029:79:1"
},
"nativeSrc": "2029:79:1",
"nodeType": "YulExpressionStatement",
"src": "2029:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "length",
"nativeSrc": "1999:6:1",
"nodeType": "YulIdentifier",
"src": "1999:6:1"
},
{
"kind": "number",
"nativeSrc": "2007:18:1",
"nodeType": "YulLiteral",
"src": "2007:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "1996:2:1",
"nodeType": "YulIdentifier",
"src": "1996:2:1"
},
"nativeSrc": "1996:30:1",
"nodeType": "YulFunctionCall",
"src": "1996:30:1"
},
"nativeSrc": "1993:117:1",
"nodeType": "YulIf",
"src": "1993:117:1"
},
{
"nativeSrc": "2119:29:1",
"nodeType": "YulAssignment",
"src": "2119:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2135:6:1",
"nodeType": "YulIdentifier",
"src": "2135:6:1"
},
{
"kind": "number",
"nativeSrc": "2143:4:1",
"nodeType": "YulLiteral",
"src": "2143:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2131:3:1",
"nodeType": "YulIdentifier",
"src": "2131:3:1"
},
"nativeSrc": "2131:17:1",
"nodeType": "YulFunctionCall",
"src": "2131:17:1"
},
"variableNames": [
{
"name": "arrayPos",
"nativeSrc": "2119:8:1",
"nodeType": "YulIdentifier",
"src": "2119:8:1"
}
]
},
{
"body": {
"nativeSrc": "2202:83:1",
"nodeType": "YulBlock",
"src": "2202:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "2204:77:1",
"nodeType": "YulIdentifier",
"src": "2204:77:1"
},
"nativeSrc": "2204:79:1",
"nodeType": "YulFunctionCall",
"src": "2204:79:1"
},
"nativeSrc": "2204:79:1",
"nodeType": "YulExpressionStatement",
"src": "2204:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "arrayPos",
"nativeSrc": "2167:8:1",
"nodeType": "YulIdentifier",
"src": "2167:8:1"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "2181:6:1",
"nodeType": "YulIdentifier",
"src": "2181:6:1"
},
{
"kind": "number",
"nativeSrc": "2189:4:1",
"nodeType": "YulLiteral",
"src": "2189:4:1",
"type": "",
"value": "0x01"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "2177:3:1",
"nodeType": "YulIdentifier",
"src": "2177:3:1"
},
"nativeSrc": "2177:17:1",
"nodeType": "YulFunctionCall",
"src": "2177:17:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2163:3:1",
"nodeType": "YulIdentifier",
"src": "2163:3:1"
},
"nativeSrc": "2163:32:1",
"nodeType": "YulFunctionCall",
"src": "2163:32:1"
},
{
"name": "end",
"nativeSrc": "2197:3:1",
"nodeType": "YulIdentifier",
"src": "2197:3:1"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "2160:2:1",
"nodeType": "YulIdentifier",
"src": "2160:2:1"
},
"nativeSrc": "2160:41:1",
"nodeType": "YulFunctionCall",
"src": "2160:41:1"
},
"nativeSrc": "2157:128:1",
"nodeType": "YulIf",
"src": "2157:128:1"
}
]
},
"name": "abi_decode_t_string_calldata_ptr",
"nativeSrc": "1738:553:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "1780:6:1",
"nodeType": "YulTypedName",
"src": "1780:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "1788:3:1",
"nodeType": "YulTypedName",
"src": "1788:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "arrayPos",
"nativeSrc": "1796:8:1",
"nodeType": "YulTypedName",
"src": "1796:8:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "1806:6:1",
"nodeType": "YulTypedName",
"src": "1806:6:1",
"type": ""
}
],
"src": "1738:553:1"
},
{
"body": {
"nativeSrc": "2383:443:1",
"nodeType": "YulBlock",
"src": "2383:443:1",
"statements": [
{
"body": {
"nativeSrc": "2429:83:1",
"nodeType": "YulBlock",
"src": "2429:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "2431:77:1",
"nodeType": "YulIdentifier",
"src": "2431:77:1"
},
"nativeSrc": "2431:79:1",
"nodeType": "YulFunctionCall",
"src": "2431:79:1"
},
"nativeSrc": "2431:79:1",
"nodeType": "YulExpressionStatement",
"src": "2431:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "2404:7:1",
"nodeType": "YulIdentifier",
"src": "2404:7:1"
},
{
"name": "headStart",
"nativeSrc": "2413:9:1",
"nodeType": "YulIdentifier",
"src": "2413:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "2400:3:1",
"nodeType": "YulIdentifier",
"src": "2400:3:1"
},
"nativeSrc": "2400:23:1",
"nodeType": "YulFunctionCall",
"src": "2400:23:1"
},
{
"kind": "number",
"nativeSrc": "2425:2:1",
"nodeType": "YulLiteral",
"src": "2425:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "2396:3:1",
"nodeType": "YulIdentifier",
"src": "2396:3:1"
},
"nativeSrc": "2396:32:1",
"nodeType": "YulFunctionCall",
"src": "2396:32:1"
},
"nativeSrc": "2393:119:1",
"nodeType": "YulIf",
"src": "2393:119:1"
},
{
"nativeSrc": "2522:297:1",
"nodeType": "YulBlock",
"src": "2522:297:1",
"statements": [
{
"nativeSrc": "2537:45:1",
"nodeType": "YulVariableDeclaration",
"src": "2537:45:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "2568:9:1",
"nodeType": "YulIdentifier",
"src": "2568:9:1"
},
{
"kind": "number",
"nativeSrc": "2579:1:1",
"nodeType": "YulLiteral",
"src": "2579:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2564:3:1",
"nodeType": "YulIdentifier",
"src": "2564:3:1"
},
"nativeSrc": "2564:17:1",
"nodeType": "YulFunctionCall",
"src": "2564:17:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "2551:12:1",
"nodeType": "YulIdentifier",
"src": "2551:12:1"
},
"nativeSrc": "2551:31:1",
"nodeType": "YulFunctionCall",
"src": "2551:31:1"
},
"variables": [
{
"name": "offset",
"nativeSrc": "2541:6:1",
"nodeType": "YulTypedName",
"src": "2541:6:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "2629:83:1",
"nodeType": "YulBlock",
"src": "2629:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "2631:77:1",
"nodeType": "YulIdentifier",
"src": "2631:77:1"
},
"nativeSrc": "2631:79:1",
"nodeType": "YulFunctionCall",
"src": "2631:79:1"
},
"nativeSrc": "2631:79:1",
"nodeType": "YulExpressionStatement",
"src": "2631:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nativeSrc": "2601:6:1",
"nodeType": "YulIdentifier",
"src": "2601:6:1"
},
{
"kind": "number",
"nativeSrc": "2609:18:1",
"nodeType": "YulLiteral",
"src": "2609:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "2598:2:1",
"nodeType": "YulIdentifier",
"src": "2598:2:1"
},
"nativeSrc": "2598:30:1",
"nodeType": "YulFunctionCall",
"src": "2598:30:1"
},
"nativeSrc": "2595:117:1",
"nodeType": "YulIf",
"src": "2595:117:1"
},
{
"nativeSrc": "2726:83:1",
"nodeType": "YulAssignment",
"src": "2726:83:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "2781:9:1",
"nodeType": "YulIdentifier",
"src": "2781:9:1"
},
{
"name": "offset",
"nativeSrc": "2792:6:1",
"nodeType": "YulIdentifier",
"src": "2792:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2777:3:1",
"nodeType": "YulIdentifier",
"src": "2777:3:1"
},
"nativeSrc": "2777:22:1",
"nodeType": "YulFunctionCall",
"src": "2777:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "2801:7:1",
"nodeType": "YulIdentifier",
"src": "2801:7:1"
}
],
"functionName": {
"name": "abi_decode_t_string_calldata_ptr",
"nativeSrc": "2744:32:1",
"nodeType": "YulIdentifier",
"src": "2744:32:1"
},
"nativeSrc": "2744:65:1",
"nodeType": "YulFunctionCall",
"src": "2744:65:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "2726:6:1",
"nodeType": "YulIdentifier",
"src": "2726:6:1"
},
{
"name": "value1",
"nativeSrc": "2734:6:1",
"nodeType": "YulIdentifier",
"src": "2734:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_string_calldata_ptr",
"nativeSrc": "2297:529:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "2345:9:1",
"nodeType": "YulTypedName",
"src": "2345:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "2356:7:1",
"nodeType": "YulTypedName",
"src": "2356:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "2368:6:1",
"nodeType": "YulTypedName",
"src": "2368:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "2376:6:1",
"nodeType": "YulTypedName",
"src": "2376:6:1",
"type": ""
}
],
"src": "2297:529:1"
},
{
"body": {
"nativeSrc": "2875:79:1",
"nodeType": "YulBlock",
"src": "2875:79:1",
"statements": [
{
"body": {
"nativeSrc": "2932:16:1",
"nodeType": "YulBlock",
"src": "2932:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2941:1:1",
"nodeType": "YulLiteral",
"src": "2941:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "2944:1:1",
"nodeType": "YulLiteral",
"src": "2944:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "2934:6:1",
"nodeType": "YulIdentifier",
"src": "2934:6:1"
},
"nativeSrc": "2934:12:1",
"nodeType": "YulFunctionCall",
"src": "2934:12:1"
},
"nativeSrc": "2934:12:1",
"nodeType": "YulExpressionStatement",
"src": "2934:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "2898:5:1",
"nodeType": "YulIdentifier",
"src": "2898:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "2923:5:1",
"nodeType": "YulIdentifier",
"src": "2923:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "2905:17:1",
"nodeType": "YulIdentifier",
"src": "2905:17:1"
},
"nativeSrc": "2905:24:1",
"nodeType": "YulFunctionCall",
"src": "2905:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "2895:2:1",
"nodeType": "YulIdentifier",
"src": "2895:2:1"
},
"nativeSrc": "2895:35:1",
"nodeType": "YulFunctionCall",
"src": "2895:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "2888:6:1",
"nodeType": "YulIdentifier",
"src": "2888:6:1"
},
"nativeSrc": "2888:43:1",
"nodeType": "YulFunctionCall",
"src": "2888:43:1"
},
"nativeSrc": "2885:63:1",
"nodeType": "YulIf",
"src": "2885:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nativeSrc": "2832:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2868:5:1",
"nodeType": "YulTypedName",
"src": "2868:5:1",
"type": ""
}
],
"src": "2832:122:1"
},
{
"body": {
"nativeSrc": "3012:87:1",
"nodeType": "YulBlock",
"src": "3012:87:1",
"statements": [
{
"nativeSrc": "3022:29:1",
"nodeType": "YulAssignment",
"src": "3022:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "3044:6:1",
"nodeType": "YulIdentifier",
"src": "3044:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "3031:12:1",
"nodeType": "YulIdentifier",
"src": "3031:12:1"
},
"nativeSrc": "3031:20:1",
"nodeType": "YulFunctionCall",
"src": "3031:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "3022:5:1",
"nodeType": "YulIdentifier",
"src": "3022:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "3087:5:1",
"nodeType": "YulIdentifier",
"src": "3087:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nativeSrc": "3060:26:1",
"nodeType": "YulIdentifier",
"src": "3060:26:1"
},
"nativeSrc": "3060:33:1",
"nodeType": "YulFunctionCall",
"src": "3060:33:1"
},
"nativeSrc": "3060:33:1",
"nodeType": "YulExpressionStatement",
"src": "3060:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nativeSrc": "2960:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "2990:6:1",
"nodeType": "YulTypedName",
"src": "2990:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "2998:3:1",
"nodeType": "YulTypedName",
"src": "2998:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "3006:5:1",
"nodeType": "YulTypedName",
"src": "3006:5:1",
"type": ""
}
],
"src": "2960:139:1"
},
{
"body": {
"nativeSrc": "3171:263:1",
"nodeType": "YulBlock",
"src": "3171:263:1",
"statements": [
{
"body": {
"nativeSrc": "3217:83:1",
"nodeType": "YulBlock",
"src": "3217:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "3219:77:1",
"nodeType": "YulIdentifier",
"src": "3219:77:1"
},
"nativeSrc": "3219:79:1",
"nodeType": "YulFunctionCall",
"src": "3219:79:1"
},
"nativeSrc": "3219:79:1",
"nodeType": "YulExpressionStatement",
"src": "3219:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "3192:7:1",
"nodeType": "YulIdentifier",
"src": "3192:7:1"
},
{
"name": "headStart",
"nativeSrc": "3201:9:1",
"nodeType": "YulIdentifier",
"src": "3201:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "3188:3:1",
"nodeType": "YulIdentifier",
"src": "3188:3:1"
},
"nativeSrc": "3188:23:1",
"nodeType": "YulFunctionCall",
"src": "3188:23:1"
},
{
"kind": "number",
"nativeSrc": "3213:2:1",
"nodeType": "YulLiteral",
"src": "3213:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "3184:3:1",
"nodeType": "YulIdentifier",
"src": "3184:3:1"
},
"nativeSrc": "3184:32:1",
"nodeType": "YulFunctionCall",
"src": "3184:32:1"
},
"nativeSrc": "3181:119:1",
"nodeType": "YulIf",
"src": "3181:119:1"
},
{
"nativeSrc": "3310:117:1",
"nodeType": "YulBlock",
"src": "3310:117:1",
"statements": [
{
"nativeSrc": "3325:15:1",
"nodeType": "YulVariableDeclaration",
"src": "3325:15:1",
"value": {
"kind": "number",
"nativeSrc": "3339:1:1",
"nodeType": "YulLiteral",
"src": "3339:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "3329:6:1",
"nodeType": "YulTypedName",
"src": "3329:6:1",
"type": ""
}
]
},
{
"nativeSrc": "3354:63:1",
"nodeType": "YulAssignment",
"src": "3354:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "3389:9:1",
"nodeType": "YulIdentifier",
"src": "3389:9:1"
},
{
"name": "offset",
"nativeSrc": "3400:6:1",
"nodeType": "YulIdentifier",
"src": "3400:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3385:3:1",
"nodeType": "YulIdentifier",
"src": "3385:3:1"
},
"nativeSrc": "3385:22:1",
"nodeType": "YulFunctionCall",
"src": "3385:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "3409:7:1",
"nodeType": "YulIdentifier",
"src": "3409:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nativeSrc": "3364:20:1",
"nodeType": "YulIdentifier",
"src": "3364:20:1"
},
"nativeSrc": "3364:53:1",
"nodeType": "YulFunctionCall",
"src": "3364:53:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "3354:6:1",
"nodeType": "YulIdentifier",
"src": "3354:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nativeSrc": "3105:329:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "3141:9:1",
"nodeType": "YulTypedName",
"src": "3141:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "3152:7:1",
"nodeType": "YulTypedName",
"src": "3152:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "3164:6:1",
"nodeType": "YulTypedName",
"src": "3164:6:1",
"type": ""
}
],
"src": "3105:329:1"
},
{
"body": {
"nativeSrc": "3499:40:1",
"nodeType": "YulBlock",
"src": "3499:40:1",
"statements": [
{
"nativeSrc": "3510:22:1",
"nodeType": "YulAssignment",
"src": "3510:22:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "3526:5:1",
"nodeType": "YulIdentifier",
"src": "3526:5:1"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "3520:5:1",
"nodeType": "YulIdentifier",
"src": "3520:5:1"
},
"nativeSrc": "3520:12:1",
"nodeType": "YulFunctionCall",
"src": "3520:12:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "3510:6:1",
"nodeType": "YulIdentifier",
"src": "3510:6:1"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "3440:99:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3482:5:1",
"nodeType": "YulTypedName",
"src": "3482:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "3492:6:1",
"nodeType": "YulTypedName",
"src": "3492:6:1",
"type": ""
}
],
"src": "3440:99:1"
},
{
"body": {
"nativeSrc": "3641:73:1",
"nodeType": "YulBlock",
"src": "3641:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "3658:3:1",
"nodeType": "YulIdentifier",
"src": "3658:3:1"
},
{
"name": "length",
"nativeSrc": "3663:6:1",
"nodeType": "YulIdentifier",
"src": "3663:6:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3651:6:1",
"nodeType": "YulIdentifier",
"src": "3651:6:1"
},
"nativeSrc": "3651:19:1",
"nodeType": "YulFunctionCall",
"src": "3651:19:1"
},
"nativeSrc": "3651:19:1",
"nodeType": "YulExpressionStatement",
"src": "3651:19:1"
},
{
"nativeSrc": "3679:29:1",
"nodeType": "YulAssignment",
"src": "3679:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "3698:3:1",
"nodeType": "YulIdentifier",
"src": "3698:3:1"
},
{
"kind": "number",
"nativeSrc": "3703:4:1",
"nodeType": "YulLiteral",
"src": "3703:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3694:3:1",
"nodeType": "YulIdentifier",
"src": "3694:3:1"
},
"nativeSrc": "3694:14:1",
"nodeType": "YulFunctionCall",
"src": "3694:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nativeSrc": "3679:11:1",
"nodeType": "YulIdentifier",
"src": "3679:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "3545:169:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "3613:3:1",
"nodeType": "YulTypedName",
"src": "3613:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "3618:6:1",
"nodeType": "YulTypedName",
"src": "3618:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nativeSrc": "3629:11:1",
"nodeType": "YulTypedName",
"src": "3629:11:1",
"type": ""
}
],
"src": "3545:169:1"
},
{
"body": {
"nativeSrc": "3782:77:1",
"nodeType": "YulBlock",
"src": "3782:77:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nativeSrc": "3799:3:1",
"nodeType": "YulIdentifier",
"src": "3799:3:1"
},
{
"name": "src",
"nativeSrc": "3804:3:1",
"nodeType": "YulIdentifier",
"src": "3804:3:1"
},
{
"name": "length",
"nativeSrc": "3809:6:1",
"nodeType": "YulIdentifier",
"src": "3809:6:1"
}
],
"functionName": {
"name": "mcopy",
"nativeSrc": "3793:5:1",
"nodeType": "YulIdentifier",
"src": "3793:5:1"
},
"nativeSrc": "3793:23:1",
"nodeType": "YulFunctionCall",
"src": "3793:23:1"
},
"nativeSrc": "3793:23:1",
"nodeType": "YulExpressionStatement",
"src": "3793:23:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "3836:3:1",
"nodeType": "YulIdentifier",
"src": "3836:3:1"
},
{
"name": "length",
"nativeSrc": "3841:6:1",
"nodeType": "YulIdentifier",
"src": "3841:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3832:3:1",
"nodeType": "YulIdentifier",
"src": "3832:3:1"
},
"nativeSrc": "3832:16:1",
"nodeType": "YulFunctionCall",
"src": "3832:16:1"
},
{
"kind": "number",
"nativeSrc": "3850:1:1",
"nodeType": "YulLiteral",
"src": "3850:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "3825:6:1",
"nodeType": "YulIdentifier",
"src": "3825:6:1"
},
"nativeSrc": "3825:27:1",
"nodeType": "YulFunctionCall",
"src": "3825:27:1"
},
"nativeSrc": "3825:27:1",
"nodeType": "YulExpressionStatement",
"src": "3825:27:1"
}
]
},
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "3720:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nativeSrc": "3764:3:1",
"nodeType": "YulTypedName",
"src": "3764:3:1",
"type": ""
},
{
"name": "dst",
"nativeSrc": "3769:3:1",
"nodeType": "YulTypedName",
"src": "3769:3:1",
"type": ""
},
{
"name": "length",
"nativeSrc": "3774:6:1",
"nodeType": "YulTypedName",
"src": "3774:6:1",
"type": ""
}
],
"src": "3720:139:1"
},
{
"body": {
"nativeSrc": "3913:54:1",
"nodeType": "YulBlock",
"src": "3913:54:1",
"statements": [
{
"nativeSrc": "3923:38:1",
"nodeType": "YulAssignment",
"src": "3923:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "3941:5:1",
"nodeType": "YulIdentifier",
"src": "3941:5:1"
},
{
"kind": "number",
"nativeSrc": "3948:2:1",
"nodeType": "YulLiteral",
"src": "3948:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3937:3:1",
"nodeType": "YulIdentifier",
"src": "3937:3:1"
},
"nativeSrc": "3937:14:1",
"nodeType": "YulFunctionCall",
"src": "3937:14:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "3957:2:1",
"nodeType": "YulLiteral",
"src": "3957:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nativeSrc": "3953:3:1",
"nodeType": "YulIdentifier",
"src": "3953:3:1"
},
"nativeSrc": "3953:7:1",
"nodeType": "YulFunctionCall",
"src": "3953:7:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "3933:3:1",
"nodeType": "YulIdentifier",
"src": "3933:3:1"
},
"nativeSrc": "3933:28:1",
"nodeType": "YulFunctionCall",
"src": "3933:28:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "3923:6:1",
"nodeType": "YulIdentifier",
"src": "3923:6:1"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nativeSrc": "3865:102:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3896:5:1",
"nodeType": "YulTypedName",
"src": "3896:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "3906:6:1",
"nodeType": "YulTypedName",
"src": "3906:6:1",
"type": ""
}
],
"src": "3865:102:1"
},
{
"body": {
"nativeSrc": "4065:285:1",
"nodeType": "YulBlock",
"src": "4065:285:1",
"statements": [
{
"nativeSrc": "4075:53:1",
"nodeType": "YulVariableDeclaration",
"src": "4075:53:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "4122:5:1",
"nodeType": "YulIdentifier",
"src": "4122:5:1"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "4089:32:1",
"nodeType": "YulIdentifier",
"src": "4089:32:1"
},
"nativeSrc": "4089:39:1",
"nodeType": "YulFunctionCall",
"src": "4089:39:1"
},
"variables": [
{
"name": "length",
"nativeSrc": "4079:6:1",
"nodeType": "YulTypedName",
"src": "4079:6:1",
"type": ""
}
]
},
{
"nativeSrc": "4137:78:1",
"nodeType": "YulAssignment",
"src": "4137:78:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "4203:3:1",
"nodeType": "YulIdentifier",
"src": "4203:3:1"
},
{
"name": "length",
"nativeSrc": "4208:6:1",
"nodeType": "YulIdentifier",
"src": "4208:6:1"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "4144:58:1",
"nodeType": "YulIdentifier",
"src": "4144:58:1"
},
"nativeSrc": "4144:71:1",
"nodeType": "YulFunctionCall",
"src": "4144:71:1"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "4137:3:1",
"nodeType": "YulIdentifier",
"src": "4137:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "4263:5:1",
"nodeType": "YulIdentifier",
"src": "4263:5:1"
},
{
"kind": "number",
"nativeSrc": "4270:4:1",
"nodeType": "YulLiteral",
"src": "4270:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4259:3:1",
"nodeType": "YulIdentifier",
"src": "4259:3:1"
},
"nativeSrc": "4259:16:1",
"nodeType": "YulFunctionCall",
"src": "4259:16:1"
},
{
"name": "pos",
"nativeSrc": "4277:3:1",
"nodeType": "YulIdentifier",
"src": "4277:3:1"
},
{
"name": "length",
"nativeSrc": "4282:6:1",
"nodeType": "YulIdentifier",
"src": "4282:6:1"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "4224:34:1",
"nodeType": "YulIdentifier",
"src": "4224:34:1"
},
"nativeSrc": "4224:65:1",
"nodeType": "YulFunctionCall",
"src": "4224:65:1"
},
"nativeSrc": "4224:65:1",
"nodeType": "YulExpressionStatement",
"src": "4224:65:1"
},
{
"nativeSrc": "4298:46:1",
"nodeType": "YulAssignment",
"src": "4298:46:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "4309:3:1",
"nodeType": "YulIdentifier",
"src": "4309:3:1"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "4336:6:1",
"nodeType": "YulIdentifier",
"src": "4336:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nativeSrc": "4314:21:1",
"nodeType": "YulIdentifier",
"src": "4314:21:1"
},
"nativeSrc": "4314:29:1",
"nodeType": "YulFunctionCall",
"src": "4314:29:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4305:3:1",
"nodeType": "YulIdentifier",
"src": "4305:3:1"
},
"nativeSrc": "4305:39:1",
"nodeType": "YulFunctionCall",
"src": "4305:39:1"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "4298:3:1",
"nodeType": "YulIdentifier",
"src": "4298:3:1"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "3973:377:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "4046:5:1",
"nodeType": "YulTypedName",
"src": "4046:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "4053:3:1",
"nodeType": "YulTypedName",
"src": "4053:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "4061:3:1",
"nodeType": "YulTypedName",
"src": "4061:3:1",
"type": ""
}
],
"src": "3973:377:1"
},
{
"body": {
"nativeSrc": "4474:195:1",
"nodeType": "YulBlock",
"src": "4474:195:1",
"statements": [
{
"nativeSrc": "4484:26:1",
"nodeType": "YulAssignment",
"src": "4484:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "4496:9:1",
"nodeType": "YulIdentifier",
"src": "4496:9:1"
},
{
"kind": "number",
"nativeSrc": "4507:2:1",
"nodeType": "YulLiteral",
"src": "4507:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4492:3:1",
"nodeType": "YulIdentifier",
"src": "4492:3:1"
},
"nativeSrc": "4492:18:1",
"nodeType": "YulFunctionCall",
"src": "4492:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "4484:4:1",
"nodeType": "YulIdentifier",
"src": "4484:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "4531:9:1",
"nodeType": "YulIdentifier",
"src": "4531:9:1"
},
{
"kind": "number",
"nativeSrc": "4542:1:1",
"nodeType": "YulLiteral",
"src": "4542:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4527:3:1",
"nodeType": "YulIdentifier",
"src": "4527:3:1"
},
"nativeSrc": "4527:17:1",
"nodeType": "YulFunctionCall",
"src": "4527:17:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "4550:4:1",
"nodeType": "YulIdentifier",
"src": "4550:4:1"
},
{
"name": "headStart",
"nativeSrc": "4556:9:1",
"nodeType": "YulIdentifier",
"src": "4556:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "4546:3:1",
"nodeType": "YulIdentifier",
"src": "4546:3:1"
},
"nativeSrc": "4546:20:1",
"nodeType": "YulFunctionCall",
"src": "4546:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "4520:6:1",
"nodeType": "YulIdentifier",
"src": "4520:6:1"
},
"nativeSrc": "4520:47:1",
"nodeType": "YulFunctionCall",
"src": "4520:47:1"
},
"nativeSrc": "4520:47:1",
"nodeType": "YulExpressionStatement",
"src": "4520:47:1"
},
{
"nativeSrc": "4576:86:1",
"nodeType": "YulAssignment",
"src": "4576:86:1",
"value": {
"arguments": [
{
"name": "value0",
"nativeSrc": "4648:6:1",
"nodeType": "YulIdentifier",
"src": "4648:6:1"
},
{
"name": "tail",
"nativeSrc": "4657:4:1",
"nodeType": "YulIdentifier",
"src": "4657:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "4584:63:1",
"nodeType": "YulIdentifier",
"src": "4584:63:1"
},
"nativeSrc": "4584:78:1",
"nodeType": "YulFunctionCall",
"src": "4584:78:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "4576:4:1",
"nodeType": "YulIdentifier",
"src": "4576:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "4356:313:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "4446:9:1",
"nodeType": "YulTypedName",
"src": "4446:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "4458:6:1",
"nodeType": "YulTypedName",
"src": "4458:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "4469:4:1",
"nodeType": "YulTypedName",
"src": "4469:4:1",
"type": ""
}
],
"src": "4356:313:1"
},
{
"body": {
"nativeSrc": "4717:48:1",
"nodeType": "YulBlock",
"src": "4717:48:1",
"statements": [
{
"nativeSrc": "4727:32:1",
"nodeType": "YulAssignment",
"src": "4727:32:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "4752:5:1",
"nodeType": "YulIdentifier",
"src": "4752:5:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "4745:6:1",
"nodeType": "YulIdentifier",
"src": "4745:6:1"
},
"nativeSrc": "4745:13:1",
"nodeType": "YulFunctionCall",
"src": "4745:13:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "4738:6:1",
"nodeType": "YulIdentifier",
"src": "4738:6:1"
},
"nativeSrc": "4738:21:1",
"nodeType": "YulFunctionCall",
"src": "4738:21:1"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "4727:7:1",
"nodeType": "YulIdentifier",
"src": "4727:7:1"
}
]
}
]
},
"name": "cleanup_t_bool",
"nativeSrc": "4675:90:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "4699:5:1",
"nodeType": "YulTypedName",
"src": "4699:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "4709:7:1",
"nodeType": "YulTypedName",
"src": "4709:7:1",
"type": ""
}
],
"src": "4675:90:1"
},
{
"body": {
"nativeSrc": "4830:50:1",
"nodeType": "YulBlock",
"src": "4830:50:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "4847:3:1",
"nodeType": "YulIdentifier",
"src": "4847:3:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "4867:5:1",
"nodeType": "YulIdentifier",
"src": "4867:5:1"
}
],
"functionName": {
"name": "cleanup_t_bool",
"nativeSrc": "4852:14:1",
"nodeType": "YulIdentifier",
"src": "4852:14:1"
},
"nativeSrc": "4852:21:1",
"nodeType": "YulFunctionCall",
"src": "4852:21:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "4840:6:1",
"nodeType": "YulIdentifier",
"src": "4840:6:1"
},
"nativeSrc": "4840:34:1",
"nodeType": "YulFunctionCall",
"src": "4840:34:1"
},
"nativeSrc": "4840:34:1",
"nodeType": "YulExpressionStatement",
"src": "4840:34:1"
}
]
},
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nativeSrc": "4771:109:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "4818:5:1",
"nodeType": "YulTypedName",
"src": "4818:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "4825:3:1",
"nodeType": "YulTypedName",
"src": "4825:3:1",
"type": ""
}
],
"src": "4771:109:1"
},
{
"body": {
"nativeSrc": "4978:118:1",
"nodeType": "YulBlock",
"src": "4978:118:1",
"statements": [
{
"nativeSrc": "4988:26:1",
"nodeType": "YulAssignment",
"src": "4988:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "5000:9:1",
"nodeType": "YulIdentifier",
"src": "5000:9:1"
},
{
"kind": "number",
"nativeSrc": "5011:2:1",
"nodeType": "YulLiteral",
"src": "5011:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4996:3:1",
"nodeType": "YulIdentifier",
"src": "4996:3:1"
},
"nativeSrc": "4996:18:1",
"nodeType": "YulFunctionCall",
"src": "4996:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "4988:4:1",
"nodeType": "YulIdentifier",
"src": "4988:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "5062:6:1",
"nodeType": "YulIdentifier",
"src": "5062:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "5075:9:1",
"nodeType": "YulIdentifier",
"src": "5075:9:1"
},
{
"kind": "number",
"nativeSrc": "5086:1:1",
"nodeType": "YulLiteral",
"src": "5086:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5071:3:1",
"nodeType": "YulIdentifier",
"src": "5071:3:1"
},
"nativeSrc": "5071:17:1",
"nodeType": "YulFunctionCall",
"src": "5071:17:1"
}
],
"functionName": {
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nativeSrc": "5024:37:1",
"nodeType": "YulIdentifier",
"src": "5024:37:1"
},
"nativeSrc": "5024:65:1",
"nodeType": "YulFunctionCall",
"src": "5024:65:1"
},
"nativeSrc": "5024:65:1",
"nodeType": "YulExpressionStatement",
"src": "5024:65:1"
}
]
},
"name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed",
"nativeSrc": "4886:210:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "4950:9:1",
"nodeType": "YulTypedName",
"src": "4950:9:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "4962:6:1",
"nodeType": "YulTypedName",
"src": "4962:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "4973:4:1",
"nodeType": "YulTypedName",
"src": "4973:4:1",
"type": ""
}
],
"src": "4886:210:1"
},
{
"body": {
"nativeSrc": "5145:79:1",
"nodeType": "YulBlock",
"src": "5145:79:1",
"statements": [
{
"body": {
"nativeSrc": "5202:16:1",
"nodeType": "YulBlock",
"src": "5202:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "5211:1:1",
"nodeType": "YulLiteral",
"src": "5211:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "5214:1:1",
"nodeType": "YulLiteral",
"src": "5214:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "5204:6:1",
"nodeType": "YulIdentifier",
"src": "5204:6:1"
},
"nativeSrc": "5204:12:1",
"nodeType": "YulFunctionCall",
"src": "5204:12:1"
},
"nativeSrc": "5204:12:1",
"nodeType": "YulExpressionStatement",
"src": "5204:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "5168:5:1",
"nodeType": "YulIdentifier",
"src": "5168:5:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "5193:5:1",
"nodeType": "YulIdentifier",
"src": "5193:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "5175:17:1",
"nodeType": "YulIdentifier",
"src": "5175:17:1"
},
"nativeSrc": "5175:24:1",
"nodeType": "YulFunctionCall",
"src": "5175:24:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "5165:2:1",
"nodeType": "YulIdentifier",
"src": "5165:2:1"
},
"nativeSrc": "5165:35:1",
"nodeType": "YulFunctionCall",
"src": "5165:35:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "5158:6:1",
"nodeType": "YulIdentifier",
"src": "5158:6:1"
},
"nativeSrc": "5158:43:1",
"nodeType": "YulFunctionCall",
"src": "5158:43:1"
},
"nativeSrc": "5155:63:1",
"nodeType": "YulIf",
"src": "5155:63:1"
}
]
},
"name": "validator_revert_t_address",
"nativeSrc": "5102:122:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "5138:5:1",
"nodeType": "YulTypedName",
"src": "5138:5:1",
"type": ""
}
],
"src": "5102:122:1"
},
{
"body": {
"nativeSrc": "5282:87:1",
"nodeType": "YulBlock",
"src": "5282:87:1",
"statements": [
{
"nativeSrc": "5292:29:1",
"nodeType": "YulAssignment",
"src": "5292:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "5314:6:1",
"nodeType": "YulIdentifier",
"src": "5314:6:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "5301:12:1",
"nodeType": "YulIdentifier",
"src": "5301:12:1"
},
"nativeSrc": "5301:20:1",
"nodeType": "YulFunctionCall",
"src": "5301:20:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "5292:5:1",
"nodeType": "YulIdentifier",
"src": "5292:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "5357:5:1",
"nodeType": "YulIdentifier",
"src": "5357:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nativeSrc": "5330:26:1",
"nodeType": "YulIdentifier",
"src": "5330:26:1"
},
"nativeSrc": "5330:33:1",
"nodeType": "YulFunctionCall",
"src": "5330:33:1"
},
"nativeSrc": "5330:33:1",
"nodeType": "YulExpressionStatement",
"src": "5330:33:1"
}
]
},
"name": "abi_decode_t_address",
"nativeSrc": "5230:139:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "5260:6:1",
"nodeType": "YulTypedName",
"src": "5260:6:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "5268:3:1",
"nodeType": "YulTypedName",
"src": "5268:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "5276:5:1",
"nodeType": "YulTypedName",
"src": "5276:5:1",
"type": ""
}
],
"src": "5230:139:1"
},
{
"body": {
"nativeSrc": "5458:391:1",
"nodeType": "YulBlock",
"src": "5458:391:1",
"statements": [
{
"body": {
"nativeSrc": "5504:83:1",
"nodeType": "YulBlock",
"src": "5504:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "5506:77:1",
"nodeType": "YulIdentifier",
"src": "5506:77:1"
},
"nativeSrc": "5506:79:1",
"nodeType": "YulFunctionCall",
"src": "5506:79:1"
},
"nativeSrc": "5506:79:1",
"nodeType": "YulExpressionStatement",
"src": "5506:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "5479:7:1",
"nodeType": "YulIdentifier",
"src": "5479:7:1"
},
{
"name": "headStart",
"nativeSrc": "5488:9:1",
"nodeType": "YulIdentifier",
"src": "5488:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "5475:3:1",
"nodeType": "YulIdentifier",
"src": "5475:3:1"
},
"nativeSrc": "5475:23:1",
"nodeType": "YulFunctionCall",
"src": "5475:23:1"
},
{
"kind": "number",
"nativeSrc": "5500:2:1",
"nodeType": "YulLiteral",
"src": "5500:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "5471:3:1",
"nodeType": "YulIdentifier",
"src": "5471:3:1"
},
"nativeSrc": "5471:32:1",
"nodeType": "YulFunctionCall",
"src": "5471:32:1"
},
"nativeSrc": "5468:119:1",
"nodeType": "YulIf",
"src": "5468:119:1"
},
{
"nativeSrc": "5597:117:1",
"nodeType": "YulBlock",
"src": "5597:117:1",
"statements": [
{
"nativeSrc": "5612:15:1",
"nodeType": "YulVariableDeclaration",
"src": "5612:15:1",
"value": {
"kind": "number",
"nativeSrc": "5626:1:1",
"nodeType": "YulLiteral",
"src": "5626:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "5616:6:1",
"nodeType": "YulTypedName",
"src": "5616:6:1",
"type": ""
}
]
},
{
"nativeSrc": "5641:63:1",
"nodeType": "YulAssignment",
"src": "5641:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "5676:9:1",
"nodeType": "YulIdentifier",
"src": "5676:9:1"
},
{
"name": "offset",
"nativeSrc": "5687:6:1",
"nodeType": "YulIdentifier",
"src": "5687:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5672:3:1",
"nodeType": "YulIdentifier",
"src": "5672:3:1"
},
"nativeSrc": "5672:22:1",
"nodeType": "YulFunctionCall",
"src": "5672:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "5696:7:1",
"nodeType": "YulIdentifier",
"src": "5696:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nativeSrc": "5651:20:1",
"nodeType": "YulIdentifier",
"src": "5651:20:1"
},
"nativeSrc": "5651:53:1",
"nodeType": "YulFunctionCall",
"src": "5651:53:1"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "5641:6:1",
"nodeType": "YulIdentifier",
"src": "5641:6:1"
}
]
}
]
},
{
"nativeSrc": "5724:118:1",
"nodeType": "YulBlock",
"src": "5724:118:1",
"statements": [
{
"nativeSrc": "5739:16:1",
"nodeType": "YulVariableDeclaration",
"src": "5739:16:1",
"value": {
"kind": "number",
"nativeSrc": "5753:2:1",
"nodeType": "YulLiteral",
"src": "5753:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nativeSrc": "5743:6:1",
"nodeType": "YulTypedName",
"src": "5743:6:1",
"type": ""
}
]
},
{
"nativeSrc": "5769:63:1",
"nodeType": "YulAssignment",
"src": "5769:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "5804:9:1",
"nodeType": "YulIdentifier",
"src": "5804:9:1"
},
{
"name": "offset",
"nativeSrc": "5815:6:1",
"nodeType": "YulIdentifier",
"src": "5815:6:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5800:3:1",
"nodeType": "YulIdentifier",
"src": "5800:3:1"
},
"nativeSrc": "5800:22:1",
"nodeType": "YulFunctionCall",
"src": "5800:22:1"
},
{
"name": "dataEnd",
"nativeSrc": "5824:7:1",
"nodeType": "YulIdentifier",
"src": "5824:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nativeSrc": "5779:20:1",
"nodeType": "YulIdentifier",
"src": "5779:20:1"
},
"nativeSrc": "5779:53:1",
"nodeType": "YulFunctionCall",
"src": "5779:53:1"
},
"variableNames": [
{
"name": "value1",
"nativeSrc": "5769:6:1",
"nodeType": "YulIdentifier",
"src": "5769:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_address",
"nativeSrc": "5375:474:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "5420:9:1",
"nodeType": "YulTypedName",
"src": "5420:9:1",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "5431:7:1",
"nodeType": "YulTypedName",
"src": "5431:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "5443:6:1",
"nodeType": "YulTypedName",
"src": "5443:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "5451:6:1",
"nodeType": "YulTypedName",
"src": "5451:6:1",
"type": ""
}
],
"src": "5375:474:1"
},
{
"body": {
"nativeSrc": "5921:31:1",
"nodeType": "YulBlock",
"src": "5921:31:1",
"statements": [
{
"nativeSrc": "5932:13:1",
"nodeType": "YulAssignment",
"src": "5932:13:1",
"value": {
"name": "len",
"nativeSrc": "5942:3:1",
"nodeType": "YulIdentifier",
"src": "5942:3:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "5932:6:1",
"nodeType": "YulIdentifier",
"src": "5932:6:1"
}
]
}
]
},
"name": "array_length_t_string_calldata_ptr",
"nativeSrc": "5855:97:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "5899:5:1",
"nodeType": "YulTypedName",
"src": "5899:5:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "5906:3:1",
"nodeType": "YulTypedName",
"src": "5906:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "5914:6:1",
"nodeType": "YulTypedName",
"src": "5914:6:1",
"type": ""
}
],
"src": "5855:97:1"
},
{
"body": {
"nativeSrc": "5986:152:1",
"nodeType": "YulBlock",
"src": "5986:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6003:1:1",
"nodeType": "YulLiteral",
"src": "6003:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "6006:77:1",
"nodeType": "YulLiteral",
"src": "6006:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "5996:6:1",
"nodeType": "YulIdentifier",
"src": "5996:6:1"
},
"nativeSrc": "5996:88:1",
"nodeType": "YulFunctionCall",
"src": "5996:88:1"
},
"nativeSrc": "5996:88:1",
"nodeType": "YulExpressionStatement",
"src": "5996:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6100:1:1",
"nodeType": "YulLiteral",
"src": "6100:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "6103:4:1",
"nodeType": "YulLiteral",
"src": "6103:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6093:6:1",
"nodeType": "YulIdentifier",
"src": "6093:6:1"
},
"nativeSrc": "6093:15:1",
"nodeType": "YulFunctionCall",
"src": "6093:15:1"
},
"nativeSrc": "6093:15:1",
"nodeType": "YulExpressionStatement",
"src": "6093:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6124:1:1",
"nodeType": "YulLiteral",
"src": "6124:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "6127:4:1",
"nodeType": "YulLiteral",
"src": "6127:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "6117:6:1",
"nodeType": "YulIdentifier",
"src": "6117:6:1"
},
"nativeSrc": "6117:15:1",
"nodeType": "YulFunctionCall",
"src": "6117:15:1"
},
"nativeSrc": "6117:15:1",
"nodeType": "YulExpressionStatement",
"src": "6117:15:1"
}
]
},
"name": "panic_error_0x41",
"nativeSrc": "5958:180:1",
"nodeType": "YulFunctionDefinition",
"src": "5958:180:1"
},
{
"body": {
"nativeSrc": "6172:152:1",
"nodeType": "YulBlock",
"src": "6172:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6189:1:1",
"nodeType": "YulLiteral",
"src": "6189:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "6192:77:1",
"nodeType": "YulLiteral",
"src": "6192:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6182:6:1",
"nodeType": "YulIdentifier",
"src": "6182:6:1"
},
"nativeSrc": "6182:88:1",
"nodeType": "YulFunctionCall",
"src": "6182:88:1"
},
"nativeSrc": "6182:88:1",
"nodeType": "YulExpressionStatement",
"src": "6182:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6286:1:1",
"nodeType": "YulLiteral",
"src": "6286:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "6289:4:1",
"nodeType": "YulLiteral",
"src": "6289:4:1",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6279:6:1",
"nodeType": "YulIdentifier",
"src": "6279:6:1"
},
"nativeSrc": "6279:15:1",
"nodeType": "YulFunctionCall",
"src": "6279:15:1"
},
"nativeSrc": "6279:15:1",
"nodeType": "YulExpressionStatement",
"src": "6279:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6310:1:1",
"nodeType": "YulLiteral",
"src": "6310:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "6313:4:1",
"nodeType": "YulLiteral",
"src": "6313:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "6303:6:1",
"nodeType": "YulIdentifier",
"src": "6303:6:1"
},
"nativeSrc": "6303:15:1",
"nodeType": "YulFunctionCall",
"src": "6303:15:1"
},
"nativeSrc": "6303:15:1",
"nodeType": "YulExpressionStatement",
"src": "6303:15:1"
}
]
},
"name": "panic_error_0x22",
"nativeSrc": "6144:180:1",
"nodeType": "YulFunctionDefinition",
"src": "6144:180:1"
},
{
"body": {
"nativeSrc": "6381:269:1",
"nodeType": "YulBlock",
"src": "6381:269:1",
"statements": [
{
"nativeSrc": "6391:22:1",
"nodeType": "YulAssignment",
"src": "6391:22:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "6405:4:1",
"nodeType": "YulIdentifier",
"src": "6405:4:1"
},
{
"kind": "number",
"nativeSrc": "6411:1:1",
"nodeType": "YulLiteral",
"src": "6411:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nativeSrc": "6401:3:1",
"nodeType": "YulIdentifier",
"src": "6401:3:1"
},
"nativeSrc": "6401:12:1",
"nodeType": "YulFunctionCall",
"src": "6401:12:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "6391:6:1",
"nodeType": "YulIdentifier",
"src": "6391:6:1"
}
]
},
{
"nativeSrc": "6422:38:1",
"nodeType": "YulVariableDeclaration",
"src": "6422:38:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "6452:4:1",
"nodeType": "YulIdentifier",
"src": "6452:4:1"
},
{
"kind": "number",
"nativeSrc": "6458:1:1",
"nodeType": "YulLiteral",
"src": "6458:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "6448:3:1",
"nodeType": "YulIdentifier",
"src": "6448:3:1"
},
"nativeSrc": "6448:12:1",
"nodeType": "YulFunctionCall",
"src": "6448:12:1"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "6426:18:1",
"nodeType": "YulTypedName",
"src": "6426:18:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "6499:51:1",
"nodeType": "YulBlock",
"src": "6499:51:1",
"statements": [
{
"nativeSrc": "6513:27:1",
"nodeType": "YulAssignment",
"src": "6513:27:1",
"value": {
"arguments": [
{
"name": "length",
"nativeSrc": "6527:6:1",
"nodeType": "YulIdentifier",
"src": "6527:6:1"
},
{
"kind": "number",
"nativeSrc": "6535:4:1",
"nodeType": "YulLiteral",
"src": "6535:4:1",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "6523:3:1",
"nodeType": "YulIdentifier",
"src": "6523:3:1"
},
"nativeSrc": "6523:17:1",
"nodeType": "YulFunctionCall",
"src": "6523:17:1"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "6513:6:1",
"nodeType": "YulIdentifier",
"src": "6513:6:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "6479:18:1",
"nodeType": "YulIdentifier",
"src": "6479:18:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "6472:6:1",
"nodeType": "YulIdentifier",
"src": "6472:6:1"
},
"nativeSrc": "6472:26:1",
"nodeType": "YulFunctionCall",
"src": "6472:26:1"
},
"nativeSrc": "6469:81:1",
"nodeType": "YulIf",
"src": "6469:81:1"
},
{
"body": {
"nativeSrc": "6602:42:1",
"nodeType": "YulBlock",
"src": "6602:42:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nativeSrc": "6616:16:1",
"nodeType": "YulIdentifier",
"src": "6616:16:1"
},
"nativeSrc": "6616:18:1",
"nodeType": "YulFunctionCall",
"src": "6616:18:1"
},
"nativeSrc": "6616:18:1",
"nodeType": "YulExpressionStatement",
"src": "6616:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "6566:18:1",
"nodeType": "YulIdentifier",
"src": "6566:18:1"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "6589:6:1",
"nodeType": "YulIdentifier",
"src": "6589:6:1"
},
{
"kind": "number",
"nativeSrc": "6597:2:1",
"nodeType": "YulLiteral",
"src": "6597:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "6586:2:1",
"nodeType": "YulIdentifier",
"src": "6586:2:1"
},
"nativeSrc": "6586:14:1",
"nodeType": "YulFunctionCall",
"src": "6586:14:1"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "6563:2:1",
"nodeType": "YulIdentifier",
"src": "6563:2:1"
},
"nativeSrc": "6563:38:1",
"nodeType": "YulFunctionCall",
"src": "6563:38:1"
},
"nativeSrc": "6560:84:1",
"nodeType": "YulIf",
"src": "6560:84:1"
}
]
},
"name": "extract_byte_array_length",
"nativeSrc": "6330:320:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "6365:4:1",
"nodeType": "YulTypedName",
"src": "6365:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "6374:6:1",
"nodeType": "YulTypedName",
"src": "6374:6:1",
"type": ""
}
],
"src": "6330:320:1"
},
{
"body": {
"nativeSrc": "6710:87:1",
"nodeType": "YulBlock",
"src": "6710:87:1",
"statements": [
{
"nativeSrc": "6720:11:1",
"nodeType": "YulAssignment",
"src": "6720:11:1",
"value": {
"name": "ptr",
"nativeSrc": "6728:3:1",
"nodeType": "YulIdentifier",
"src": "6728:3:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "6720:4:1",
"nodeType": "YulIdentifier",
"src": "6720:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6748:1:1",
"nodeType": "YulLiteral",
"src": "6748:1:1",
"type": "",
"value": "0"
},
{
"name": "ptr",
"nativeSrc": "6751:3:1",
"nodeType": "YulIdentifier",
"src": "6751:3:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6741:6:1",
"nodeType": "YulIdentifier",
"src": "6741:6:1"
},
"nativeSrc": "6741:14:1",
"nodeType": "YulFunctionCall",
"src": "6741:14:1"
},
"nativeSrc": "6741:14:1",
"nodeType": "YulExpressionStatement",
"src": "6741:14:1"
},
{
"nativeSrc": "6764:26:1",
"nodeType": "YulAssignment",
"src": "6764:26:1",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "6782:1:1",
"nodeType": "YulLiteral",
"src": "6782:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "6785:4:1",
"nodeType": "YulLiteral",
"src": "6785:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "keccak256",
"nativeSrc": "6772:9:1",
"nodeType": "YulIdentifier",
"src": "6772:9:1"
},
"nativeSrc": "6772:18:1",
"nodeType": "YulFunctionCall",
"src": "6772:18:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "6764:4:1",
"nodeType": "YulIdentifier",
"src": "6764:4:1"
}
]
}
]
},
"name": "array_dataslot_t_string_storage",
"nativeSrc": "6656:141:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nativeSrc": "6697:3:1",
"nodeType": "YulTypedName",
"src": "6697:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "data",
"nativeSrc": "6705:4:1",
"nodeType": "YulTypedName",
"src": "6705:4:1",
"type": ""
}
],
"src": "6656:141:1"
},
{
"body": {
"nativeSrc": "6847:49:1",
"nodeType": "YulBlock",
"src": "6847:49:1",
"statements": [
{
"nativeSrc": "6857:33:1",
"nodeType": "YulAssignment",
"src": "6857:33:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "6875:5:1",
"nodeType": "YulIdentifier",
"src": "6875:5:1"
},
{
"kind": "number",
"nativeSrc": "6882:2:1",
"nodeType": "YulLiteral",
"src": "6882:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6871:3:1",
"nodeType": "YulIdentifier",
"src": "6871:3:1"
},
"nativeSrc": "6871:14:1",
"nodeType": "YulFunctionCall",
"src": "6871:14:1"
},
{
"kind": "number",
"nativeSrc": "6887:2:1",
"nodeType": "YulLiteral",
"src": "6887:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "div",
"nativeSrc": "6867:3:1",
"nodeType": "YulIdentifier",
"src": "6867:3:1"
},
"nativeSrc": "6867:23:1",
"nodeType": "YulFunctionCall",
"src": "6867:23:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "6857:6:1",
"nodeType": "YulIdentifier",
"src": "6857:6:1"
}
]
}
]
},
"name": "divide_by_32_ceil",
"nativeSrc": "6803:93:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "6830:5:1",
"nodeType": "YulTypedName",
"src": "6830:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "6840:6:1",
"nodeType": "YulTypedName",
"src": "6840:6:1",
"type": ""
}
],
"src": "6803:93:1"
},
{
"body": {
"nativeSrc": "6955:54:1",
"nodeType": "YulBlock",
"src": "6955:54:1",
"statements": [
{
"nativeSrc": "6965:37:1",
"nodeType": "YulAssignment",
"src": "6965:37:1",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "6990:4:1",
"nodeType": "YulIdentifier",
"src": "6990:4:1"
},
{
"name": "value",
"nativeSrc": "6996:5:1",
"nodeType": "YulIdentifier",
"src": "6996:5:1"
}
],
"functionName": {
"name": "shl",
"nativeSrc": "6986:3:1",
"nodeType": "YulIdentifier",
"src": "6986:3:1"
},
"nativeSrc": "6986:16:1",
"nodeType": "YulFunctionCall",
"src": "6986:16:1"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "6965:8:1",
"nodeType": "YulIdentifier",
"src": "6965:8:1"
}
]
}
]
},
"name": "shift_left_dynamic",
"nativeSrc": "6902:107:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "6930:4:1",
"nodeType": "YulTypedName",
"src": "6930:4:1",
"type": ""
},
{
"name": "value",
"nativeSrc": "6936:5:1",
"nodeType": "YulTypedName",
"src": "6936:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "6946:8:1",
"nodeType": "YulTypedName",
"src": "6946:8:1",
"type": ""
}
],
"src": "6902:107:1"
},
{
"body": {
"nativeSrc": "7091:317:1",
"nodeType": "YulBlock",
"src": "7091:317:1",
"statements": [
{
"nativeSrc": "7101:35:1",
"nodeType": "YulVariableDeclaration",
"src": "7101:35:1",
"value": {
"arguments": [
{
"name": "shiftBytes",
"nativeSrc": "7122:10:1",
"nodeType": "YulIdentifier",
"src": "7122:10:1"
},
{
"kind": "number",
"nativeSrc": "7134:1:1",
"nodeType": "YulLiteral",
"src": "7134:1:1",
"type": "",
"value": "8"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "7118:3:1",
"nodeType": "YulIdentifier",
"src": "7118:3:1"
},
"nativeSrc": "7118:18:1",
"nodeType": "YulFunctionCall",
"src": "7118:18:1"
},
"variables": [
{
"name": "shiftBits",
"nativeSrc": "7105:9:1",
"nodeType": "YulTypedName",
"src": "7105:9:1",
"type": ""
}
]
},
{
"nativeSrc": "7145:109:1",
"nodeType": "YulVariableDeclaration",
"src": "7145:109:1",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "7176:9:1",
"nodeType": "YulIdentifier",
"src": "7176:9:1"
},
{
"kind": "number",
"nativeSrc": "7187:66:1",
"nodeType": "YulLiteral",
"src": "7187:66:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "7157:18:1",
"nodeType": "YulIdentifier",
"src": "7157:18:1"
},
"nativeSrc": "7157:97:1",
"nodeType": "YulFunctionCall",
"src": "7157:97:1"
},
"variables": [
{
"name": "mask",
"nativeSrc": "7149:4:1",
"nodeType": "YulTypedName",
"src": "7149:4:1",
"type": ""
}
]
},
{
"nativeSrc": "7263:51:1",
"nodeType": "YulAssignment",
"src": "7263:51:1",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "7294:9:1",
"nodeType": "YulIdentifier",
"src": "7294:9:1"
},
{
"name": "toInsert",
"nativeSrc": "7305:8:1",
"nodeType": "YulIdentifier",
"src": "7305:8:1"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "7275:18:1",
"nodeType": "YulIdentifier",
"src": "7275:18:1"
},
"nativeSrc": "7275:39:1",
"nodeType": "YulFunctionCall",
"src": "7275:39:1"
},
"variableNames": [
{
"name": "toInsert",
"nativeSrc": "7263:8:1",
"nodeType": "YulIdentifier",
"src": "7263:8:1"
}
]
},
{
"nativeSrc": "7323:30:1",
"nodeType": "YulAssignment",
"src": "7323:30:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "7336:5:1",
"nodeType": "YulIdentifier",
"src": "7336:5:1"
},
{
"arguments": [
{
"name": "mask",
"nativeSrc": "7347:4:1",
"nodeType": "YulIdentifier",
"src": "7347:4:1"
}
],
"functionName": {
"name": "not",
"nativeSrc": "7343:3:1",
"nodeType": "YulIdentifier",
"src": "7343:3:1"
},
"nativeSrc": "7343:9:1",
"nodeType": "YulFunctionCall",
"src": "7343:9:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "7332:3:1",
"nodeType": "YulIdentifier",
"src": "7332:3:1"
},
"nativeSrc": "7332:21:1",
"nodeType": "YulFunctionCall",
"src": "7332:21:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "7323:5:1",
"nodeType": "YulIdentifier",
"src": "7323:5:1"
}
]
},
{
"nativeSrc": "7362:40:1",
"nodeType": "YulAssignment",
"src": "7362:40:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "7375:5:1",
"nodeType": "YulIdentifier",
"src": "7375:5:1"
},
{
"arguments": [
{
"name": "toInsert",
"nativeSrc": "7386:8:1",
"nodeType": "YulIdentifier",
"src": "7386:8:1"
},
{
"name": "mask",
"nativeSrc": "7396:4:1",
"nodeType": "YulIdentifier",
"src": "7396:4:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "7382:3:1",
"nodeType": "YulIdentifier",
"src": "7382:3:1"
},
"nativeSrc": "7382:19:1",
"nodeType": "YulFunctionCall",
"src": "7382:19:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "7372:2:1",
"nodeType": "YulIdentifier",
"src": "7372:2:1"
},
"nativeSrc": "7372:30:1",
"nodeType": "YulFunctionCall",
"src": "7372:30:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "7362:6:1",
"nodeType": "YulIdentifier",
"src": "7362:6:1"
}
]
}
]
},
"name": "update_byte_slice_dynamic32",
"nativeSrc": "7015:393:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "7052:5:1",
"nodeType": "YulTypedName",
"src": "7052:5:1",
"type": ""
},
{
"name": "shiftBytes",
"nativeSrc": "7059:10:1",
"nodeType": "YulTypedName",
"src": "7059:10:1",
"type": ""
},
{
"name": "toInsert",
"nativeSrc": "7071:8:1",
"nodeType": "YulTypedName",
"src": "7071:8:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "7084:6:1",
"nodeType": "YulTypedName",
"src": "7084:6:1",
"type": ""
}
],
"src": "7015:393:1"
},
{
"body": {
"nativeSrc": "7446:28:1",
"nodeType": "YulBlock",
"src": "7446:28:1",
"statements": [
{
"nativeSrc": "7456:12:1",
"nodeType": "YulAssignment",
"src": "7456:12:1",
"value": {
"name": "value",
"nativeSrc": "7463:5:1",
"nodeType": "YulIdentifier",
"src": "7463:5:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "7456:3:1",
"nodeType": "YulIdentifier",
"src": "7456:3:1"
}
]
}
]
},
"name": "identity",
"nativeSrc": "7414:60:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "7432:5:1",
"nodeType": "YulTypedName",
"src": "7432:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "7442:3:1",
"nodeType": "YulTypedName",
"src": "7442:3:1",
"type": ""
}
],
"src": "7414:60:1"
},
{
"body": {
"nativeSrc": "7540:82:1",
"nodeType": "YulBlock",
"src": "7540:82:1",
"statements": [
{
"nativeSrc": "7550:66:1",
"nodeType": "YulAssignment",
"src": "7550:66:1",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "7608:5:1",
"nodeType": "YulIdentifier",
"src": "7608:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "7590:17:1",
"nodeType": "YulIdentifier",
"src": "7590:17:1"
},
"nativeSrc": "7590:24:1",
"nodeType": "YulFunctionCall",
"src": "7590:24:1"
}
],
"functionName": {
"name": "identity",
"nativeSrc": "7581:8:1",
"nodeType": "YulIdentifier",
"src": "7581:8:1"
},
"nativeSrc": "7581:34:1",
"nodeType": "YulFunctionCall",
"src": "7581:34:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "7563:17:1",
"nodeType": "YulIdentifier",
"src": "7563:17:1"
},
"nativeSrc": "7563:53:1",
"nodeType": "YulFunctionCall",
"src": "7563:53:1"
},
"variableNames": [
{
"name": "converted",
"nativeSrc": "7550:9:1",
"nodeType": "YulIdentifier",
"src": "7550:9:1"
}
]
}
]
},
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "7480:142:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "7520:5:1",
"nodeType": "YulTypedName",
"src": "7520:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nativeSrc": "7530:9:1",
"nodeType": "YulTypedName",
"src": "7530:9:1",
"type": ""
}
],
"src": "7480:142:1"
},
{
"body": {
"nativeSrc": "7675:28:1",
"nodeType": "YulBlock",
"src": "7675:28:1",
"statements": [
{
"nativeSrc": "7685:12:1",
"nodeType": "YulAssignment",
"src": "7685:12:1",
"value": {
"name": "value",
"nativeSrc": "7692:5:1",
"nodeType": "YulIdentifier",
"src": "7692:5:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "7685:3:1",
"nodeType": "YulIdentifier",
"src": "7685:3:1"
}
]
}
]
},
"name": "prepare_store_t_uint256",
"nativeSrc": "7628:75:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "7661:5:1",
"nodeType": "YulTypedName",
"src": "7661:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "7671:3:1",
"nodeType": "YulTypedName",
"src": "7671:3:1",
"type": ""
}
],
"src": "7628:75:1"
},
{
"body": {
"nativeSrc": "7785:193:1",
"nodeType": "YulBlock",
"src": "7785:193:1",
"statements": [
{
"nativeSrc": "7795:63:1",
"nodeType": "YulVariableDeclaration",
"src": "7795:63:1",
"value": {
"arguments": [
{
"name": "value_0",
"nativeSrc": "7850:7:1",
"nodeType": "YulIdentifier",
"src": "7850:7:1"
}
],
"functionName": {
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "7819:30:1",
"nodeType": "YulIdentifier",
"src": "7819:30:1"
},
"nativeSrc": "7819:39:1",
"nodeType": "YulFunctionCall",
"src": "7819:39:1"
},
"variables": [
{
"name": "convertedValue_0",
"nativeSrc": "7799:16:1",
"nodeType": "YulTypedName",
"src": "7799:16:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "7874:4:1",
"nodeType": "YulIdentifier",
"src": "7874:4:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "7914:4:1",
"nodeType": "YulIdentifier",
"src": "7914:4:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "7908:5:1",
"nodeType": "YulIdentifier",
"src": "7908:5:1"
},
"nativeSrc": "7908:11:1",
"nodeType": "YulFunctionCall",
"src": "7908:11:1"
},
{
"name": "offset",
"nativeSrc": "7921:6:1",
"nodeType": "YulIdentifier",
"src": "7921:6:1"
},
{
"arguments": [
{
"name": "convertedValue_0",
"nativeSrc": "7953:16:1",
"nodeType": "YulIdentifier",
"src": "7953:16:1"
}
],
"functionName": {
"name": "prepare_store_t_uint256",
"nativeSrc": "7929:23:1",
"nodeType": "YulIdentifier",
"src": "7929:23:1"
},
"nativeSrc": "7929:41:1",
"nodeType": "YulFunctionCall",
"src": "7929:41:1"
}
],
"functionName": {
"name": "update_byte_slice_dynamic32",
"nativeSrc": "7880:27:1",
"nodeType": "YulIdentifier",
"src": "7880:27:1"
},
"nativeSrc": "7880:91:1",
"nodeType": "YulFunctionCall",
"src": "7880:91:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "7867:6:1",
"nodeType": "YulIdentifier",
"src": "7867:6:1"
},
"nativeSrc": "7867:105:1",
"nodeType": "YulFunctionCall",
"src": "7867:105:1"
},
"nativeSrc": "7867:105:1",
"nodeType": "YulExpressionStatement",
"src": "7867:105:1"
}
]
},
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "7709:269:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "7762:4:1",
"nodeType": "YulTypedName",
"src": "7762:4:1",
"type": ""
},
{
"name": "offset",
"nativeSrc": "7768:6:1",
"nodeType": "YulTypedName",
"src": "7768:6:1",
"type": ""
},
{
"name": "value_0",
"nativeSrc": "7776:7:1",
"nodeType": "YulTypedName",
"src": "7776:7:1",
"type": ""
}
],
"src": "7709:269:1"
},
{
"body": {
"nativeSrc": "8033:24:1",
"nodeType": "YulBlock",
"src": "8033:24:1",
"statements": [
{
"nativeSrc": "8043:8:1",
"nodeType": "YulAssignment",
"src": "8043:8:1",
"value": {
"kind": "number",
"nativeSrc": "8050:1:1",
"nodeType": "YulLiteral",
"src": "8050:1:1",
"type": "",
"value": "0"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "8043:3:1",
"nodeType": "YulIdentifier",
"src": "8043:3:1"
}
]
}
]
},
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "7984:73:1",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "ret",
"nativeSrc": "8029:3:1",
"nodeType": "YulTypedName",
"src": "8029:3:1",
"type": ""
}
],
"src": "7984:73:1"
},
{
"body": {
"nativeSrc": "8116:136:1",
"nodeType": "YulBlock",
"src": "8116:136:1",
"statements": [
{
"nativeSrc": "8126:46:1",
"nodeType": "YulVariableDeclaration",
"src": "8126:46:1",
"value": {
"arguments": [],
"functionName": {
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "8140:30:1",
"nodeType": "YulIdentifier",
"src": "8140:30:1"
},
"nativeSrc": "8140:32:1",
"nodeType": "YulFunctionCall",
"src": "8140:32:1"
},
"variables": [
{
"name": "zero_0",
"nativeSrc": "8130:6:1",
"nodeType": "YulTypedName",
"src": "8130:6:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "8225:4:1",
"nodeType": "YulIdentifier",
"src": "8225:4:1"
},
{
"name": "offset",
"nativeSrc": "8231:6:1",
"nodeType": "YulIdentifier",
"src": "8231:6:1"
},
{
"name": "zero_0",
"nativeSrc": "8239:6:1",
"nodeType": "YulIdentifier",
"src": "8239:6:1"
}
],
"functionName": {
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "8181:43:1",
"nodeType": "YulIdentifier",
"src": "8181:43:1"
},
"nativeSrc": "8181:65:1",
"nodeType": "YulFunctionCall",
"src": "8181:65:1"
},
"nativeSrc": "8181:65:1",
"nodeType": "YulExpressionStatement",
"src": "8181:65:1"
}
]
},
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "8063:189:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "8102:4:1",
"nodeType": "YulTypedName",
"src": "8102:4:1",
"type": ""
},
{
"name": "offset",
"nativeSrc": "8108:6:1",
"nodeType": "YulTypedName",
"src": "8108:6:1",
"type": ""
}
],
"src": "8063:189:1"
},
{
"body": {
"nativeSrc": "8308:136:1",
"nodeType": "YulBlock",
"src": "8308:136:1",
"statements": [
{
"body": {
"nativeSrc": "8375:63:1",
"nodeType": "YulBlock",
"src": "8375:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "start",
"nativeSrc": "8419:5:1",
"nodeType": "YulIdentifier",
"src": "8419:5:1"
},
{
"kind": "number",
"nativeSrc": "8426:1:1",
"nodeType": "YulLiteral",
"src": "8426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "8389:29:1",
"nodeType": "YulIdentifier",
"src": "8389:29:1"
},
"nativeSrc": "8389:39:1",
"nodeType": "YulFunctionCall",
"src": "8389:39:1"
},
"nativeSrc": "8389:39:1",
"nodeType": "YulExpressionStatement",
"src": "8389:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "start",
"nativeSrc": "8328:5:1",
"nodeType": "YulIdentifier",
"src": "8328:5:1"
},
{
"name": "end",
"nativeSrc": "8335:3:1",
"nodeType": "YulIdentifier",
"src": "8335:3:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "8325:2:1",
"nodeType": "YulIdentifier",
"src": "8325:2:1"
},
"nativeSrc": "8325:14:1",
"nodeType": "YulFunctionCall",
"src": "8325:14:1"
},
"nativeSrc": "8318:120:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "8340:26:1",
"nodeType": "YulBlock",
"src": "8340:26:1",
"statements": [
{
"nativeSrc": "8342:22:1",
"nodeType": "YulAssignment",
"src": "8342:22:1",
"value": {
"arguments": [
{
"name": "start",
"nativeSrc": "8355:5:1",
"nodeType": "YulIdentifier",
"src": "8355:5:1"
},
{
"kind": "number",
"nativeSrc": "8362:1:1",
"nodeType": "YulLiteral",
"src": "8362:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8351:3:1",
"nodeType": "YulIdentifier",
"src": "8351:3:1"
},
"nativeSrc": "8351:13:1",
"nodeType": "YulFunctionCall",
"src": "8351:13:1"
},
"variableNames": [
{
"name": "start",
"nativeSrc": "8342:5:1",
"nodeType": "YulIdentifier",
"src": "8342:5:1"
}
]
}
]
},
"pre": {
"nativeSrc": "8322:2:1",
"nodeType": "YulBlock",
"src": "8322:2:1",
"statements": []
},
"src": "8318:120:1"
}
]
},
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "8258:186:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "start",
"nativeSrc": "8296:5:1",
"nodeType": "YulTypedName",
"src": "8296:5:1",
"type": ""
},
{
"name": "end",
"nativeSrc": "8303:3:1",
"nodeType": "YulTypedName",
"src": "8303:3:1",
"type": ""
}
],
"src": "8258:186:1"
},
{
"body": {
"nativeSrc": "8529:464:1",
"nodeType": "YulBlock",
"src": "8529:464:1",
"statements": [
{
"body": {
"nativeSrc": "8555:431:1",
"nodeType": "YulBlock",
"src": "8555:431:1",
"statements": [
{
"nativeSrc": "8569:54:1",
"nodeType": "YulVariableDeclaration",
"src": "8569:54:1",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "8617:5:1",
"nodeType": "YulIdentifier",
"src": "8617:5:1"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "8585:31:1",
"nodeType": "YulIdentifier",
"src": "8585:31:1"
},
"nativeSrc": "8585:38:1",
"nodeType": "YulFunctionCall",
"src": "8585:38:1"
},
"variables": [
{
"name": "dataArea",
"nativeSrc": "8573:8:1",
"nodeType": "YulTypedName",
"src": "8573:8:1",
"type": ""
}
]
},
{
"nativeSrc": "8636:63:1",
"nodeType": "YulVariableDeclaration",
"src": "8636:63:1",
"value": {
"arguments": [
{
"name": "dataArea",
"nativeSrc": "8659:8:1",
"nodeType": "YulIdentifier",
"src": "8659:8:1"
},
{
"arguments": [
{
"name": "startIndex",
"nativeSrc": "8687:10:1",
"nodeType": "YulIdentifier",
"src": "8687:10:1"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "8669:17:1",
"nodeType": "YulIdentifier",
"src": "8669:17:1"
},
"nativeSrc": "8669:29:1",
"nodeType": "YulFunctionCall",
"src": "8669:29:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8655:3:1",
"nodeType": "YulIdentifier",
"src": "8655:3:1"
},
"nativeSrc": "8655:44:1",
"nodeType": "YulFunctionCall",
"src": "8655:44:1"
},
"variables": [
{
"name": "deleteStart",
"nativeSrc": "8640:11:1",
"nodeType": "YulTypedName",
"src": "8640:11:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "8856:27:1",
"nodeType": "YulBlock",
"src": "8856:27:1",
"statements": [
{
"nativeSrc": "8858:23:1",
"nodeType": "YulAssignment",
"src": "8858:23:1",
"value": {
"name": "dataArea",
"nativeSrc": "8873:8:1",
"nodeType": "YulIdentifier",
"src": "8873:8:1"
},
"variableNames": [
{
"name": "deleteStart",
"nativeSrc": "8858:11:1",
"nodeType": "YulIdentifier",
"src": "8858:11:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "startIndex",
"nativeSrc": "8840:10:1",
"nodeType": "YulIdentifier",
"src": "8840:10:1"
},
{
"kind": "number",
"nativeSrc": "8852:2:1",
"nodeType": "YulLiteral",
"src": "8852:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "8837:2:1",
"nodeType": "YulIdentifier",
"src": "8837:2:1"
},
"nativeSrc": "8837:18:1",
"nodeType": "YulFunctionCall",
"src": "8837:18:1"
},
"nativeSrc": "8834:49:1",
"nodeType": "YulIf",
"src": "8834:49:1"
},
{
"expression": {
"arguments": [
{
"name": "deleteStart",
"nativeSrc": "8925:11:1",
"nodeType": "YulIdentifier",
"src": "8925:11:1"
},
{
"arguments": [
{
"name": "dataArea",
"nativeSrc": "8942:8:1",
"nodeType": "YulIdentifier",
"src": "8942:8:1"
},
{
"arguments": [
{
"name": "len",
"nativeSrc": "8970:3:1",
"nodeType": "YulIdentifier",
"src": "8970:3:1"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "8952:17:1",
"nodeType": "YulIdentifier",
"src": "8952:17:1"
},
"nativeSrc": "8952:22:1",
"nodeType": "YulFunctionCall",
"src": "8952:22:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8938:3:1",
"nodeType": "YulIdentifier",
"src": "8938:3:1"
},
"nativeSrc": "8938:37:1",
"nodeType": "YulFunctionCall",
"src": "8938:37:1"
}
],
"functionName": {
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "8896:28:1",
"nodeType": "YulIdentifier",
"src": "8896:28:1"
},
"nativeSrc": "8896:80:1",
"nodeType": "YulFunctionCall",
"src": "8896:80:1"
},
"nativeSrc": "8896:80:1",
"nodeType": "YulExpressionStatement",
"src": "8896:80:1"
}
]
},
"condition": {
"arguments": [
{
"name": "len",
"nativeSrc": "8546:3:1",
"nodeType": "YulIdentifier",
"src": "8546:3:1"
},
{
"kind": "number",
"nativeSrc": "8551:2:1",
"nodeType": "YulLiteral",
"src": "8551:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "8543:2:1",
"nodeType": "YulIdentifier",
"src": "8543:2:1"
},
"nativeSrc": "8543:11:1",
"nodeType": "YulFunctionCall",
"src": "8543:11:1"
},
"nativeSrc": "8540:446:1",
"nodeType": "YulIf",
"src": "8540:446:1"
}
]
},
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "8450:543:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "array",
"nativeSrc": "8505:5:1",
"nodeType": "YulTypedName",
"src": "8505:5:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "8512:3:1",
"nodeType": "YulTypedName",
"src": "8512:3:1",
"type": ""
},
{
"name": "startIndex",
"nativeSrc": "8517:10:1",
"nodeType": "YulTypedName",
"src": "8517:10:1",
"type": ""
}
],
"src": "8450:543:1"
},
{
"body": {
"nativeSrc": "9062:54:1",
"nodeType": "YulBlock",
"src": "9062:54:1",
"statements": [
{
"nativeSrc": "9072:37:1",
"nodeType": "YulAssignment",
"src": "9072:37:1",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "9097:4:1",
"nodeType": "YulIdentifier",
"src": "9097:4:1"
},
{
"name": "value",
"nativeSrc": "9103:5:1",
"nodeType": "YulIdentifier",
"src": "9103:5:1"
}
],
"functionName": {
"name": "shr",
"nativeSrc": "9093:3:1",
"nodeType": "YulIdentifier",
"src": "9093:3:1"
},
"nativeSrc": "9093:16:1",
"nodeType": "YulFunctionCall",
"src": "9093:16:1"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "9072:8:1",
"nodeType": "YulIdentifier",
"src": "9072:8:1"
}
]
}
]
},
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "8999:117:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "9037:4:1",
"nodeType": "YulTypedName",
"src": "9037:4:1",
"type": ""
},
{
"name": "value",
"nativeSrc": "9043:5:1",
"nodeType": "YulTypedName",
"src": "9043:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "9053:8:1",
"nodeType": "YulTypedName",
"src": "9053:8:1",
"type": ""
}
],
"src": "8999:117:1"
},
{
"body": {
"nativeSrc": "9173:118:1",
"nodeType": "YulBlock",
"src": "9173:118:1",
"statements": [
{
"nativeSrc": "9183:68:1",
"nodeType": "YulVariableDeclaration",
"src": "9183:68:1",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nativeSrc": "9232:1:1",
"nodeType": "YulLiteral",
"src": "9232:1:1",
"type": "",
"value": "8"
},
{
"name": "bytes",
"nativeSrc": "9235:5:1",
"nodeType": "YulIdentifier",
"src": "9235:5:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "9228:3:1",
"nodeType": "YulIdentifier",
"src": "9228:3:1"
},
"nativeSrc": "9228:13:1",
"nodeType": "YulFunctionCall",
"src": "9228:13:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "9247:1:1",
"nodeType": "YulLiteral",
"src": "9247:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nativeSrc": "9243:3:1",
"nodeType": "YulIdentifier",
"src": "9243:3:1"
},
"nativeSrc": "9243:6:1",
"nodeType": "YulFunctionCall",
"src": "9243:6:1"
}
],
"functionName": {
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "9199:28:1",
"nodeType": "YulIdentifier",
"src": "9199:28:1"
},
"nativeSrc": "9199:51:1",
"nodeType": "YulFunctionCall",
"src": "9199:51:1"
}
],
"functionName": {
"name": "not",
"nativeSrc": "9195:3:1",
"nodeType": "YulIdentifier",
"src": "9195:3:1"
},
"nativeSrc": "9195:56:1",
"nodeType": "YulFunctionCall",
"src": "9195:56:1"
},
"variables": [
{
"name": "mask",
"nativeSrc": "9187:4:1",
"nodeType": "YulTypedName",
"src": "9187:4:1",
"type": ""
}
]
},
{
"nativeSrc": "9260:25:1",
"nodeType": "YulAssignment",
"src": "9260:25:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "9274:4:1",
"nodeType": "YulIdentifier",
"src": "9274:4:1"
},
{
"name": "mask",
"nativeSrc": "9280:4:1",
"nodeType": "YulIdentifier",
"src": "9280:4:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "9270:3:1",
"nodeType": "YulIdentifier",
"src": "9270:3:1"
},
"nativeSrc": "9270:15:1",
"nodeType": "YulFunctionCall",
"src": "9270:15:1"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "9260:6:1",
"nodeType": "YulIdentifier",
"src": "9260:6:1"
}
]
}
]
},
"name": "mask_bytes_dynamic",
"nativeSrc": "9122:169:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "9150:4:1",
"nodeType": "YulTypedName",
"src": "9150:4:1",
"type": ""
},
{
"name": "bytes",
"nativeSrc": "9156:5:1",
"nodeType": "YulTypedName",
"src": "9156:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "9166:6:1",
"nodeType": "YulTypedName",
"src": "9166:6:1",
"type": ""
}
],
"src": "9122:169:1"
},
{
"body": {
"nativeSrc": "9377:214:1",
"nodeType": "YulBlock",
"src": "9377:214:1",
"statements": [
{
"nativeSrc": "9510:37:1",
"nodeType": "YulAssignment",
"src": "9510:37:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "9537:4:1",
"nodeType": "YulIdentifier",
"src": "9537:4:1"
},
{
"name": "len",
"nativeSrc": "9543:3:1",
"nodeType": "YulIdentifier",
"src": "9543:3:1"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "9518:18:1",
"nodeType": "YulIdentifier",
"src": "9518:18:1"
},
"nativeSrc": "9518:29:1",
"nodeType": "YulFunctionCall",
"src": "9518:29:1"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "9510:4:1",
"nodeType": "YulIdentifier",
"src": "9510:4:1"
}
]
},
{
"nativeSrc": "9556:29:1",
"nodeType": "YulAssignment",
"src": "9556:29:1",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "9567:4:1",
"nodeType": "YulIdentifier",
"src": "9567:4:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "9577:1:1",
"nodeType": "YulLiteral",
"src": "9577:1:1",
"type": "",
"value": "2"
},
{
"name": "len",
"nativeSrc": "9580:3:1",
"nodeType": "YulIdentifier",
"src": "9580:3:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "9573:3:1",
"nodeType": "YulIdentifier",
"src": "9573:3:1"
},
"nativeSrc": "9573:11:1",
"nodeType": "YulFunctionCall",
"src": "9573:11:1"
}
],
"functionName": {
"name": "or",
"nativeSrc": "9564:2:1",
"nodeType": "YulIdentifier",
"src": "9564:2:1"
},
"nativeSrc": "9564:21:1",
"nodeType": "YulFunctionCall",
"src": "9564:21:1"
},
"variableNames": [
{
"name": "used",
"nativeSrc": "9556:4:1",
"nodeType": "YulIdentifier",
"src": "9556:4:1"
}
]
}
]
},
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "9296:295:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "9358:4:1",
"nodeType": "YulTypedName",
"src": "9358:4:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "9364:3:1",
"nodeType": "YulTypedName",
"src": "9364:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "used",
"nativeSrc": "9372:4:1",
"nodeType": "YulTypedName",
"src": "9372:4:1",
"type": ""
}
],
"src": "9296:295:1"
},
{
"body": {
"nativeSrc": "9695:1304:1",
"nodeType": "YulBlock",
"src": "9695:1304:1",
"statements": [
{
"nativeSrc": "9706:58:1",
"nodeType": "YulVariableDeclaration",
"src": "9706:58:1",
"value": {
"arguments": [
{
"name": "src",
"nativeSrc": "9755:3:1",
"nodeType": "YulIdentifier",
"src": "9755:3:1"
},
{
"name": "len",
"nativeSrc": "9760:3:1",
"nodeType": "YulIdentifier",
"src": "9760:3:1"
}
],
"functionName": {
"name": "array_length_t_string_calldata_ptr",
"nativeSrc": "9720:34:1",
"nodeType": "YulIdentifier",
"src": "9720:34:1"
},
"nativeSrc": "9720:44:1",
"nodeType": "YulFunctionCall",
"src": "9720:44:1"
},
"variables": [
{
"name": "newLen",
"nativeSrc": "9710:6:1",
"nodeType": "YulTypedName",
"src": "9710:6:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "9849:22:1",
"nodeType": "YulBlock",
"src": "9849:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nativeSrc": "9851:16:1",
"nodeType": "YulIdentifier",
"src": "9851:16:1"
},
"nativeSrc": "9851:18:1",
"nodeType": "YulFunctionCall",
"src": "9851:18:1"
},
"nativeSrc": "9851:18:1",
"nodeType": "YulExpressionStatement",
"src": "9851:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "9821:6:1",
"nodeType": "YulIdentifier",
"src": "9821:6:1"
},
{
"kind": "number",
"nativeSrc": "9829:18:1",
"nodeType": "YulLiteral",
"src": "9829:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "9818:2:1",
"nodeType": "YulIdentifier",
"src": "9818:2:1"
},
"nativeSrc": "9818:30:1",
"nodeType": "YulFunctionCall",
"src": "9818:30:1"
},
"nativeSrc": "9815:56:1",
"nodeType": "YulIf",
"src": "9815:56:1"
},
{
"nativeSrc": "9881:52:1",
"nodeType": "YulVariableDeclaration",
"src": "9881:52:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "9927:4:1",
"nodeType": "YulIdentifier",
"src": "9927:4:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "9921:5:1",
"nodeType": "YulIdentifier",
"src": "9921:5:1"
},
"nativeSrc": "9921:11:1",
"nodeType": "YulFunctionCall",
"src": "9921:11:1"
}
],
"functionName": {
"name": "extract_byte_array_length",
"nativeSrc": "9895:25:1",
"nodeType": "YulIdentifier",
"src": "9895:25:1"
},
"nativeSrc": "9895:38:1",
"nodeType": "YulFunctionCall",
"src": "9895:38:1"
},
"variables": [
{
"name": "oldLen",
"nativeSrc": "9885:6:1",
"nodeType": "YulTypedName",
"src": "9885:6:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "10026:4:1",
"nodeType": "YulIdentifier",
"src": "10026:4:1"
},
{
"name": "oldLen",
"nativeSrc": "10032:6:1",
"nodeType": "YulIdentifier",
"src": "10032:6:1"
},
{
"name": "newLen",
"nativeSrc": "10040:6:1",
"nodeType": "YulIdentifier",
"src": "10040:6:1"
}
],
"functionName": {
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "9980:45:1",
"nodeType": "YulIdentifier",
"src": "9980:45:1"
},
"nativeSrc": "9980:67:1",
"nodeType": "YulFunctionCall",
"src": "9980:67:1"
},
"nativeSrc": "9980:67:1",
"nodeType": "YulExpressionStatement",
"src": "9980:67:1"
},
{
"nativeSrc": "10057:18:1",
"nodeType": "YulVariableDeclaration",
"src": "10057:18:1",
"value": {
"kind": "number",
"nativeSrc": "10074:1:1",
"nodeType": "YulLiteral",
"src": "10074:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "srcOffset",
"nativeSrc": "10061:9:1",
"nodeType": "YulTypedName",
"src": "10061:9:1",
"type": ""
}
]
},
{
"cases": [
{
"body": {
"nativeSrc": "10122:625:1",
"nodeType": "YulBlock",
"src": "10122:625:1",
"statements": [
{
"nativeSrc": "10136:37:1",
"nodeType": "YulVariableDeclaration",
"src": "10136:37:1",
"value": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "10155:6:1",
"nodeType": "YulIdentifier",
"src": "10155:6:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "10167:4:1",
"nodeType": "YulLiteral",
"src": "10167:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "not",
"nativeSrc": "10163:3:1",
"nodeType": "YulIdentifier",
"src": "10163:3:1"
},
"nativeSrc": "10163:9:1",
"nodeType": "YulFunctionCall",
"src": "10163:9:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "10151:3:1",
"nodeType": "YulIdentifier",
"src": "10151:3:1"
},
"nativeSrc": "10151:22:1",
"nodeType": "YulFunctionCall",
"src": "10151:22:1"
},
"variables": [
{
"name": "loopEnd",
"nativeSrc": "10140:7:1",
"nodeType": "YulTypedName",
"src": "10140:7:1",
"type": ""
}
]
},
{
"nativeSrc": "10187:51:1",
"nodeType": "YulVariableDeclaration",
"src": "10187:51:1",
"value": {
"arguments": [
{
"name": "slot",
"nativeSrc": "10233:4:1",
"nodeType": "YulIdentifier",
"src": "10233:4:1"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "10201:31:1",
"nodeType": "YulIdentifier",
"src": "10201:31:1"
},
"nativeSrc": "10201:37:1",
"nodeType": "YulFunctionCall",
"src": "10201:37:1"
},
"variables": [
{
"name": "dstPtr",
"nativeSrc": "10191:6:1",
"nodeType": "YulTypedName",
"src": "10191:6:1",
"type": ""
}
]
},
{
"nativeSrc": "10251:10:1",
"nodeType": "YulVariableDeclaration",
"src": "10251:10:1",
"value": {
"kind": "number",
"nativeSrc": "10260:1:1",
"nodeType": "YulLiteral",
"src": "10260:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "10255:1:1",
"nodeType": "YulTypedName",
"src": "10255:1:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "10319:170:1",
"nodeType": "YulBlock",
"src": "10319:170:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "10344:6:1",
"nodeType": "YulIdentifier",
"src": "10344:6:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "10369:3:1",
"nodeType": "YulIdentifier",
"src": "10369:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "10374:9:1",
"nodeType": "YulIdentifier",
"src": "10374:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10365:3:1",
"nodeType": "YulIdentifier",
"src": "10365:3:1"
},
"nativeSrc": "10365:19:1",
"nodeType": "YulFunctionCall",
"src": "10365:19:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "10352:12:1",
"nodeType": "YulIdentifier",
"src": "10352:12:1"
},
"nativeSrc": "10352:33:1",
"nodeType": "YulFunctionCall",
"src": "10352:33:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "10337:6:1",
"nodeType": "YulIdentifier",
"src": "10337:6:1"
},
"nativeSrc": "10337:49:1",
"nodeType": "YulFunctionCall",
"src": "10337:49:1"
},
"nativeSrc": "10337:49:1",
"nodeType": "YulExpressionStatement",
"src": "10337:49:1"
},
{
"nativeSrc": "10403:24:1",
"nodeType": "YulAssignment",
"src": "10403:24:1",
"value": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "10417:6:1",
"nodeType": "YulIdentifier",
"src": "10417:6:1"
},
{
"kind": "number",
"nativeSrc": "10425:1:1",
"nodeType": "YulLiteral",
"src": "10425:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10413:3:1",
"nodeType": "YulIdentifier",
"src": "10413:3:1"
},
"nativeSrc": "10413:14:1",
"nodeType": "YulFunctionCall",
"src": "10413:14:1"
},
"variableNames": [
{
"name": "dstPtr",
"nativeSrc": "10403:6:1",
"nodeType": "YulIdentifier",
"src": "10403:6:1"
}
]
},
{
"nativeSrc": "10444:31:1",
"nodeType": "YulAssignment",
"src": "10444:31:1",
"value": {
"arguments": [
{
"name": "srcOffset",
"nativeSrc": "10461:9:1",
"nodeType": "YulIdentifier",
"src": "10461:9:1"
},
{
"kind": "number",
"nativeSrc": "10472:2:1",
"nodeType": "YulLiteral",
"src": "10472:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10457:3:1",
"nodeType": "YulIdentifier",
"src": "10457:3:1"
},
"nativeSrc": "10457:18:1",
"nodeType": "YulFunctionCall",
"src": "10457:18:1"
},
"variableNames": [
{
"name": "srcOffset",
"nativeSrc": "10444:9:1",
"nodeType": "YulIdentifier",
"src": "10444:9:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "10285:1:1",
"nodeType": "YulIdentifier",
"src": "10285:1:1"
},
{
"name": "loopEnd",
"nativeSrc": "10288:7:1",
"nodeType": "YulIdentifier",
"src": "10288:7:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "10282:2:1",
"nodeType": "YulIdentifier",
"src": "10282:2:1"
},
"nativeSrc": "10282:14:1",
"nodeType": "YulFunctionCall",
"src": "10282:14:1"
},
"nativeSrc": "10274:215:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "10297:21:1",
"nodeType": "YulBlock",
"src": "10297:21:1",
"statements": [
{
"nativeSrc": "10299:17:1",
"nodeType": "YulAssignment",
"src": "10299:17:1",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "10308:1:1",
"nodeType": "YulIdentifier",
"src": "10308:1:1"
},
{
"kind": "number",
"nativeSrc": "10311:4:1",
"nodeType": "YulLiteral",
"src": "10311:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10304:3:1",
"nodeType": "YulIdentifier",
"src": "10304:3:1"
},
"nativeSrc": "10304:12:1",
"nodeType": "YulFunctionCall",
"src": "10304:12:1"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "10299:1:1",
"nodeType": "YulIdentifier",
"src": "10299:1:1"
}
]
}
]
},
"pre": {
"nativeSrc": "10278:3:1",
"nodeType": "YulBlock",
"src": "10278:3:1",
"statements": []
},
"src": "10274:215:1"
},
{
"body": {
"nativeSrc": "10525:163:1",
"nodeType": "YulBlock",
"src": "10525:163:1",
"statements": [
{
"nativeSrc": "10543:50:1",
"nodeType": "YulVariableDeclaration",
"src": "10543:50:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "10577:3:1",
"nodeType": "YulIdentifier",
"src": "10577:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "10582:9:1",
"nodeType": "YulIdentifier",
"src": "10582:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10573:3:1",
"nodeType": "YulIdentifier",
"src": "10573:3:1"
},
"nativeSrc": "10573:19:1",
"nodeType": "YulFunctionCall",
"src": "10573:19:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "10560:12:1",
"nodeType": "YulIdentifier",
"src": "10560:12:1"
},
"nativeSrc": "10560:33:1",
"nodeType": "YulFunctionCall",
"src": "10560:33:1"
},
"variables": [
{
"name": "lastValue",
"nativeSrc": "10547:9:1",
"nodeType": "YulTypedName",
"src": "10547:9:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "10617:6:1",
"nodeType": "YulIdentifier",
"src": "10617:6:1"
},
{
"arguments": [
{
"name": "lastValue",
"nativeSrc": "10644:9:1",
"nodeType": "YulIdentifier",
"src": "10644:9:1"
},
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "10659:6:1",
"nodeType": "YulIdentifier",
"src": "10659:6:1"
},
{
"kind": "number",
"nativeSrc": "10667:4:1",
"nodeType": "YulLiteral",
"src": "10667:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "10655:3:1",
"nodeType": "YulIdentifier",
"src": "10655:3:1"
},
"nativeSrc": "10655:17:1",
"nodeType": "YulFunctionCall",
"src": "10655:17:1"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "10625:18:1",
"nodeType": "YulIdentifier",
"src": "10625:18:1"
},
"nativeSrc": "10625:48:1",
"nodeType": "YulFunctionCall",
"src": "10625:48:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "10610:6:1",
"nodeType": "YulIdentifier",
"src": "10610:6:1"
},
"nativeSrc": "10610:64:1",
"nodeType": "YulFunctionCall",
"src": "10610:64:1"
},
"nativeSrc": "10610:64:1",
"nodeType": "YulExpressionStatement",
"src": "10610:64:1"
}
]
},
"condition": {
"arguments": [
{
"name": "loopEnd",
"nativeSrc": "10508:7:1",
"nodeType": "YulIdentifier",
"src": "10508:7:1"
},
{
"name": "newLen",
"nativeSrc": "10517:6:1",
"nodeType": "YulIdentifier",
"src": "10517:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "10505:2:1",
"nodeType": "YulIdentifier",
"src": "10505:2:1"
},
"nativeSrc": "10505:19:1",
"nodeType": "YulFunctionCall",
"src": "10505:19:1"
},
"nativeSrc": "10502:186:1",
"nodeType": "YulIf",
"src": "10502:186:1"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "10708:4:1",
"nodeType": "YulIdentifier",
"src": "10708:4:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "10722:6:1",
"nodeType": "YulIdentifier",
"src": "10722:6:1"
},
{
"kind": "number",
"nativeSrc": "10730:1:1",
"nodeType": "YulLiteral",
"src": "10730:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "10718:3:1",
"nodeType": "YulIdentifier",
"src": "10718:3:1"
},
"nativeSrc": "10718:14:1",
"nodeType": "YulFunctionCall",
"src": "10718:14:1"
},
{
"kind": "number",
"nativeSrc": "10734:1:1",
"nodeType": "YulLiteral",
"src": "10734:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10714:3:1",
"nodeType": "YulIdentifier",
"src": "10714:3:1"
},
"nativeSrc": "10714:22:1",
"nodeType": "YulFunctionCall",
"src": "10714:22:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "10701:6:1",
"nodeType": "YulIdentifier",
"src": "10701:6:1"
},
"nativeSrc": "10701:36:1",
"nodeType": "YulFunctionCall",
"src": "10701:36:1"
},
"nativeSrc": "10701:36:1",
"nodeType": "YulExpressionStatement",
"src": "10701:36:1"
}
]
},
"nativeSrc": "10115:632:1",
"nodeType": "YulCase",
"src": "10115:632:1",
"value": {
"kind": "number",
"nativeSrc": "10120:1:1",
"nodeType": "YulLiteral",
"src": "10120:1:1",
"type": "",
"value": "1"
}
},
{
"body": {
"nativeSrc": "10764:229:1",
"nodeType": "YulBlock",
"src": "10764:229:1",
"statements": [
{
"nativeSrc": "10778:14:1",
"nodeType": "YulVariableDeclaration",
"src": "10778:14:1",
"value": {
"kind": "number",
"nativeSrc": "10791:1:1",
"nodeType": "YulLiteral",
"src": "10791:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "value",
"nativeSrc": "10782:5:1",
"nodeType": "YulTypedName",
"src": "10782:5:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "10815:74:1",
"nodeType": "YulBlock",
"src": "10815:74:1",
"statements": [
{
"nativeSrc": "10833:42:1",
"nodeType": "YulAssignment",
"src": "10833:42:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "10859:3:1",
"nodeType": "YulIdentifier",
"src": "10859:3:1"
},
{
"name": "srcOffset",
"nativeSrc": "10864:9:1",
"nodeType": "YulIdentifier",
"src": "10864:9:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10855:3:1",
"nodeType": "YulIdentifier",
"src": "10855:3:1"
},
"nativeSrc": "10855:19:1",
"nodeType": "YulFunctionCall",
"src": "10855:19:1"
}
],
"functionName": {
"name": "calldataload",
"nativeSrc": "10842:12:1",
"nodeType": "YulIdentifier",
"src": "10842:12:1"
},
"nativeSrc": "10842:33:1",
"nodeType": "YulFunctionCall",
"src": "10842:33:1"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "10833:5:1",
"nodeType": "YulIdentifier",
"src": "10833:5:1"
}
]
}
]
},
"condition": {
"name": "newLen",
"nativeSrc": "10808:6:1",
"nodeType": "YulIdentifier",
"src": "10808:6:1"
},
"nativeSrc": "10805:84:1",
"nodeType": "YulIf",
"src": "10805:84:1"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "10909:4:1",
"nodeType": "YulIdentifier",
"src": "10909:4:1"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "10968:5:1",
"nodeType": "YulIdentifier",
"src": "10968:5:1"
},
{
"name": "newLen",
"nativeSrc": "10975:6:1",
"nodeType": "YulIdentifier",
"src": "10975:6:1"
}
],
"functionName": {
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "10915:52:1",
"nodeType": "YulIdentifier",
"src": "10915:52:1"
},
"nativeSrc": "10915:67:1",
"nodeType": "YulFunctionCall",
"src": "10915:67:1"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "10902:6:1",
"nodeType": "YulIdentifier",
"src": "10902:6:1"
},
"nativeSrc": "10902:81:1",
"nodeType": "YulFunctionCall",
"src": "10902:81:1"
},
"nativeSrc": "10902:81:1",
"nodeType": "YulExpressionStatement",
"src": "10902:81:1"
}
]
},
"nativeSrc": "10756:237:1",
"nodeType": "YulCase",
"src": "10756:237:1",
"value": "default"
}
],
"expression": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "10095:6:1",
"nodeType": "YulIdentifier",
"src": "10095:6:1"
},
{
"kind": "number",
"nativeSrc": "10103:2:1",
"nodeType": "YulLiteral",
"src": "10103:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "10092:2:1",
"nodeType": "YulIdentifier",
"src": "10092:2:1"
},
"nativeSrc": "10092:14:1",
"nodeType": "YulFunctionCall",
"src": "10092:14:1"
},
"nativeSrc": "10085:908:1",
"nodeType": "YulSwitch",
"src": "10085:908:1"
}
]
},
"name": "copy_byte_array_to_storage_from_t_string_calldata_ptr_to_t_string_storage",
"nativeSrc": "9596:1403:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "9679:4:1",
"nodeType": "YulTypedName",
"src": "9679:4:1",
"type": ""
},
{
"name": "src",
"nativeSrc": "9685:3:1",
"nodeType": "YulTypedName",
"src": "9685:3:1",
"type": ""
},
{
"name": "len",
"nativeSrc": "9690:3:1",
"nodeType": "YulTypedName",
"src": "9690:3:1",
"type": ""
}
],
"src": "9596:1403:1"
},
{
"body": {
"nativeSrc": "11118:742:1",
"nodeType": "YulBlock",
"src": "11118:742:1",
"statements": [
{
"nativeSrc": "11128:29:1",
"nodeType": "YulVariableDeclaration",
"src": "11128:29:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "11151:5:1",
"nodeType": "YulIdentifier",
"src": "11151:5:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "11145:5:1",
"nodeType": "YulIdentifier",
"src": "11145:5:1"
},
"nativeSrc": "11145:12:1",
"nodeType": "YulFunctionCall",
"src": "11145:12:1"
},
"variables": [
{
"name": "slotValue",
"nativeSrc": "11132:9:1",
"nodeType": "YulTypedName",
"src": "11132:9:1",
"type": ""
}
]
},
{
"nativeSrc": "11166:50:1",
"nodeType": "YulVariableDeclaration",
"src": "11166:50:1",
"value": {
"arguments": [
{
"name": "slotValue",
"nativeSrc": "11206:9:1",
"nodeType": "YulIdentifier",
"src": "11206:9:1"
}
],
"functionName": {
"name": "extract_byte_array_length",
"nativeSrc": "11180:25:1",
"nodeType": "YulIdentifier",
"src": "11180:25:1"
},
"nativeSrc": "11180:36:1",
"nodeType": "YulFunctionCall",
"src": "11180:36:1"
},
"variables": [
{
"name": "length",
"nativeSrc": "11170:6:1",
"nodeType": "YulTypedName",
"src": "11170:6:1",
"type": ""
}
]
},
{
"nativeSrc": "11225:78:1",
"nodeType": "YulAssignment",
"src": "11225:78:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "11291:3:1",
"nodeType": "YulIdentifier",
"src": "11291:3:1"
},
{
"name": "length",
"nativeSrc": "11296:6:1",
"nodeType": "YulIdentifier",
"src": "11296:6:1"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "11232:58:1",
"nodeType": "YulIdentifier",
"src": "11232:58:1"
},
"nativeSrc": "11232:71:1",
"nodeType": "YulFunctionCall",
"src": "11232:71:1"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "11225:3:1",
"nodeType": "YulIdentifier",
"src": "11225:3:1"
}
]
},
{
"cases": [
{
"body": {
"nativeSrc": "11352:157:1",
"nodeType": "YulBlock",
"src": "11352:157:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "11405:3:1",
"nodeType": "YulIdentifier",
"src": "11405:3:1"
},
{
"arguments": [
{
"name": "slotValue",
"nativeSrc": "11414:9:1",
"nodeType": "YulIdentifier",
"src": "11414:9:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "11429:4:1",
"nodeType": "YulLiteral",
"src": "11429:4:1",
"type": "",
"value": "0xff"
}
],
"functionName": {
"name": "not",
"nativeSrc": "11425:3:1",
"nodeType": "YulIdentifier",
"src": "11425:3:1"
},
"nativeSrc": "11425:9:1",
"nodeType": "YulFunctionCall",
"src": "11425:9:1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "11410:3:1",
"nodeType": "YulIdentifier",
"src": "11410:3:1"
},
"nativeSrc": "11410:25:1",
"nodeType": "YulFunctionCall",
"src": "11410:25:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "11398:6:1",
"nodeType": "YulIdentifier",
"src": "11398:6:1"
},
"nativeSrc": "11398:38:1",
"nodeType": "YulFunctionCall",
"src": "11398:38:1"
},
"nativeSrc": "11398:38:1",
"nodeType": "YulExpressionStatement",
"src": "11398:38:1"
},
{
"nativeSrc": "11449:50:1",
"nodeType": "YulAssignment",
"src": "11449:50:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "11460:3:1",
"nodeType": "YulIdentifier",
"src": "11460:3:1"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "11469:4:1",
"nodeType": "YulLiteral",
"src": "11469:4:1",
"type": "",
"value": "0x20"
},
{
"arguments": [
{
"arguments": [
{
"name": "length",
"nativeSrc": "11489:6:1",
"nodeType": "YulIdentifier",
"src": "11489:6:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "11482:6:1",
"nodeType": "YulIdentifier",
"src": "11482:6:1"
},
"nativeSrc": "11482:14:1",
"nodeType": "YulFunctionCall",
"src": "11482:14:1"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "11475:6:1",
"nodeType": "YulIdentifier",
"src": "11475:6:1"
},
"nativeSrc": "11475:22:1",
"nodeType": "YulFunctionCall",
"src": "11475:22:1"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "11465:3:1",
"nodeType": "YulIdentifier",
"src": "11465:3:1"
},
"nativeSrc": "11465:33:1",
"nodeType": "YulFunctionCall",
"src": "11465:33:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "11456:3:1",
"nodeType": "YulIdentifier",
"src": "11456:3:1"
},
"nativeSrc": "11456:43:1",
"nodeType": "YulFunctionCall",
"src": "11456:43:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "11449:3:1",
"nodeType": "YulIdentifier",
"src": "11449:3:1"
}
]
}
]
},
"nativeSrc": "11345:164:1",
"nodeType": "YulCase",
"src": "11345:164:1",
"value": {
"kind": "number",
"nativeSrc": "11350:1:1",
"nodeType": "YulLiteral",
"src": "11350:1:1",
"type": "",
"value": "0"
}
},
{
"body": {
"nativeSrc": "11525:329:1",
"nodeType": "YulBlock",
"src": "11525:329:1",
"statements": [
{
"nativeSrc": "11570:53:1",
"nodeType": "YulVariableDeclaration",
"src": "11570:53:1",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "11617:5:1",
"nodeType": "YulIdentifier",
"src": "11617:5:1"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "11585:31:1",
"nodeType": "YulIdentifier",
"src": "11585:31:1"
},
"nativeSrc": "11585:38:1",
"nodeType": "YulFunctionCall",
"src": "11585:38:1"
},
"variables": [
{
"name": "dataPos",
"nativeSrc": "11574:7:1",
"nodeType": "YulTypedName",
"src": "11574:7:1",
"type": ""
}
]
},
{
"nativeSrc": "11636:10:1",
"nodeType": "YulVariableDeclaration",
"src": "11636:10:1",
"value": {
"kind": "number",
"nativeSrc": "11645:1:1",
"nodeType": "YulLiteral",
"src": "11645:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "11640:1:1",
"nodeType": "YulTypedName",
"src": "11640:1:1",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "11703:110:1",
"nodeType": "YulBlock",
"src": "11703:110:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "pos",
"nativeSrc": "11732:3:1",
"nodeType": "YulIdentifier",
"src": "11732:3:1"
},
{
"name": "i",
"nativeSrc": "11737:1:1",
"nodeType": "YulIdentifier",
"src": "11737:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "11728:3:1",
"nodeType": "YulIdentifier",
"src": "11728:3:1"
},
"nativeSrc": "11728:11:1",
"nodeType": "YulFunctionCall",
"src": "11728:11:1"
},
{
"arguments": [
{
"name": "dataPos",
"nativeSrc": "11747:7:1",
"nodeType": "YulIdentifier",
"src": "11747:7:1"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "11741:5:1",
"nodeType": "YulIdentifier",
"src": "11741:5:1"
},
"nativeSrc": "11741:14:1",
"nodeType": "YulFunctionCall",
"src": "11741:14:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "11721:6:1",
"nodeType": "YulIdentifier",
"src": "11721:6:1"
},
"nativeSrc": "11721:35:1",
"nodeType": "YulFunctionCall",
"src": "11721:35:1"
},
"nativeSrc": "11721:35:1",
"nodeType": "YulExpressionStatement",
"src": "11721:35:1"
},
{
"nativeSrc": "11773:26:1",
"nodeType": "YulAssignment",
"src": "11773:26:1",
"value": {
"arguments": [
{
"name": "dataPos",
"nativeSrc": "11788:7:1",
"nodeType": "YulIdentifier",
"src": "11788:7:1"
},
{
"kind": "number",
"nativeSrc": "11797:1:1",
"nodeType": "YulLiteral",
"src": "11797:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "11784:3:1",
"nodeType": "YulIdentifier",
"src": "11784:3:1"
},
"nativeSrc": "11784:15:1",
"nodeType": "YulFunctionCall",
"src": "11784:15:1"
},
"variableNames": [
{
"name": "dataPos",
"nativeSrc": "11773:7:1",
"nodeType": "YulIdentifier",
"src": "11773:7:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "11670:1:1",
"nodeType": "YulIdentifier",
"src": "11670:1:1"
},
{
"name": "length",
"nativeSrc": "11673:6:1",
"nodeType": "YulIdentifier",
"src": "11673:6:1"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "11667:2:1",
"nodeType": "YulIdentifier",
"src": "11667:2:1"
},
"nativeSrc": "11667:13:1",
"nodeType": "YulFunctionCall",
"src": "11667:13:1"
},
"nativeSrc": "11659:154:1",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "11681:21:1",
"nodeType": "YulBlock",
"src": "11681:21:1",
"statements": [
{
"nativeSrc": "11683:17:1",
"nodeType": "YulAssignment",
"src": "11683:17:1",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "11692:1:1",
"nodeType": "YulIdentifier",
"src": "11692:1:1"
},
{
"kind": "number",
"nativeSrc": "11695:4:1",
"nodeType": "YulLiteral",
"src": "11695:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "11688:3:1",
"nodeType": "YulIdentifier",
"src": "11688:3:1"
},
"nativeSrc": "11688:12:1",
"nodeType": "YulFunctionCall",
"src": "11688:12:1"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "11683:1:1",
"nodeType": "YulIdentifier",
"src": "11683:1:1"
}
]
}
]
},
"pre": {
"nativeSrc": "11663:3:1",
"nodeType": "YulBlock",
"src": "11663:3:1",
"statements": []
},
"src": "11659:154:1"
},
{
"nativeSrc": "11826:18:1",
"nodeType": "YulAssignment",
"src": "11826:18:1",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "11837:3:1",
"nodeType": "YulIdentifier",
"src": "11837:3:1"
},
{
"name": "i",
"nativeSrc": "11842:1:1",
"nodeType": "YulIdentifier",
"src": "11842:1:1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "11833:3:1",
"nodeType": "YulIdentifier",
"src": "11833:3:1"
},
"nativeSrc": "11833:11:1",
"nodeType": "YulFunctionCall",
"src": "11833:11:1"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "11826:3:1",
"nodeType": "YulIdentifier",
"src": "11826:3:1"
}
]
}
]
},
"nativeSrc": "11518:336:1",
"nodeType": "YulCase",
"src": "11518:336:1",
"value": {
"kind": "number",
"nativeSrc": "11523:1:1",
"nodeType": "YulLiteral",
"src": "11523:1:1",
"type": "",
"value": "1"
}
}
],
"expression": {
"arguments": [
{
"name": "slotValue",
"nativeSrc": "11323:9:1",
"nodeType": "YulIdentifier",
"src": "11323:9:1"
},
{
"kind": "number",
"nativeSrc": "11334:1:1",
"nodeType": "YulLiteral",
"src": "11334:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "11319:3:1",
"nodeType": "YulIdentifier",
"src": "11319:3:1"
},
"nativeSrc": "11319:17:1",
"nodeType": "YulFunctionCall",
"src": "11319:17:1"
},
"nativeSrc": "11312:542:1",
"nodeType": "YulSwitch",
"src": "11312:542:1"
}
]
},
"name": "abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack",
"nativeSrc": "11029:831:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "11099:5:1",
"nodeType": "YulTypedName",
"src": "11099:5:1",
"type": ""
},
{
"name": "pos",
"nativeSrc": "11106:3:1",
"nodeType": "YulTypedName",
"src": "11106:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "11114:3:1",
"nodeType": "YulTypedName",
"src": "11114:3:1",
"type": ""
}
],
"src": "11029:831:1"
},
{
"body": {
"nativeSrc": "12054:424:1",
"nodeType": "YulBlock",
"src": "12054:424:1",
"statements": [
{
"nativeSrc": "12064:26:1",
"nodeType": "YulAssignment",
"src": "12064:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "12076:9:1",
"nodeType": "YulIdentifier",
"src": "12076:9:1"
},
{
"kind": "number",
"nativeSrc": "12087:2:1",
"nodeType": "YulLiteral",
"src": "12087:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nativeSrc": "12072:3:1",
"nodeType": "YulIdentifier",
"src": "12072:3:1"
},
"nativeSrc": "12072:18:1",
"nodeType": "YulFunctionCall",
"src": "12072:18:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "12064:4:1",
"nodeType": "YulIdentifier",
"src": "12064:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "12111:9:1",
"nodeType": "YulIdentifier",
"src": "12111:9:1"
},
{
"kind": "number",
"nativeSrc": "12122:1:1",
"nodeType": "YulLiteral",
"src": "12122:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "12107:3:1",
"nodeType": "YulIdentifier",
"src": "12107:3:1"
},
"nativeSrc": "12107:17:1",
"nodeType": "YulFunctionCall",
"src": "12107:17:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "12130:4:1",
"nodeType": "YulIdentifier",
"src": "12130:4:1"
},
{
"name": "headStart",
"nativeSrc": "12136:9:1",
"nodeType": "YulIdentifier",
"src": "12136:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "12126:3:1",
"nodeType": "YulIdentifier",
"src": "12126:3:1"
},
"nativeSrc": "12126:20:1",
"nodeType": "YulFunctionCall",
"src": "12126:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "12100:6:1",
"nodeType": "YulIdentifier",
"src": "12100:6:1"
},
"nativeSrc": "12100:47:1",
"nodeType": "YulFunctionCall",
"src": "12100:47:1"
},
"nativeSrc": "12100:47:1",
"nodeType": "YulExpressionStatement",
"src": "12100:47:1"
},
{
"nativeSrc": "12156:83:1",
"nodeType": "YulAssignment",
"src": "12156:83:1",
"value": {
"arguments": [
{
"name": "value0",
"nativeSrc": "12225:6:1",
"nodeType": "YulIdentifier",
"src": "12225:6:1"
},
{
"name": "tail",
"nativeSrc": "12234:4:1",
"nodeType": "YulIdentifier",
"src": "12234:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack",
"nativeSrc": "12164:60:1",
"nodeType": "YulIdentifier",
"src": "12164:60:1"
},
"nativeSrc": "12164:75:1",
"nodeType": "YulFunctionCall",
"src": "12164:75:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "12156:4:1",
"nodeType": "YulIdentifier",
"src": "12156:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "12260:9:1",
"nodeType": "YulIdentifier",
"src": "12260:9:1"
},
{
"kind": "number",
"nativeSrc": "12271:2:1",
"nodeType": "YulLiteral",
"src": "12271:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "12256:3:1",
"nodeType": "YulIdentifier",
"src": "12256:3:1"
},
"nativeSrc": "12256:18:1",
"nodeType": "YulFunctionCall",
"src": "12256:18:1"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "12280:4:1",
"nodeType": "YulIdentifier",
"src": "12280:4:1"
},
{
"name": "headStart",
"nativeSrc": "12286:9:1",
"nodeType": "YulIdentifier",
"src": "12286:9:1"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "12276:3:1",
"nodeType": "YulIdentifier",
"src": "12276:3:1"
},
"nativeSrc": "12276:20:1",
"nodeType": "YulFunctionCall",
"src": "12276:20:1"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "12249:6:1",
"nodeType": "YulIdentifier",
"src": "12249:6:1"
},
"nativeSrc": "12249:48:1",
"nodeType": "YulFunctionCall",
"src": "12249:48:1"
},
"nativeSrc": "12249:48:1",
"nodeType": "YulExpressionStatement",
"src": "12249:48:1"
},
{
"nativeSrc": "12306:83:1",
"nodeType": "YulAssignment",
"src": "12306:83:1",
"value": {
"arguments": [
{
"name": "value1",
"nativeSrc": "12375:6:1",
"nodeType": "YulIdentifier",
"src": "12375:6:1"
},
{
"name": "tail",
"nativeSrc": "12384:4:1",
"nodeType": "YulIdentifier",
"src": "12384:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack",
"nativeSrc": "12314:60:1",
"nodeType": "YulIdentifier",
"src": "12314:60:1"
},
"nativeSrc": "12314:75:1",
"nodeType": "YulFunctionCall",
"src": "12314:75:1"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "12306:4:1",
"nodeType": "YulIdentifier",
"src": "12306:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value2",
"nativeSrc": "12443:6:1",
"nodeType": "YulIdentifier",
"src": "12443:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "12456:9:1",
"nodeType": "YulIdentifier",
"src": "12456:9:1"
},
{
"kind": "number",
"nativeSrc": "12467:2:1",
"nodeType": "YulLiteral",
"src": "12467:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nativeSrc": "12452:3:1",
"nodeType": "YulIdentifier",
"src": "12452:3:1"
},
"nativeSrc": "12452:18:1",
"nodeType": "YulFunctionCall",
"src": "12452:18:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "12399:43:1",
"nodeType": "YulIdentifier",
"src": "12399:43:1"
},
"nativeSrc": "12399:72:1",
"nodeType": "YulFunctionCall",
"src": "12399:72:1"
},
"nativeSrc": "12399:72:1",
"nodeType": "YulExpressionStatement",
"src": "12399:72:1"
}
]
},
"name": "abi_encode_tuple_t_string_storage_t_string_storage_t_uint256__to_t_string_memory_ptr_t_string_memory_ptr_t_uint256__fromStack_reversed",
"nativeSrc": "11866:612:1",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "12010:9:1",
"nodeType": "YulTypedName",
"src": "12010:9:1",
"type": ""
},
{
"name": "value2",
"nativeSrc": "12022:6:1",
"nodeType": "YulTypedName",
"src": "12022:6:1",
"type": ""
},
{
"name": "value1",
"nativeSrc": "12030:6:1",
"nodeType": "YulTypedName",
"src": "12030:6:1",
"type": ""
},
{
"name": "value0",
"nativeSrc": "12038:6:1",
"nodeType": "YulTypedName",
"src": "12038:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "12049:4:1",
"nodeType": "YulTypedName",
"src": "12049:4:1",
"type": ""
}
],
"src": "11866:612:1"
}
]
},
"contents": "{\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490() {\n revert(0, 0)\n }\n\n function revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef() {\n revert(0, 0)\n }\n\n // string\n function abi_decode_t_string_calldata_ptr(offset, end) -> arrayPos, length {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n length := calldataload(offset)\n if gt(length, 0xffffffffffffffff) { revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490() }\n arrayPos := add(offset, 0x20)\n if gt(add(arrayPos, mul(length, 0x01)), end) { revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef() }\n }\n\n function abi_decode_tuple_t_string_calldata_ptr(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0, value1 := abi_decode_t_string_calldata_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_memory_to_memory_with_cleanup(src, dst, length) {\n\n mcopy(dst, src, length)\n mstore(add(dst, length), 0)\n\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory_with_cleanup(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_addresst_address(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function array_length_t_string_calldata_ptr(value, len) -> length {\n\n length := len\n\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function array_dataslot_t_string_storage(ptr) -> data {\n data := ptr\n\n mstore(0, ptr)\n data := keccak256(0, 0x20)\n\n }\n\n function divide_by_32_ceil(value) -> result {\n result := div(add(value, 31), 32)\n }\n\n function shift_left_dynamic(bits, value) -> newValue {\n newValue :=\n\n shl(bits, value)\n\n }\n\n function update_byte_slice_dynamic32(value, shiftBytes, toInsert) -> result {\n let shiftBits := mul(shiftBytes, 8)\n let mask := shift_left_dynamic(shiftBits, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n toInsert := shift_left_dynamic(shiftBits, toInsert)\n value := and(value, not(mask))\n result := or(value, and(toInsert, mask))\n }\n\n function identity(value) -> ret {\n ret := value\n }\n\n function convert_t_uint256_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(identity(cleanup_t_uint256(value)))\n }\n\n function prepare_store_t_uint256(value) -> ret {\n ret := value\n }\n\n function update_storage_value_t_uint256_to_t_uint256(slot, offset, value_0) {\n let convertedValue_0 := convert_t_uint256_to_t_uint256(value_0)\n sstore(slot, update_byte_slice_dynamic32(sload(slot), offset, prepare_store_t_uint256(convertedValue_0)))\n }\n\n function zero_value_for_split_t_uint256() -> ret {\n ret := 0\n }\n\n function storage_set_to_zero_t_uint256(slot, offset) {\n let zero_0 := zero_value_for_split_t_uint256()\n update_storage_value_t_uint256_to_t_uint256(slot, offset, zero_0)\n }\n\n function clear_storage_range_t_bytes1(start, end) {\n for {} lt(start, end) { start := add(start, 1) }\n {\n storage_set_to_zero_t_uint256(start, 0)\n }\n }\n\n function clean_up_bytearray_end_slots_t_string_storage(array, len, startIndex) {\n\n if gt(len, 31) {\n let dataArea := array_dataslot_t_string_storage(array)\n let deleteStart := add(dataArea, divide_by_32_ceil(startIndex))\n // If we are clearing array to be short byte array, we want to clear only data starting from array data area.\n if lt(startIndex, 32) { deleteStart := dataArea }\n clear_storage_range_t_bytes1(deleteStart, add(dataArea, divide_by_32_ceil(len)))\n }\n\n }\n\n function shift_right_unsigned_dynamic(bits, value) -> newValue {\n newValue :=\n\n shr(bits, value)\n\n }\n\n function mask_bytes_dynamic(data, bytes) -> result {\n let mask := not(shift_right_unsigned_dynamic(mul(8, bytes), not(0)))\n result := and(data, mask)\n }\n function extract_used_part_and_set_length_of_short_byte_array(data, len) -> used {\n // we want to save only elements that are part of the array after resizing\n // others should be set to zero\n data := mask_bytes_dynamic(data, len)\n used := or(data, mul(2, len))\n }\n function copy_byte_array_to_storage_from_t_string_calldata_ptr_to_t_string_storage(slot, src, len) {\n\n let newLen := array_length_t_string_calldata_ptr(src, len)\n // Make sure array length is sane\n if gt(newLen, 0xffffffffffffffff) { panic_error_0x41() }\n\n let oldLen := extract_byte_array_length(sload(slot))\n\n // potentially truncate data\n clean_up_bytearray_end_slots_t_string_storage(slot, oldLen, newLen)\n\n let srcOffset := 0\n\n switch gt(newLen, 31)\n case 1 {\n let loopEnd := and(newLen, not(0x1f))\n\n let dstPtr := array_dataslot_t_string_storage(slot)\n let i := 0\n for { } lt(i, loopEnd) { i := add(i, 0x20) } {\n sstore(dstPtr, calldataload(add(src, srcOffset)))\n dstPtr := add(dstPtr, 1)\n srcOffset := add(srcOffset, 32)\n }\n if lt(loopEnd, newLen) {\n let lastValue := calldataload(add(src, srcOffset))\n sstore(dstPtr, mask_bytes_dynamic(lastValue, and(newLen, 0x1f)))\n }\n sstore(slot, add(mul(newLen, 2), 1))\n }\n default {\n let value := 0\n if newLen {\n value := calldataload(add(src, srcOffset))\n }\n sstore(slot, extract_used_part_and_set_length_of_short_byte_array(value, newLen))\n }\n }\n\n // string -> string\n function abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack(value, pos) -> ret {\n let slotValue := sload(value)\n let length := extract_byte_array_length(slotValue)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n switch and(slotValue, 1)\n case 0 {\n // short byte array\n mstore(pos, and(slotValue, not(0xff)))\n ret := add(pos, mul(0x20, iszero(iszero(length))))\n }\n case 1 {\n // long byte array\n let dataPos := array_dataslot_t_string_storage(value)\n let i := 0\n for { } lt(i, length) { i := add(i, 0x20) } {\n mstore(add(pos, i), sload(dataPos))\n dataPos := add(dataPos, 1)\n }\n ret := add(pos, i)\n }\n }\n\n function abi_encode_tuple_t_string_storage_t_string_storage_t_uint256__to_t_string_memory_ptr_t_string_memory_ptr_t_uint256__fromStack_reversed(headStart , value2, value1, value0) -> tail {\n tail := add(headStart, 96)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack(value0, tail)\n\n mstore(add(headStart, 32), sub(tail, headStart))\n tail := abi_encode_t_string_storage_to_t_string_memory_ptr_fromStack(value1, tail)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value2, add(headStart, 64))\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {
"11": [
{
"length": 32,
"start": 728
},
{
"length": 32,
"start": 776
},
{
"length": 32,
"start": 1063
},
{
"length": 32,
"start": 1544
},
{
"length": 32,
"start": 1876
},
{
"length": 32,
"start": 2308
},
{
"length": 32,
"start": 2595
}
],
"13": [
{
"length": 32,
"start": 1840
}
]
},
"linkReferences": {},
"object": "608060405234801561000f575f5ffd5b50600436106100fe575f3560e01c8063934aa02311610095578063dfab10ed11610064578063dfab10ed14610250578063ed026dbc1461026c578063eeafe9da14610288578063fbfa77cf146102b8576100fe565b8063934aa023146101da57806399cacc9e146101f85780639a33e30014610214578063b3f05b9714610232576100fe565b80632accd144116100d15780632accd144146101765780632af8afca14610194578063344612c7146101b25780637417882c146101d0576100fe565b806302d05d3f146101025780630681ca55146101205780631decc1cf1461013e57806321ecc6091461015a575b5f5ffd5b61010a6102d6565b6040516101179190610d84565b60405180910390f35b6101286102fa565b6040516101359190610db5565b60405180910390f35b61015860048036038101906101539190610e37565b610306565b005b610174600480360381019061016f9190610eac565b610425565b005b61017e61054f565b60405161018b9190610f47565b60405180910390f35b61019c6105db565b6040516101a99190610d84565b60405180910390f35b6101ba610600565b6040516101c79190610db5565b60405180910390f35b6101d8610606565b005b6101e261072e565b6040516101ef9190610d84565b60405180910390f35b610212600480360381019061020d9190610eac565b610752565b005b61021c610865565b6040516102299190610f47565b60405180910390f35b61023a6108f1565b6040516102479190610f81565b60405180910390f35b61026a60048036038101906102659190610e37565b610902565b005b61028660048036038101906102819190610fc4565b610a21565b005b6102a2600480360381019061029d9190610eac565b610d00565b6040516102af9190610db5565b60405180910390f35b6102c0610d20565b6040516102cd9190610d84565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f600480549050905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038b576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156103d0576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181600291826103e1929190611236565b507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae1276001600260035460405161041993929190611384565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104aa576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156104ef576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600481908060018154018082558091505060019003905f5260205f20015f90919091909150557fc4bb392c6343f357e3d1657b96ba539bd19d29fb258328b3eddc49d619352ac9816040516105449190610db5565b60405180910390a150565b6002805461055c90611066565b80601f016020809104026020016040519081016040528092919081815260200182805461058890611066565b80156105d35780601f106105aa576101008083540402835291602001916105d3565b820191905f5260205f20905b8154815290600101906020018083116105b657829003601f168201915b505050505081565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461068b576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156106d0576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015f5f6101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167f2e017d1517bd7e5860886e09e2a2a50b35fafd176efc5b78a6377a18507e77be60405160405180910390a2565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d7576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff161561081c576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806003819055507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae1276001600260035460405161085a93929190611384565b60405180910390a150565b6001805461087290611066565b80601f016020809104026020016040519081016040528092919081815260200182805461089e90611066565b80156108e95780601f106108c0576101008083540402835291602001916108e9565b820191905f5260205f20905b8154815290600101906020018083116108cc57829003601f168201915b505050505081565b5f5f9054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610987576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900460ff16156109cc576040517f6823b07300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181600191826109dd929190611236565b507fd329481b87794f8b5d031d7e8550ff9e7e4f78855dbf2e080c34a5df9b7ae12760016002600354604051610a1593929190611384565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa6576040517f47bc7cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610b0b57505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b15610b42576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580610beb57505f73ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610c22576040517f3ca9d61700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f402dc0e0b3cc5e6e72bd9d0ffaf398abfe958172835feb52d2c4ebdb6e58ea6660405160405180910390a35050565b60048181548110610d0f575f80fd5b905f5260205f20015f915090505481565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d6e82610d45565b9050919050565b610d7e81610d64565b82525050565b5f602082019050610d975f830184610d75565b92915050565b5f819050919050565b610daf81610d9d565b82525050565b5f602082019050610dc85f830184610da6565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112610df757610df6610dd6565b5b8235905067ffffffffffffffff811115610e1457610e13610dda565b5b602083019150836001820283011115610e3057610e2f610dde565b5b9250929050565b5f5f60208385031215610e4d57610e4c610dce565b5b5f83013567ffffffffffffffff811115610e6a57610e69610dd2565b5b610e7685828601610de2565b92509250509250929050565b610e8b81610d9d565b8114610e95575f5ffd5b50565b5f81359050610ea681610e82565b92915050565b5f60208284031215610ec157610ec0610dce565b5b5f610ece84828501610e98565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610f1982610ed7565b610f238185610ee1565b9350610f33818560208601610ef1565b610f3c81610eff565b840191505092915050565b5f6020820190508181035f830152610f5f8184610f0f565b905092915050565b5f8115159050919050565b610f7b81610f67565b82525050565b5f602082019050610f945f830184610f72565b92915050565b610fa381610d64565b8114610fad575f5ffd5b50565b5f81359050610fbe81610f9a565b92915050565b5f5f60408385031215610fda57610fd9610dce565b5b5f610fe785828601610fb0565b9250506020610ff885828601610fb0565b9150509250929050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061107d57607f821691505b6020821081036110905761108f611039565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026110f27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826110b7565b6110fc86836110b7565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61113761113261112d84610d9d565b611114565b610d9d565b9050919050565b5f819050919050565b6111508361111d565b61116461115c8261113e565b8484546110c3565b825550505050565b5f5f905090565b61117b61116c565b611186818484611147565b505050565b5b818110156111a95761119e5f82611173565b60018101905061118c565b5050565b601f8211156111ee576111bf81611096565b6111c8846110a8565b810160208510156111d7578190505b6111eb6111e3856110a8565b83018261118b565b50505b505050565b5f82821c905092915050565b5f61120e5f19846008026111f3565b1980831691505092915050565b5f61122683836111ff565b9150826002028217905092915050565b6112408383611002565b67ffffffffffffffff8111156112595761125861100c565b5b6112638254611066565b61126e8282856111ad565b5f601f83116001811461129b575f8415611289578287013590505b611293858261121b565b8655506112fa565b601f1984166112a986611096565b5f5b828110156112d0578489013582556001820191506020850194506020810190506112ab565b868310156112ed57848901356112e9601f8916826111ff565b8355505b6001600288020188555050505b50505050505050565b5f815461130f81611066565b6113198186610ee1565b9450600182165f811461133357600181146113495761137b565b60ff19831686528115156020028601935061137b565b61135285611096565b5f5b8381101561137357815481890152600182019150602081019050611354565b808801955050505b50505092915050565b5f6060820190508181035f83015261139c8186611303565b905081810360208301526113b08185611303565b90506113bf6040830184610da6565b94935050505056fea2646970667358221220477b2cf3639854266010eb8b342e3987d4aaeff17d8bef6e1dab73953787a80b64736f6c634300081e0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0xF JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xFE JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x934AA023 GT PUSH2 0x95 JUMPI DUP1 PUSH4 0xDFAB10ED GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xDFAB10ED EQ PUSH2 0x250 JUMPI DUP1 PUSH4 0xED026DBC EQ PUSH2 0x26C JUMPI DUP1 PUSH4 0xEEAFE9DA EQ PUSH2 0x288 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x2B8 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x934AA023 EQ PUSH2 0x1DA JUMPI DUP1 PUSH4 0x99CACC9E EQ PUSH2 0x1F8 JUMPI DUP1 PUSH4 0x9A33E300 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0xB3F05B97 EQ PUSH2 0x232 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x2ACCD144 GT PUSH2 0xD1 JUMPI DUP1 PUSH4 0x2ACCD144 EQ PUSH2 0x176 JUMPI DUP1 PUSH4 0x2AF8AFCA EQ PUSH2 0x194 JUMPI DUP1 PUSH4 0x344612C7 EQ PUSH2 0x1B2 JUMPI DUP1 PUSH4 0x7417882C EQ PUSH2 0x1D0 JUMPI PUSH2 0xFE JUMP JUMPDEST DUP1 PUSH4 0x2D05D3F EQ PUSH2 0x102 JUMPI DUP1 PUSH4 0x681CA55 EQ PUSH2 0x120 JUMPI DUP1 PUSH4 0x1DECC1CF EQ PUSH2 0x13E JUMPI DUP1 PUSH4 0x21ECC609 EQ PUSH2 0x15A JUMPI JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x10A PUSH2 0x2D6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x117 SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x128 PUSH2 0x2FA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x135 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x158 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x153 SWAP2 SWAP1 PUSH2 0xE37 JUMP JUMPDEST PUSH2 0x306 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x174 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x16F SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x425 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x17E PUSH2 0x54F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18B SWAP2 SWAP1 PUSH2 0xF47 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x19C PUSH2 0x5DB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1A9 SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1BA PUSH2 0x600 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1C7 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1D8 PUSH2 0x606 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E2 PUSH2 0x72E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1EF SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x212 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x20D SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x752 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x21C PUSH2 0x865 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x229 SWAP2 SWAP1 PUSH2 0xF47 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x23A PUSH2 0x8F1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x247 SWAP2 SWAP1 PUSH2 0xF81 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x26A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x265 SWAP2 SWAP1 PUSH2 0xE37 JUMP JUMPDEST PUSH2 0x902 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x286 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x281 SWAP2 SWAP1 PUSH2 0xFC4 JUMP JUMPDEST PUSH2 0xA21 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2A2 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x29D SWAP2 SWAP1 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0xD00 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2AF SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2C0 PUSH2 0xD20 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x2CD SWAP2 SWAP1 PUSH2 0xD84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH0 PUSH1 0x4 DUP1 SLOAD SWAP1 POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x38B JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x3D0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 DUP2 PUSH1 0x2 SWAP2 DUP3 PUSH2 0x3E1 SWAP3 SWAP2 SWAP1 PUSH2 0x1236 JUMP JUMPDEST POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x419 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x4AA JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x4EF JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x4 DUP2 SWAP1 DUP1 PUSH1 0x1 DUP2 SLOAD ADD DUP1 DUP3 SSTORE DUP1 SWAP2 POP POP PUSH1 0x1 SWAP1 SUB SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 ADD PUSH0 SWAP1 SWAP2 SWAP1 SWAP2 SWAP1 SWAP2 POP SSTORE PUSH32 0xC4BB392C6343F357E3D1657B96BA539BD19D29FB258328B3EDDC49D619352AC9 DUP2 PUSH1 0x40 MLOAD PUSH2 0x544 SWAP2 SWAP1 PUSH2 0xDB5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH2 0x55C SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x588 SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x5D3 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x5AA JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x5D3 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x5B6 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x6 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x68B JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x6D0 JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH0 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x2E017D1517BD7E5860886E09E2A2A50B35FAFD176EFC5B78A6377A18507E77BE PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x7D7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x81C JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x3 DUP2 SWAP1 SSTORE POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x85A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH2 0x872 SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x89E SWAP1 PUSH2 0x1066 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x8E9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x8C0 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x8E9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x8CC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x987 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x9CC JUMPI PUSH1 0x40 MLOAD PUSH32 0x6823B07300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 DUP2 PUSH1 0x1 SWAP2 DUP3 PUSH2 0x9DD SWAP3 SWAP2 SWAP1 PUSH2 0x1236 JUMP JUMPDEST POP PUSH32 0xD329481B87794F8B5D031D7E8550FF9E7E4F78855DBF2E080C34A5DF9B7AE127 PUSH1 0x1 PUSH1 0x2 PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0xA15 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1384 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH32 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xAA6 JUMPI PUSH1 0x40 MLOAD PUSH32 0x47BC7CC800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0xB0B JUMPI POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST ISZERO PUSH2 0xB42 JUMPI PUSH1 0x40 MLOAD PUSH32 0xD92E233D00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x5 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO DUP1 PUSH2 0xBEB JUMPI POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x6 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO JUMPDEST ISZERO PUSH2 0xC22 JUMPI PUSH1 0x40 MLOAD PUSH32 0x3CA9D61700000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 PUSH1 0x5 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x6 PUSH0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x402DC0E0B3CC5E6E72BD9D0FFAF398ABFE958172835FEB52D2C4EBDB6E58EA66 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x4 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0xD0F JUMPI PUSH0 DUP1 REVERT JUMPDEST SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 ADD PUSH0 SWAP2 POP SWAP1 POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0xD6E DUP3 PUSH2 0xD45 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xD7E DUP2 PUSH2 0xD64 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xD97 PUSH0 DUP4 ADD DUP5 PUSH2 0xD75 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xDAF DUP2 PUSH2 0xD9D JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xDC8 PUSH0 DUP4 ADD DUP5 PUSH2 0xDA6 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH0 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xDF7 JUMPI PUSH2 0xDF6 PUSH2 0xDD6 JUMP JUMPDEST JUMPDEST DUP3 CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xE14 JUMPI PUSH2 0xE13 PUSH2 0xDDA JUMP JUMPDEST JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x1 DUP3 MUL DUP4 ADD GT ISZERO PUSH2 0xE30 JUMPI PUSH2 0xE2F PUSH2 0xDDE JUMP JUMPDEST JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x20 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xE4D JUMPI PUSH2 0xE4C PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 DUP4 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xE6A JUMPI PUSH2 0xE69 PUSH2 0xDD2 JUMP JUMPDEST JUMPDEST PUSH2 0xE76 DUP6 DUP3 DUP7 ADD PUSH2 0xDE2 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xE8B DUP2 PUSH2 0xD9D JUMP JUMPDEST DUP2 EQ PUSH2 0xE95 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xEA6 DUP2 PUSH2 0xE82 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEC1 JUMPI PUSH2 0xEC0 PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0xECE DUP5 DUP3 DUP6 ADD PUSH2 0xE98 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 MCOPY PUSH0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0xF19 DUP3 PUSH2 0xED7 JUMP JUMPDEST PUSH2 0xF23 DUP2 DUP6 PUSH2 0xEE1 JUMP JUMPDEST SWAP4 POP PUSH2 0xF33 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0xF3C DUP2 PUSH2 0xEFF JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0xF5F DUP2 DUP5 PUSH2 0xF0F JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP2 ISZERO ISZERO SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xF7B DUP2 PUSH2 0xF67 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xF94 PUSH0 DUP4 ADD DUP5 PUSH2 0xF72 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xFA3 DUP2 PUSH2 0xD64 JUMP JUMPDEST DUP2 EQ PUSH2 0xFAD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xFBE DUP2 PUSH2 0xF9A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDA JUMPI PUSH2 0xFD9 PUSH2 0xDCE JUMP JUMPDEST JUMPDEST PUSH0 PUSH2 0xFE7 DUP6 DUP3 DUP7 ADD PUSH2 0xFB0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xFF8 DUP6 DUP3 DUP7 ADD PUSH2 0xFB0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x107D JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1090 JUMPI PUSH2 0x108F PUSH2 0x1039 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP DUP2 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 PUSH1 0x1F DUP4 ADD DIV SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHL SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x8 DUP4 MUL PUSH2 0x10F2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 PUSH2 0x10B7 JUMP JUMPDEST PUSH2 0x10FC DUP7 DUP4 PUSH2 0x10B7 JUMP JUMPDEST SWAP6 POP DUP1 NOT DUP5 AND SWAP4 POP DUP1 DUP7 AND DUP5 OR SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x1137 PUSH2 0x1132 PUSH2 0x112D DUP5 PUSH2 0xD9D JUMP JUMPDEST PUSH2 0x1114 JUMP JUMPDEST PUSH2 0xD9D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1150 DUP4 PUSH2 0x111D JUMP JUMPDEST PUSH2 0x1164 PUSH2 0x115C DUP3 PUSH2 0x113E JUMP JUMPDEST DUP5 DUP5 SLOAD PUSH2 0x10C3 JUMP JUMPDEST DUP3 SSTORE POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x117B PUSH2 0x116C JUMP JUMPDEST PUSH2 0x1186 DUP2 DUP5 DUP5 PUSH2 0x1147 JUMP JUMPDEST POP POP POP JUMP JUMPDEST JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x11A9 JUMPI PUSH2 0x119E PUSH0 DUP3 PUSH2 0x1173 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SWAP1 POP PUSH2 0x118C JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH2 0x11EE JUMPI PUSH2 0x11BF DUP2 PUSH2 0x1096 JUMP JUMPDEST PUSH2 0x11C8 DUP5 PUSH2 0x10A8 JUMP JUMPDEST DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH2 0x11D7 JUMPI DUP2 SWAP1 POP JUMPDEST PUSH2 0x11EB PUSH2 0x11E3 DUP6 PUSH2 0x10A8 JUMP JUMPDEST DUP4 ADD DUP3 PUSH2 0x118B JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 DUP3 DUP3 SHR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x120E PUSH0 NOT DUP5 PUSH1 0x8 MUL PUSH2 0x11F3 JUMP JUMPDEST NOT DUP1 DUP4 AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH2 0x1226 DUP4 DUP4 PUSH2 0x11FF JUMP JUMPDEST SWAP2 POP DUP3 PUSH1 0x2 MUL DUP3 OR SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1240 DUP4 DUP4 PUSH2 0x1002 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1259 JUMPI PUSH2 0x1258 PUSH2 0x100C JUMP JUMPDEST JUMPDEST PUSH2 0x1263 DUP3 SLOAD PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x126E DUP3 DUP3 DUP6 PUSH2 0x11AD JUMP JUMPDEST PUSH0 PUSH1 0x1F DUP4 GT PUSH1 0x1 DUP2 EQ PUSH2 0x129B JUMPI PUSH0 DUP5 ISZERO PUSH2 0x1289 JUMPI DUP3 DUP8 ADD CALLDATALOAD SWAP1 POP JUMPDEST PUSH2 0x1293 DUP6 DUP3 PUSH2 0x121B JUMP JUMPDEST DUP7 SSTORE POP PUSH2 0x12FA JUMP JUMPDEST PUSH1 0x1F NOT DUP5 AND PUSH2 0x12A9 DUP7 PUSH2 0x1096 JUMP JUMPDEST PUSH0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x12D0 JUMPI DUP5 DUP10 ADD CALLDATALOAD DUP3 SSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP6 ADD SWAP5 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x12AB JUMP JUMPDEST DUP7 DUP4 LT ISZERO PUSH2 0x12ED JUMPI DUP5 DUP10 ADD CALLDATALOAD PUSH2 0x12E9 PUSH1 0x1F DUP10 AND DUP3 PUSH2 0x11FF JUMP JUMPDEST DUP4 SSTORE POP JUMPDEST PUSH1 0x1 PUSH1 0x2 DUP9 MUL ADD DUP9 SSTORE POP POP POP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 DUP2 SLOAD PUSH2 0x130F DUP2 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1319 DUP2 DUP7 PUSH2 0xEE1 JUMP JUMPDEST SWAP5 POP PUSH1 0x1 DUP3 AND PUSH0 DUP2 EQ PUSH2 0x1333 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x1349 JUMPI PUSH2 0x137B JUMP JUMPDEST PUSH1 0xFF NOT DUP4 AND DUP7 MSTORE DUP2 ISZERO ISZERO PUSH1 0x20 MUL DUP7 ADD SWAP4 POP PUSH2 0x137B JUMP JUMPDEST PUSH2 0x1352 DUP6 PUSH2 0x1096 JUMP JUMPDEST PUSH0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1373 JUMPI DUP2 SLOAD DUP2 DUP10 ADD MSTORE PUSH1 0x1 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x1354 JUMP JUMPDEST DUP1 DUP9 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH0 DUP4 ADD MSTORE PUSH2 0x139C DUP2 DUP7 PUSH2 0x1303 JUMP JUMPDEST SWAP1 POP DUP2 DUP2 SUB PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x13B0 DUP2 DUP6 PUSH2 0x1303 JUMP JUMPDEST SWAP1 POP PUSH2 0x13BF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xDA6 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFBALANCE PUSH28 0x2CF3639854266010EB8B342E3987D4AAEFF17D8BEF6E1DAB73953787 0xA8 SIGNEXTEND PUSH5 0x736F6C6343 STOP ADDMOD 0x1E STOP CALLER ",
"sourceMap": "58:2985:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;233:32;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2936:105;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1738:231;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2208:183;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;480:29;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;731:18;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;515:32;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2447:144;;;:::i;:::-;;285:32;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1975:227;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;448:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;350:24;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1513:219;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2597:333;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;584:33;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;705:20;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;233:32;;;:::o;2936:105::-;2985:7;3011:16;:23;;;;3004:30;;2936:105;:::o;1738:231::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;1164:9:::1;;;;;;;;;;;1160:33;;;1182:11;;;;;;;;;;;;;;1160:33;1873:8:::2;;1856:14;:25;;;;;;;:::i;:::-;;1896:66;1915:11;1928:14;1944:17;;1896:66;;;;;;;;:::i;:::-;;;;;;;;1738:231:::0;;:::o;2208:183::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;1164:9:::1;;;;;;;;;;;1160:33;;;1182:11;;;;;;;;;;;;;;1160:33;2316:16:::2;2338:7;2316:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2361:23;2376:7;2361:23;;;;;;:::i;:::-;;;;;;;;2208:183:::0;:::o;480:29::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;731:18::-;;;;;;;;;;;;;:::o;515:32::-;;;;:::o;2447:144::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;1164:9:::1;;;;;;;;;;;1160:33;;;1182:11;;;;;;;;;;;;;;1160:33;2537:4:::2;2525:9;;:16;;;;;;;;;;;;;;;;;;2573:10;2556:28;;;;;;;;;;;;2447:144::o:0;285:32::-;;;:::o;1975:227::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;1164:9:::1;;;;;;;;;;;1160:33;;;1182:11;;;;;;;;;;;;;;1160:33;2107:7:::2;2087:17;:27;;;;2129:66;2148:11;2161:14;2177:17;;2129:66;;;;;;;;:::i;:::-;;;;;;;;1975:227:::0;:::o;448:26::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;350:24::-;;;;;;;;;;;;;:::o;1513:219::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;1164:9:::1;;;;;;;;;;;1160:33;;;1182:11;;;;;;;;;;;;;;1160:33;1639:5:::2;;1625:11;:19;;;;;;;:::i;:::-;;1659:66;1678:11;1691:14;1707:17;;1659:66;;;;;;;;:::i;:::-;;;;;;;;1513:219:::0;;:::o;2597:333::-;1067:7;1053:21;;:10;:21;;;1049:47;;1083:13;;;;;;;;;;;;;;1049:47;2709:1:::1;2691:20;;:6;:20;;;:42;;;;2731:1;2715:18;;:4;:18;;;2691:42;2687:68;;;2742:13;;;;;;;;;;;;;;2687:68;2786:1;2769:19;;:5;;;;;;;;;;;:19;;;;:40;;;;2807:1;2792:17;;:3;;;;;;;;;;;:17;;;;2769:40;2765:70;;;2818:17;;;;;;;;;;;;;;2765:70;2853:6;2845:5;;:14;;;;;;;;;;;;;;;;;;2877:4;2869:3;;:12;;;;;;;;;;;;;;;;;;2918:4;2896:27;;2910:6;2896:27;;;;;;;;;;;;2597:333:::0;;:::o;584:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;705:20::-;;;;;;;;;;;;;:::o;7:126:1:-;44:7;84:42;77:5;73:54;62:65;;7:126;;;:::o;139:96::-;176:7;205:24;223:5;205:24;:::i;:::-;194:35;;139:96;;;:::o;241:118::-;328:24;346:5;328:24;:::i;:::-;323:3;316:37;241:118;;:::o;365:222::-;458:4;496:2;485:9;481:18;473:26;;509:71;577:1;566:9;562:17;553:6;509:71;:::i;:::-;365:222;;;;:::o;593:77::-;630:7;659:5;648:16;;593:77;;;:::o;676:118::-;763:24;781:5;763:24;:::i;:::-;758:3;751:37;676:118;;:::o;800:222::-;893:4;931:2;920:9;916:18;908:26;;944:71;1012:1;1001:9;997:17;988:6;944:71;:::i;:::-;800:222;;;;:::o;1109:117::-;1218:1;1215;1208:12;1232:117;1341:1;1338;1331:12;1355:117;1464:1;1461;1454:12;1478:117;1587:1;1584;1577:12;1601:117;1710:1;1707;1700:12;1738:553;1796:8;1806:6;1856:3;1849:4;1841:6;1837:17;1833:27;1823:122;;1864:79;;:::i;:::-;1823:122;1977:6;1964:20;1954:30;;2007:18;1999:6;1996:30;1993:117;;;2029:79;;:::i;:::-;1993:117;2143:4;2135:6;2131:17;2119:29;;2197:3;2189:4;2181:6;2177:17;2167:8;2163:32;2160:41;2157:128;;;2204:79;;:::i;:::-;2157:128;1738:553;;;;;:::o;2297:529::-;2368:6;2376;2425:2;2413:9;2404:7;2400:23;2396:32;2393:119;;;2431:79;;:::i;:::-;2393:119;2579:1;2568:9;2564:17;2551:31;2609:18;2601:6;2598:30;2595:117;;;2631:79;;:::i;:::-;2595:117;2744:65;2801:7;2792:6;2781:9;2777:22;2744:65;:::i;:::-;2726:83;;;;2522:297;2297:529;;;;;:::o;2832:122::-;2905:24;2923:5;2905:24;:::i;:::-;2898:5;2895:35;2885:63;;2944:1;2941;2934:12;2885:63;2832:122;:::o;2960:139::-;3006:5;3044:6;3031:20;3022:29;;3060:33;3087:5;3060:33;:::i;:::-;2960:139;;;;:::o;3105:329::-;3164:6;3213:2;3201:9;3192:7;3188:23;3184:32;3181:119;;;3219:79;;:::i;:::-;3181:119;3339:1;3364:53;3409:7;3400:6;3389:9;3385:22;3364:53;:::i;:::-;3354:63;;3310:117;3105:329;;;;:::o;3440:99::-;3492:6;3526:5;3520:12;3510:22;;3440:99;;;:::o;3545:169::-;3629:11;3663:6;3658:3;3651:19;3703:4;3698:3;3694:14;3679:29;;3545:169;;;;:::o;3720:139::-;3809:6;3804:3;3799;3793:23;3850:1;3841:6;3836:3;3832:16;3825:27;3720:139;;;:::o;3865:102::-;3906:6;3957:2;3953:7;3948:2;3941:5;3937:14;3933:28;3923:38;;3865:102;;;:::o;3973:377::-;4061:3;4089:39;4122:5;4089:39;:::i;:::-;4144:71;4208:6;4203:3;4144:71;:::i;:::-;4137:78;;4224:65;4282:6;4277:3;4270:4;4263:5;4259:16;4224:65;:::i;:::-;4314:29;4336:6;4314:29;:::i;:::-;4309:3;4305:39;4298:46;;4065:285;3973:377;;;;:::o;4356:313::-;4469:4;4507:2;4496:9;4492:18;4484:26;;4556:9;4550:4;4546:20;4542:1;4531:9;4527:17;4520:47;4584:78;4657:4;4648:6;4584:78;:::i;:::-;4576:86;;4356:313;;;;:::o;4675:90::-;4709:7;4752:5;4745:13;4738:21;4727:32;;4675:90;;;:::o;4771:109::-;4852:21;4867:5;4852:21;:::i;:::-;4847:3;4840:34;4771:109;;:::o;4886:210::-;4973:4;5011:2;5000:9;4996:18;4988:26;;5024:65;5086:1;5075:9;5071:17;5062:6;5024:65;:::i;:::-;4886:210;;;;:::o;5102:122::-;5175:24;5193:5;5175:24;:::i;:::-;5168:5;5165:35;5155:63;;5214:1;5211;5204:12;5155:63;5102:122;:::o;5230:139::-;5276:5;5314:6;5301:20;5292:29;;5330:33;5357:5;5330:33;:::i;:::-;5230:139;;;;:::o;5375:474::-;5443:6;5451;5500:2;5488:9;5479:7;5475:23;5471:32;5468:119;;;5506:79;;:::i;:::-;5468:119;5626:1;5651:53;5696:7;5687:6;5676:9;5672:22;5651:53;:::i;:::-;5641:63;;5597:117;5753:2;5779:53;5824:7;5815:6;5804:9;5800:22;5779:53;:::i;:::-;5769:63;;5724:118;5375:474;;;;;:::o;5855:97::-;5914:6;5942:3;5932:13;;5855:97;;;;:::o;5958:180::-;6006:77;6003:1;5996:88;6103:4;6100:1;6093:15;6127:4;6124:1;6117:15;6144:180;6192:77;6189:1;6182:88;6289:4;6286:1;6279:15;6313:4;6310:1;6303:15;6330:320;6374:6;6411:1;6405:4;6401:12;6391:22;;6458:1;6452:4;6448:12;6479:18;6469:81;;6535:4;6527:6;6523:17;6513:27;;6469:81;6597:2;6589:6;6586:14;6566:18;6563:38;6560:84;;6616:18;;:::i;:::-;6560:84;6381:269;6330:320;;;:::o;6656:141::-;6705:4;6728:3;6720:11;;6751:3;6748:1;6741:14;6785:4;6782:1;6772:18;6764:26;;6656:141;;;:::o;6803:93::-;6840:6;6887:2;6882;6875:5;6871:14;6867:23;6857:33;;6803:93;;;:::o;6902:107::-;6946:8;6996:5;6990:4;6986:16;6965:37;;6902:107;;;;:::o;7015:393::-;7084:6;7134:1;7122:10;7118:18;7157:97;7187:66;7176:9;7157:97;:::i;:::-;7275:39;7305:8;7294:9;7275:39;:::i;:::-;7263:51;;7347:4;7343:9;7336:5;7332:21;7323:30;;7396:4;7386:8;7382:19;7375:5;7372:30;7362:40;;7091:317;;7015:393;;;;;:::o;7414:60::-;7442:3;7463:5;7456:12;;7414:60;;;:::o;7480:142::-;7530:9;7563:53;7581:34;7590:24;7608:5;7590:24;:::i;:::-;7581:34;:::i;:::-;7563:53;:::i;:::-;7550:66;;7480:142;;;:::o;7628:75::-;7671:3;7692:5;7685:12;;7628:75;;;:::o;7709:269::-;7819:39;7850:7;7819:39;:::i;:::-;7880:91;7929:41;7953:16;7929:41;:::i;:::-;7921:6;7914:4;7908:11;7880:91;:::i;:::-;7874:4;7867:105;7785:193;7709:269;;;:::o;7984:73::-;8029:3;8050:1;8043:8;;7984:73;:::o;8063:189::-;8140:32;;:::i;:::-;8181:65;8239:6;8231;8225:4;8181:65;:::i;:::-;8116:136;8063:189;;:::o;8258:186::-;8318:120;8335:3;8328:5;8325:14;8318:120;;;8389:39;8426:1;8419:5;8389:39;:::i;:::-;8362:1;8355:5;8351:13;8342:22;;8318:120;;;8258:186;;:::o;8450:543::-;8551:2;8546:3;8543:11;8540:446;;;8585:38;8617:5;8585:38;:::i;:::-;8669:29;8687:10;8669:29;:::i;:::-;8659:8;8655:44;8852:2;8840:10;8837:18;8834:49;;;8873:8;8858:23;;8834:49;8896:80;8952:22;8970:3;8952:22;:::i;:::-;8942:8;8938:37;8925:11;8896:80;:::i;:::-;8555:431;;8540:446;8450:543;;;:::o;8999:117::-;9053:8;9103:5;9097:4;9093:16;9072:37;;8999:117;;;;:::o;9122:169::-;9166:6;9199:51;9247:1;9243:6;9235:5;9232:1;9228:13;9199:51;:::i;:::-;9195:56;9280:4;9274;9270:15;9260:25;;9173:118;9122:169;;;;:::o;9296:295::-;9372:4;9518:29;9543:3;9537:4;9518:29;:::i;:::-;9510:37;;9580:3;9577:1;9573:11;9567:4;9564:21;9556:29;;9296:295;;;;:::o;9596:1403::-;9720:44;9760:3;9755;9720:44;:::i;:::-;9829:18;9821:6;9818:30;9815:56;;;9851:18;;:::i;:::-;9815:56;9895:38;9927:4;9921:11;9895:38;:::i;:::-;9980:67;10040:6;10032;10026:4;9980:67;:::i;:::-;10074:1;10103:2;10095:6;10092:14;10120:1;10115:632;;;;10791:1;10808:6;10805:84;;;10864:9;10859:3;10855:19;10842:33;10833:42;;10805:84;10915:67;10975:6;10968:5;10915:67;:::i;:::-;10909:4;10902:81;10764:229;10085:908;;10115:632;10167:4;10163:9;10155:6;10151:22;10201:37;10233:4;10201:37;:::i;:::-;10260:1;10274:215;10288:7;10285:1;10282:14;10274:215;;;10374:9;10369:3;10365:19;10352:33;10344:6;10337:49;10425:1;10417:6;10413:14;10403:24;;10472:2;10461:9;10457:18;10444:31;;10311:4;10308:1;10304:12;10299:17;;10274:215;;;10517:6;10508:7;10505:19;10502:186;;;10582:9;10577:3;10573:19;10560:33;10625:48;10667:4;10659:6;10655:17;10644:9;10625:48;:::i;:::-;10617:6;10610:64;10525:163;10502:186;10734:1;10730;10722:6;10718:14;10714:22;10708:4;10701:36;10122:625;;;10085:908;;9695:1304;;;9596:1403;;;:::o;11029:831::-;11114:3;11151:5;11145:12;11180:36;11206:9;11180:36;:::i;:::-;11232:71;11296:6;11291:3;11232:71;:::i;:::-;11225:78;;11334:1;11323:9;11319:17;11350:1;11345:164;;;;11523:1;11518:336;;;;11312:542;;11345:164;11429:4;11425:9;11414;11410:25;11405:3;11398:38;11489:6;11482:14;11475:22;11469:4;11465:33;11460:3;11456:43;11449:50;;11345:164;;11518:336;11585:38;11617:5;11585:38;:::i;:::-;11645:1;11659:154;11673:6;11670:1;11667:13;11659:154;;;11747:7;11741:14;11737:1;11732:3;11728:11;11721:35;11797:1;11788:7;11784:15;11773:26;;11695:4;11692:1;11688:12;11683:17;;11659:154;;;11842:1;11837:3;11833:11;11826:18;;11525:329;;11312:542;;11118:742;;11029:831;;;;:::o;11866:612::-;12049:4;12087:2;12076:9;12072:18;12064:26;;12136:9;12130:4;12126:20;12122:1;12111:9;12107:17;12100:47;12164:75;12234:4;12225:6;12164:75;:::i;:::-;12156:83;;12286:9;12280:4;12276:20;12271:2;12260:9;12256:18;12249:48;12314:75;12384:4;12375:6;12314:75;:::i;:::-;12306:83;;12399:72;12467:2;12456:9;12452:18;12443:6;12399:72;:::i;:::-;11866:612;;;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "1023400",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"addMilestoneAmount(uint256)": "infinite",
"attachVaultAndToken(address,address)": "infinite",
"charity()": "infinite",
"creator()": "infinite",
"dgt()": "2553",
"finalizeProject()": "infinite",
"finalized()": "2554",
"milestoneAmounts(uint256)": "infinite",
"milestoneCount()": "2486",
"projectDetails()": "infinite",
"projectName()": "infinite",
"storeProjectDetails(string)": "infinite",
"storeProjectName(string)": "infinite",
"storeTotalAmountNeeded(uint256)": "infinite",
"totalAmountNeeded()": "2492",
"vault()": "2596"
}
},
"methodIdentifiers": {
"addMilestoneAmount(uint256)": "21ecc609",
"attachVaultAndToken(address,address)": "ed026dbc",
"charity()": "934aa023",
"creator()": "02d05d3f",
"dgt()": "2af8afca",
"finalizeProject()": "7417882c",
"finalized()": "b3f05b97",
"milestoneAmounts(uint256)": "eeafe9da",
"milestoneCount()": "0681ca55",
"projectDetails()": "2accd144",
"projectName()": "9a33e300",
"storeProjectDetails(string)": "1decc1cf",
"storeProjectName(string)": "dfab10ed",
"storeTotalAmountNeeded(uint256)": "99cacc9e",
"totalAmountNeeded()": "344612c7",
"vault()": "fbfa77cf"
}
},
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_charity",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyAttached",
"type": "error"
},
{
"inputs": [],
"name": "Finalized",
"type": "error"
},
{
"inputs": [],
"name": "OnlyCreator",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "MilestoneAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
}
],
"name": "ProjectFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "details",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalAmountNeeded",
"type": "uint256"
}
],
"name": "ProjectInfoUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "dgt",
"type": "address"
}
],
"name": "VaultAttached",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "addMilestoneAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_vault",
"type": "address"
},
{
"internalType": "address",
"name": "_dgt",
"type": "address"
}
],
"name": "attachVaultAndToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "charity",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "creator",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dgt",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "finalizeProject",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "milestoneAmounts",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "milestoneCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectDetails",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectName",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_details",
"type": "string"
}
],
"name": "storeProjectDetails",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "storeProjectName",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "storeTotalAmountNeeded",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalAmountNeeded",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.30+commit.73712a01"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_charity",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyAttached",
"type": "error"
},
{
"inputs": [],
"name": "Finalized",
"type": "error"
},
{
"inputs": [],
"name": "OnlyCreator",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "MilestoneAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
}
],
"name": "ProjectFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "details",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalAmountNeeded",
"type": "uint256"
}
],
"name": "ProjectInfoUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "dgt",
"type": "address"
}
],
"name": "VaultAttached",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "addMilestoneAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_vault",
"type": "address"
},
{
"internalType": "address",
"name": "_dgt",
"type": "address"
}
],
"name": "attachVaultAndToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "charity",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "creator",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dgt",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "finalizeProject",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "milestoneAmounts",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "milestoneCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectDetails",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "projectName",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_details",
"type": "string"
}
],
"name": "storeProjectDetails",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "storeProjectName",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "storeTotalAmountNeeded",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalAmountNeeded",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"Contracts/ProjectDetails.sol": "CharityProjectStore"
},
"evmVersion": "prague",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"Contracts/ProjectDetails.sol": {
"keccak256": "0xf1b601154be9256414fd10d2023b09f43eb4d82c5ad99e9ad4d97dbd1340959e",
"license": "MIT",
"urls": [
"bzz-raw://4d6d0edb0ea20b64a64a8a5a6f8219433824d0cdbb3059a2a9820c0bfc39c0f4",
"dweb:/ipfs/QmQcuDPed8f4ic852ETB5m4FQjFK7megeNWVN4u5We84tL"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";
interface ICharityProjectStore {
function totalAmountNeeded() external view returns (uint256);
}
contract DGTVotesToken is ERC20, ERC20Permit, ERC20Votes {
address public immutable minter; // Vault
ICharityProjectStore public immutable store; // Cap source
modifier onlyMinter() {
require(msg.sender == minter, "Not authorized");
_;
}
constructor(address _minter, address _store)
ERC20("Donor Governance Token", "DGT")
ERC20Permit("Donor Governance Token")
{
require(_minter != address(0), "Minter is zero");
require(_store != address(0), "Store is zero");
minter = _minter;
store = ICharityProjectStore(_store);
}
function decimals() public pure override returns (uint8) { return 0; }
/// Mint (only Vault), cap via Store
function mint(address to, uint256 amount) external onlyMinter {
uint256 cap = store.totalAmountNeeded();
require(totalSupply() + amount <= cap, "Cap exceeded");
_mint(to, amount);
}
/// Burn (only Vault) – used on redeem
function burnFrom(address from, uint256 amount) external onlyMinter {
_burn(from, amount);
}
// OZ 5.x unified transfer/mint/burn hook
function _update(address from, address to, uint256 value)
internal
override(ERC20, ERC20Votes)
{
super._update(from, to, value);
}
// Because both ERC20Permit and Votes->Nonces are in the inheritance tree,
// specify BOTH here per OZ 5.x pattern.
function nonces(address owner)
public
view
override(Nonces, ERC20Permit)
returns (uint256)
{
return super.nonces(owner);
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/// Minimal-Interface deines DGT (OZ ERC20Votes-kompatibel)
interface IVotes {
function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);
function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);
}
/// Unser Governor mit Settern für Parameter
contract SimpleGovernorDirect {
enum ProposalState { Pending, Active, Succeeded, Defeated, Executed, Canceled }
struct Proposal {
address proposer;
address target;
uint256 value;
bytes data;
uint64 startBlock;
uint64 endBlock;
uint256 forVotes;
uint256 againstVotes;
uint256 quorum;
bool executed;
bool canceled;
}
IVotes public votesToken;
uint64 public votingDelay; // anpassbar
uint64 public votingPeriod; // anpassbar
uint256 public proposalThreshold; // anpassbar
uint256 public defaultQuorum; // anpassbar
address public owner; // Test/Dev -> später Governance gesteuert
uint256 public nextId;
mapping(uint256 => Proposal) public proposals;
mapping(uint256 => mapping(address => bool)) public hasVoted;
event ProposalCreated(
uint256 indexed id,
address indexed proposer,
address indexed target,
uint256 value,
bytes data,
uint64 startBlock,
uint64 endBlock,
uint256 quorum
);
event VoteCast(uint256 indexed id, address indexed voter, bool support, uint256 weight);
event ProposalExecuted(uint256 indexed id);
event ProposalCanceled(uint256 indexed id);
modifier onlyOwner() {
require(msg.sender == owner, "only owner");
_;
}
constructor(
address token_,
uint64 votingDelay_,
uint64 votingPeriod_,
uint256 proposalThreshold_,
uint256 quorumAbsolute_
) {
require(token_ != address(0), "token=0");
require(votingPeriod_ > 0, "period=0");
votesToken = IVotes(token_);
votingDelay = votingDelay_;
votingPeriod = votingPeriod_;
proposalThreshold = proposalThreshold_;
defaultQuorum = quorumAbsolute_;
owner = msg.sender;
}
// ========= Helpers =========
function state(uint256 id) public view returns (ProposalState) {
Proposal storage p = proposals[id];
if (p.canceled) return ProposalState.Canceled;
if (p.executed) return ProposalState.Executed;
if (p.startBlock == 0) return ProposalState.Pending;
if (block.number < p.startBlock) return ProposalState.Pending;
if (block.number <= p.endBlock) return ProposalState.Active;
bool meetsQuorum = (p.forVotes + p.againstVotes) >= p.quorum;
if (meetsQuorum && p.forVotes > p.againstVotes) return ProposalState.Succeeded;
return ProposalState.Defeated;
}
// ========= Propose / Vote / Execute =========
function propose(
address target,
uint256 value,
bytes calldata data,
uint256 quorumAbsolute
) external returns (uint256 id) {
require(target != address(0), "target=0");
uint256 weight = votesToken.getPastVotes(msg.sender, block.number - 1);
require(weight >= proposalThreshold, "below threshold");
id = ++nextId;
uint64 start = uint64(block.number + votingDelay);
uint64 end = uint64(start + votingPeriod);
proposals[id] = Proposal({
proposer: msg.sender,
target: target,
value: value,
data: data,
startBlock: start,
endBlock: end,
forVotes: 0,
againstVotes: 0,
quorum: (quorumAbsolute == 0 ? defaultQuorum : quorumAbsolute),
executed: false,
canceled: false
});
emit ProposalCreated(id, msg.sender, target, value, data, start, end, proposals[id].quorum);
}
function vote(uint256 id, bool support) external {
Proposal storage p = proposals[id];
require(state(id) == ProposalState.Active, "not active");
require(!hasVoted[id][msg.sender], "already voted");
uint256 weight = votesToken.getPastVotes(msg.sender, p.startBlock);
require(weight > 0, "no voting power");
hasVoted[id][msg.sender] = true;
if (support) p.forVotes += weight; else p.againstVotes += weight;
emit VoteCast(id, msg.sender, support, weight);
}
function execute(uint256 id) external payable {
Proposal storage p = proposals[id];
require(state(id) == ProposalState.Succeeded, "not succeeded");
p.executed = true;
(bool ok, bytes memory ret) = p.target.call{value: p.value}(p.data);
require(ok, _revertMsg(ret));
emit ProposalExecuted(id);
}
function cancel(uint256 id) external {
Proposal storage p = proposals[id];
require(msg.sender == p.proposer, "only proposer");
require(
state(id) == ProposalState.Pending || state(id) == ProposalState.Active,
"cant cancel"
);
p.canceled = true;
emit ProposalCanceled(id);
}
// ========= Setter =========
function setVotingDelay(uint64 newDelay) external onlyOwner {
votingDelay = newDelay;
}
function setVotingPeriod(uint64 newPeriod) external onlyOwner {
require(newPeriod > 0, "period=0");
votingPeriod = newPeriod;
}
function setProposalThreshold(uint256 newThreshold) external onlyOwner {
proposalThreshold = newThreshold;
}
function setDefaultQuorum(uint256 newQuorum) external onlyOwner {
defaultQuorum = newQuorum;
}
// ========= Utils =========
function _revertMsg(bytes memory ret) private pure returns (string memory) {
if (ret.length < 4) return "call failed";
assembly {
ret := add(ret, 0x04)
}
return abi.decode(ret, (string));
}
receive() external payable {}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract CharityProjectStore {
// errors
error OnlyCreator();
error Finalized();
error ZeroAddress();
error AlreadyAttached();
// Rollen / Status
address public immutable creator; // Deployer
address public immutable charity; // Auszahlungsempfänger
bool public finalized; // Wenn true: keine Änderungen mehr
// Projektdaten
string public projectName;
string public projectDetails;
uint256 public totalAmountNeeded; // ganze USDC (decimals = 0)
uint256[] public milestoneAmounts; // ganze USDC je Meilenstein
// Externe Komponenten (nach manuellem Deploy)
address public vault;
address public dgt;
// Events
event ProjectInfoUpdated(string name, string details, uint256 totalAmountNeeded);
event MilestoneAdded(uint256 amount);
event ProjectFinalized(address indexed by);
event VaultAttached(address indexed vault, address indexed dgt);
modifier onlyCreator() {
if (msg.sender != creator) revert OnlyCreator();
_;
}
modifier onlyBeforeFinalized() {
if (finalized) revert Finalized();
_;
}
constructor(address _charity) {
if (_charity == address(0)) revert ZeroAddress();
creator = msg.sender;
charity = _charity;
// keine Default-Daten mehr – alles wird manuell gesetzt
}
// ---- Manuelle Eingabe der Projektdaten (nur vor Finalize) ----
function storeProjectName(string calldata _name)
external onlyCreator onlyBeforeFinalized
{
projectName = _name;
emit ProjectInfoUpdated(projectName, projectDetails, totalAmountNeeded);
}
function storeProjectDetails(string calldata _details)
external onlyCreator onlyBeforeFinalized
{
projectDetails = _details;
emit ProjectInfoUpdated(projectName, projectDetails, totalAmountNeeded);
}
function storeTotalAmountNeeded(uint256 _amount)
external onlyCreator onlyBeforeFinalized
{
totalAmountNeeded = _amount;
emit ProjectInfoUpdated(projectName, projectDetails, totalAmountNeeded);
}
function addMilestoneAmount(uint256 _amount)
external onlyCreator onlyBeforeFinalized
{
milestoneAmounts.push(_amount);
emit MilestoneAdded(_amount);
}
// ---- Finalisieren & Attach wie gehabt ----
function finalizeProject() external onlyCreator onlyBeforeFinalized {
finalized = true;
emit ProjectFinalized(msg.sender);
}
function attachVaultAndToken(address _vault, address _dgt) external onlyCreator {
if (_vault == address(0) || _dgt == address(0)) revert ZeroAddress();
if (vault != address(0) || dgt != address(0)) revert AlreadyAttached();
vault = _vault;
dgt = _dgt;
emit VaultAttached(_vault, _dgt);
}
function milestoneCount() external view returns (uint256) {
return milestoneAmounts.length;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { DGTVotesToken } from "./DGTVotesToken.sol";
// Minimal USDC-like interface (6 decimals; bool-returning)
interface IERC20Like {
function transferFrom(address from, address to, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function balanceOf(address who) external view returns (uint256);
}
// Store view interface (what the vault reads)
interface IStoreView {
function charity() external view returns (address);
function finalized() external view returns (bool);
function totalAmountNeeded() external view returns (uint256);
function milestoneAmounts(uint256) external view returns (uint256);
function milestoneCount() external view returns (uint256);
}
contract Vault {
IERC20Like public immutable usdc; // USDC (6 decimals)
IStoreView public immutable store; // deployed Store
DGTVotesToken public immutable dgtToken; // auto-deployed DGT
address public governance; // EOA first, later Timelock
uint256 private constant USDC_UNIT = 1e6;
mapping(uint256 => bool) public released;
event Deposited(address indexed user, uint256 wholeUSDC, uint256 rawTransferred, uint256 dgtMinted);
event Redeemed (address indexed user, uint256 wholeDGT, uint256 rawReturned);
event MilestoneReleased(uint256 indexed index, uint256 wholeUSDC, address charity);
event GovernanceChanged(address indexed oldGov, address indexed newGov);
error OnlyGovernance();
error AmountZero();
error Insufficient();
error AlreadyReleased();
modifier onlyGovernance() {
if (msg.sender != governance) revert OnlyGovernance();
_;
}
constructor(address usdcAddress, address storeAddress, address governanceAddress) {
require(usdcAddress != address(0), "usdc=0");
require(storeAddress != address(0), "store=0");
require(governanceAddress != address(0), "gov=0");
usdc = IERC20Like(usdcAddress);
store = IStoreView(storeAddress);
governance = governanceAddress;
// Deploy DGT with this vault as minter; cap read from store
dgtToken = new DGTVotesToken(address(this), storeAddress);
}
function setGovernance(address newGov) external onlyGovernance {
require(newGov != address(0), "gov=0");
emit GovernanceChanged(governance, newGov);
governance = newGov;
}
// ---- Donations (USDC -> DGT) ----
function depositUSDC(uint256 wholeUSDC) external {
if (wholeUSDC == 0) revert AmountZero();
uint256 cap = store.totalAmountNeeded();
uint256 mintedSoFar = dgtToken.totalSupply();
require(mintedSoFar + wholeUSDC <= cap, "cap");
uint256 raw = wholeUSDC * USDC_UNIT;
bool ok = usdc.transferFrom(msg.sender, address(this), raw);
require(ok, "usdc xferFrom");
dgtToken.mint(msg.sender, wholeUSDC);
emit Deposited(msg.sender, wholeUSDC, raw, wholeUSDC);
}
// ---- Redeem (DGT -> USDC) ----
function redeemDGT(uint256 wholeDGT) external {
if (wholeDGT == 0) revert AmountZero();
uint256 raw = wholeDGT * USDC_UNIT;
if (usdc.balanceOf(address(this)) < raw) revert Insufficient();
dgtToken.burnFrom(msg.sender, wholeDGT);
bool ok = usdc.transfer(msg.sender, raw);
require(ok, "usdc xfer");
emit Redeemed(msg.sender, wholeDGT, raw);
}
// ---- Milestone payout (governance only) ----
function releaseMilestone(uint256 index) external onlyGovernance {
require(store.finalized(), "not final");
uint256 count = store.milestoneCount();
require(index < count, "bad idx");
if (released[index]) revert AlreadyReleased();
uint256 whole = store.milestoneAmounts(index);
require(whole > 0, "zero ms");
uint256 raw = whole * USDC_UNIT;
if (usdc.balanceOf(address(this)) < raw) revert Insufficient();
address payee = store.charity();
require(payee != address(0), "charity=0");
bool ok = usdc.transfer(payee, raw);
require(ok, "usdc xfer");
released[index] = true;
emit MilestoneReleased(index, whole, payee);
}
// Helper: public getter already exists for dgtToken(); but include explicit if you prefer
function dgtTokenAddress() external view returns (address) {
return address(dgtToken);
}
// Views
function previewDepositUSDC(uint256 wholeUSDC) external pure returns (uint256) { return wholeUSDC; }
function previewRedeem(uint256 wholeDGT) external pure returns (uint256) { return wholeDGT * USDC_UNIT; }
function remainingCapacity() external view returns (uint256) {
uint256 cap = store.totalAmountNeeded();
uint256 minted = dgtToken.totalSupply();
return minted >= cap ? 0 : (cap - minted);
}
}
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

This file has been truncated, but you can view the full file.
{
"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": {
"@_1455": {
"entryPoint": null,
"id": 1455,
"parameterSlots": 1,
"returnSlots": 0
},
"@_4092": {
"entryPoint": null,
"id": 4092,
"parameterSlots": 2,
"returnSlots": 0
},
"@_865": {
"entryPoint": null,
"id": 865,
"parameterSlots": 2,
"returnSlots": 0
},
"@_9777": {
"entryPoint": null,
"id": 9777,
"parameterSlots": 2,
"returnSlots": 0
},
"@_buildDomainSeparator_4139": {
"entryPoint": 882,
"id": 4139,
"parameterSlots": 0,
"returnSlots": 1
},
"@getStringSlot_2222": {
"entryPoint": 1073,
"id": 2222,
"parameterSlots": 1,
"returnSlots": 1
},
"@toShortStringWithFallback_2062": {
"entryPoint": 805,
"id": 2062,
"parameterSlots": 2,
"returnSlots": 1
},
"@toShortString_1964": {
"entryPoint": 972,
"id": 1964,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_decode_t_address_fromMemory": {
"entryPoint": 1156,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_address_fromMemory": {
"entryPoint": 1176,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_encode_t_address_to_t_address_fromStack": {
"entryPoint": 2281,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_bytes32_to_t_bytes32_fromStack": {
"entryPoint": 2251,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 2407,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21_to_t_string_memory_ptr_fromStack": {
"entryPoint": 2074,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0_to_t_string_memory_ptr_fromStack": {
"entryPoint": 2178,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 2266,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed": {
"entryPoint": 2296,
"id": null,
"parameterSlots": 6,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 2463,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 2108,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 2212,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_dataslot_t_bytes_memory_ptr": {
"entryPoint": 2505,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_dataslot_t_string_storage": {
"entryPoint": 1386,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_bytes_memory_ptr": {
"entryPoint": 2495,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 1238,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 2018,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"clean_up_bytearray_end_slots_t_string_storage": {
"entryPoint": 1674,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"cleanup_t_address": {
"entryPoint": 1117,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_bytes32": {
"entryPoint": 2242,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 1086,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 1512,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"clear_storage_range_t_bytes1": {
"entryPoint": 1640,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32": {
"entryPoint": 2540,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"convert_t_uint256_to_t_uint256": {
"entryPoint": 1530,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": {
"entryPoint": 1811,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"copy_memory_to_memory_with_cleanup": {
"entryPoint": 2377,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"divide_by_32_ceil": {
"entryPoint": 1404,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_byte_array_length": {
"entryPoint": 1338,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"extract_used_part_and_set_length_of_short_byte_array": {
"entryPoint": 1784,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"identity": {
"entryPoint": 1521,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"mask_bytes_dynamic": {
"entryPoint": 1756,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"panic_error_0x22": {
"entryPoint": 1293,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 1248,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"prepare_store_t_uint256": {
"entryPoint": 1563,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"read_from_memoryt_bytes32": {
"entryPoint": 2520,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 1082,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 2391,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"shift_left_dynamic": {
"entryPoint": 1419,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"shift_right_unsigned_dynamic": {
"entryPoint": 1744,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"storage_set_to_zero_t_uint256": {
"entryPoint": 1616,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"store_literal_in_memory_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21": {
"entryPoint": 2034,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0": {
"entryPoint": 2138,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"update_byte_slice_dynamic32": {
"entryPoint": 1431,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"update_storage_value_t_uint256_to_t_uint256": {
"entryPoint": 1572,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 1134,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"zero_value_for_split_t_uint256": {
"entryPoint": 1609,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nativeSrc": "0:11756:27",
"nodeType": "YulBlock",
"src": "0:11756:27",
"statements": [
{
"body": {
"nativeSrc": "47:35:27",
"nodeType": "YulBlock",
"src": "47:35:27",
"statements": [
{
"nativeSrc": "57:19:27",
"nodeType": "YulAssignment",
"src": "57:19:27",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "73:2:27",
"nodeType": "YulLiteral",
"src": "73:2:27",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "67:5:27",
"nodeType": "YulIdentifier",
"src": "67:5:27"
},
"nativeSrc": "67:9:27",
"nodeType": "YulFunctionCall",
"src": "67:9:27"
},
"variableNames": [
{
"name": "memPtr",
"nativeSrc": "57:6:27",
"nodeType": "YulIdentifier",
"src": "57:6:27"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "7:75:27",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nativeSrc": "40:6:27",
"nodeType": "YulTypedName",
"src": "40:6:27",
"type": ""
}
],
"src": "7:75:27"
},
{
"body": {
"nativeSrc": "177:28:27",
"nodeType": "YulBlock",
"src": "177:28:27",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "194:1:27",
"nodeType": "YulLiteral",
"src": "194:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "197:1:27",
"nodeType": "YulLiteral",
"src": "197:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "187:6:27",
"nodeType": "YulIdentifier",
"src": "187:6:27"
},
"nativeSrc": "187:12:27",
"nodeType": "YulFunctionCall",
"src": "187:12:27"
},
"nativeSrc": "187:12:27",
"nodeType": "YulExpressionStatement",
"src": "187:12:27"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "88:117:27",
"nodeType": "YulFunctionDefinition",
"src": "88:117:27"
},
{
"body": {
"nativeSrc": "300:28:27",
"nodeType": "YulBlock",
"src": "300:28:27",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "317:1:27",
"nodeType": "YulLiteral",
"src": "317:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "320:1:27",
"nodeType": "YulLiteral",
"src": "320:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "310:6:27",
"nodeType": "YulIdentifier",
"src": "310:6:27"
},
"nativeSrc": "310:12:27",
"nodeType": "YulFunctionCall",
"src": "310:12:27"
},
"nativeSrc": "310:12:27",
"nodeType": "YulExpressionStatement",
"src": "310:12:27"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "211:117:27",
"nodeType": "YulFunctionDefinition",
"src": "211:117:27"
},
{
"body": {
"nativeSrc": "379:81:27",
"nodeType": "YulBlock",
"src": "379:81:27",
"statements": [
{
"nativeSrc": "389:65:27",
"nodeType": "YulAssignment",
"src": "389:65:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "404:5:27",
"nodeType": "YulIdentifier",
"src": "404:5:27"
},
{
"kind": "number",
"nativeSrc": "411:42:27",
"nodeType": "YulLiteral",
"src": "411:42:27",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nativeSrc": "400:3:27",
"nodeType": "YulIdentifier",
"src": "400:3:27"
},
"nativeSrc": "400:54:27",
"nodeType": "YulFunctionCall",
"src": "400:54:27"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "389:7:27",
"nodeType": "YulIdentifier",
"src": "389:7:27"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nativeSrc": "334:126:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "361:5:27",
"nodeType": "YulTypedName",
"src": "361:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "371:7:27",
"nodeType": "YulTypedName",
"src": "371:7:27",
"type": ""
}
],
"src": "334:126:27"
},
{
"body": {
"nativeSrc": "511:51:27",
"nodeType": "YulBlock",
"src": "511:51:27",
"statements": [
{
"nativeSrc": "521:35:27",
"nodeType": "YulAssignment",
"src": "521:35:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "550:5:27",
"nodeType": "YulIdentifier",
"src": "550:5:27"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nativeSrc": "532:17:27",
"nodeType": "YulIdentifier",
"src": "532:17:27"
},
"nativeSrc": "532:24:27",
"nodeType": "YulFunctionCall",
"src": "532:24:27"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "521:7:27",
"nodeType": "YulIdentifier",
"src": "521:7:27"
}
]
}
]
},
"name": "cleanup_t_address",
"nativeSrc": "466:96:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "493:5:27",
"nodeType": "YulTypedName",
"src": "493:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "503:7:27",
"nodeType": "YulTypedName",
"src": "503:7:27",
"type": ""
}
],
"src": "466:96:27"
},
{
"body": {
"nativeSrc": "611:79:27",
"nodeType": "YulBlock",
"src": "611:79:27",
"statements": [
{
"body": {
"nativeSrc": "668:16:27",
"nodeType": "YulBlock",
"src": "668:16:27",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "677:1:27",
"nodeType": "YulLiteral",
"src": "677:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "680:1:27",
"nodeType": "YulLiteral",
"src": "680:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "670:6:27",
"nodeType": "YulIdentifier",
"src": "670:6:27"
},
"nativeSrc": "670:12:27",
"nodeType": "YulFunctionCall",
"src": "670:12:27"
},
"nativeSrc": "670:12:27",
"nodeType": "YulExpressionStatement",
"src": "670:12:27"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "634:5:27",
"nodeType": "YulIdentifier",
"src": "634:5:27"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "659:5:27",
"nodeType": "YulIdentifier",
"src": "659:5:27"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "641:17:27",
"nodeType": "YulIdentifier",
"src": "641:17:27"
},
"nativeSrc": "641:24:27",
"nodeType": "YulFunctionCall",
"src": "641:24:27"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "631:2:27",
"nodeType": "YulIdentifier",
"src": "631:2:27"
},
"nativeSrc": "631:35:27",
"nodeType": "YulFunctionCall",
"src": "631:35:27"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "624:6:27",
"nodeType": "YulIdentifier",
"src": "624:6:27"
},
"nativeSrc": "624:43:27",
"nodeType": "YulFunctionCall",
"src": "624:43:27"
},
"nativeSrc": "621:63:27",
"nodeType": "YulIf",
"src": "621:63:27"
}
]
},
"name": "validator_revert_t_address",
"nativeSrc": "568:122:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "604:5:27",
"nodeType": "YulTypedName",
"src": "604:5:27",
"type": ""
}
],
"src": "568:122:27"
},
{
"body": {
"nativeSrc": "759:80:27",
"nodeType": "YulBlock",
"src": "759:80:27",
"statements": [
{
"nativeSrc": "769:22:27",
"nodeType": "YulAssignment",
"src": "769:22:27",
"value": {
"arguments": [
{
"name": "offset",
"nativeSrc": "784:6:27",
"nodeType": "YulIdentifier",
"src": "784:6:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "778:5:27",
"nodeType": "YulIdentifier",
"src": "778:5:27"
},
"nativeSrc": "778:13:27",
"nodeType": "YulFunctionCall",
"src": "778:13:27"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "769:5:27",
"nodeType": "YulIdentifier",
"src": "769:5:27"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nativeSrc": "827:5:27",
"nodeType": "YulIdentifier",
"src": "827:5:27"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nativeSrc": "800:26:27",
"nodeType": "YulIdentifier",
"src": "800:26:27"
},
"nativeSrc": "800:33:27",
"nodeType": "YulFunctionCall",
"src": "800:33:27"
},
"nativeSrc": "800:33:27",
"nodeType": "YulExpressionStatement",
"src": "800:33:27"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "696:143:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nativeSrc": "737:6:27",
"nodeType": "YulTypedName",
"src": "737:6:27",
"type": ""
},
{
"name": "end",
"nativeSrc": "745:3:27",
"nodeType": "YulTypedName",
"src": "745:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "753:5:27",
"nodeType": "YulTypedName",
"src": "753:5:27",
"type": ""
}
],
"src": "696:143:27"
},
{
"body": {
"nativeSrc": "939:413:27",
"nodeType": "YulBlock",
"src": "939:413:27",
"statements": [
{
"body": {
"nativeSrc": "985:83:27",
"nodeType": "YulBlock",
"src": "985:83:27",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "987:77:27",
"nodeType": "YulIdentifier",
"src": "987:77:27"
},
"nativeSrc": "987:79:27",
"nodeType": "YulFunctionCall",
"src": "987:79:27"
},
"nativeSrc": "987:79:27",
"nodeType": "YulExpressionStatement",
"src": "987:79:27"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nativeSrc": "960:7:27",
"nodeType": "YulIdentifier",
"src": "960:7:27"
},
{
"name": "headStart",
"nativeSrc": "969:9:27",
"nodeType": "YulIdentifier",
"src": "969:9:27"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "956:3:27",
"nodeType": "YulIdentifier",
"src": "956:3:27"
},
"nativeSrc": "956:23:27",
"nodeType": "YulFunctionCall",
"src": "956:23:27"
},
{
"kind": "number",
"nativeSrc": "981:2:27",
"nodeType": "YulLiteral",
"src": "981:2:27",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nativeSrc": "952:3:27",
"nodeType": "YulIdentifier",
"src": "952:3:27"
},
"nativeSrc": "952:32:27",
"nodeType": "YulFunctionCall",
"src": "952:32:27"
},
"nativeSrc": "949:119:27",
"nodeType": "YulIf",
"src": "949:119:27"
},
{
"nativeSrc": "1078:128:27",
"nodeType": "YulBlock",
"src": "1078:128:27",
"statements": [
{
"nativeSrc": "1093:15:27",
"nodeType": "YulVariableDeclaration",
"src": "1093:15:27",
"value": {
"kind": "number",
"nativeSrc": "1107:1:27",
"nodeType": "YulLiteral",
"src": "1107:1:27",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nativeSrc": "1097:6:27",
"nodeType": "YulTypedName",
"src": "1097:6:27",
"type": ""
}
]
},
{
"nativeSrc": "1122:74:27",
"nodeType": "YulAssignment",
"src": "1122:74:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1168:9:27",
"nodeType": "YulIdentifier",
"src": "1168:9:27"
},
{
"name": "offset",
"nativeSrc": "1179:6:27",
"nodeType": "YulIdentifier",
"src": "1179:6:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1164:3:27",
"nodeType": "YulIdentifier",
"src": "1164:3:27"
},
"nativeSrc": "1164:22:27",
"nodeType": "YulFunctionCall",
"src": "1164:22:27"
},
{
"name": "dataEnd",
"nativeSrc": "1188:7:27",
"nodeType": "YulIdentifier",
"src": "1188:7:27"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "1132:31:27",
"nodeType": "YulIdentifier",
"src": "1132:31:27"
},
"nativeSrc": "1132:64:27",
"nodeType": "YulFunctionCall",
"src": "1132:64:27"
},
"variableNames": [
{
"name": "value0",
"nativeSrc": "1122:6:27",
"nodeType": "YulIdentifier",
"src": "1122:6:27"
}
]
}
]
},
{
"nativeSrc": "1216:129:27",
"nodeType": "YulBlock",
"src": "1216:129:27",
"statements": [
{
"nativeSrc": "1231:16:27",
"nodeType": "YulVariableDeclaration",
"src": "1231:16:27",
"value": {
"kind": "number",
"nativeSrc": "1245:2:27",
"nodeType": "YulLiteral",
"src": "1245:2:27",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nativeSrc": "1235:6:27",
"nodeType": "YulTypedName",
"src": "1235:6:27",
"type": ""
}
]
},
{
"nativeSrc": "1261:74:27",
"nodeType": "YulAssignment",
"src": "1261:74:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "1307:9:27",
"nodeType": "YulIdentifier",
"src": "1307:9:27"
},
{
"name": "offset",
"nativeSrc": "1318:6:27",
"nodeType": "YulIdentifier",
"src": "1318:6:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "1303:3:27",
"nodeType": "YulIdentifier",
"src": "1303:3:27"
},
"nativeSrc": "1303:22:27",
"nodeType": "YulFunctionCall",
"src": "1303:22:27"
},
{
"name": "dataEnd",
"nativeSrc": "1327:7:27",
"nodeType": "YulIdentifier",
"src": "1327:7:27"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nativeSrc": "1271:31:27",
"nodeType": "YulIdentifier",
"src": "1271:31:27"
},
"nativeSrc": "1271:64:27",
"nodeType": "YulFunctionCall",
"src": "1271:64:27"
},
"variableNames": [
{
"name": "value1",
"nativeSrc": "1261:6:27",
"nodeType": "YulIdentifier",
"src": "1261:6:27"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_address_fromMemory",
"nativeSrc": "845:507:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "901:9:27",
"nodeType": "YulTypedName",
"src": "901:9:27",
"type": ""
},
{
"name": "dataEnd",
"nativeSrc": "912:7:27",
"nodeType": "YulTypedName",
"src": "912:7:27",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nativeSrc": "924:6:27",
"nodeType": "YulTypedName",
"src": "924:6:27",
"type": ""
},
{
"name": "value1",
"nativeSrc": "932:6:27",
"nodeType": "YulTypedName",
"src": "932:6:27",
"type": ""
}
],
"src": "845:507:27"
},
{
"body": {
"nativeSrc": "1417:40:27",
"nodeType": "YulBlock",
"src": "1417:40:27",
"statements": [
{
"nativeSrc": "1428:22:27",
"nodeType": "YulAssignment",
"src": "1428:22:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "1444:5:27",
"nodeType": "YulIdentifier",
"src": "1444:5:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "1438:5:27",
"nodeType": "YulIdentifier",
"src": "1438:5:27"
},
"nativeSrc": "1438:12:27",
"nodeType": "YulFunctionCall",
"src": "1438:12:27"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "1428:6:27",
"nodeType": "YulIdentifier",
"src": "1428:6:27"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "1358:99:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "1400:5:27",
"nodeType": "YulTypedName",
"src": "1400:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "1410:6:27",
"nodeType": "YulTypedName",
"src": "1410:6:27",
"type": ""
}
],
"src": "1358:99:27"
},
{
"body": {
"nativeSrc": "1491:152:27",
"nodeType": "YulBlock",
"src": "1491:152:27",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1508:1:27",
"nodeType": "YulLiteral",
"src": "1508:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1511:77:27",
"nodeType": "YulLiteral",
"src": "1511:77:27",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1501:6:27",
"nodeType": "YulIdentifier",
"src": "1501:6:27"
},
"nativeSrc": "1501:88:27",
"nodeType": "YulFunctionCall",
"src": "1501:88:27"
},
"nativeSrc": "1501:88:27",
"nodeType": "YulExpressionStatement",
"src": "1501:88:27"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1605:1:27",
"nodeType": "YulLiteral",
"src": "1605:1:27",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "1608:4:27",
"nodeType": "YulLiteral",
"src": "1608:4:27",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1598:6:27",
"nodeType": "YulIdentifier",
"src": "1598:6:27"
},
"nativeSrc": "1598:15:27",
"nodeType": "YulFunctionCall",
"src": "1598:15:27"
},
"nativeSrc": "1598:15:27",
"nodeType": "YulExpressionStatement",
"src": "1598:15:27"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1629:1:27",
"nodeType": "YulLiteral",
"src": "1629:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1632:4:27",
"nodeType": "YulLiteral",
"src": "1632:4:27",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1622:6:27",
"nodeType": "YulIdentifier",
"src": "1622:6:27"
},
"nativeSrc": "1622:15:27",
"nodeType": "YulFunctionCall",
"src": "1622:15:27"
},
"nativeSrc": "1622:15:27",
"nodeType": "YulExpressionStatement",
"src": "1622:15:27"
}
]
},
"name": "panic_error_0x41",
"nativeSrc": "1463:180:27",
"nodeType": "YulFunctionDefinition",
"src": "1463:180:27"
},
{
"body": {
"nativeSrc": "1677:152:27",
"nodeType": "YulBlock",
"src": "1677:152:27",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1694:1:27",
"nodeType": "YulLiteral",
"src": "1694:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1697:77:27",
"nodeType": "YulLiteral",
"src": "1697:77:27",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1687:6:27",
"nodeType": "YulIdentifier",
"src": "1687:6:27"
},
"nativeSrc": "1687:88:27",
"nodeType": "YulFunctionCall",
"src": "1687:88:27"
},
"nativeSrc": "1687:88:27",
"nodeType": "YulExpressionStatement",
"src": "1687:88:27"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1791:1:27",
"nodeType": "YulLiteral",
"src": "1791:1:27",
"type": "",
"value": "4"
},
{
"kind": "number",
"nativeSrc": "1794:4:27",
"nodeType": "YulLiteral",
"src": "1794:4:27",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "1784:6:27",
"nodeType": "YulIdentifier",
"src": "1784:6:27"
},
"nativeSrc": "1784:15:27",
"nodeType": "YulFunctionCall",
"src": "1784:15:27"
},
"nativeSrc": "1784:15:27",
"nodeType": "YulExpressionStatement",
"src": "1784:15:27"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "1815:1:27",
"nodeType": "YulLiteral",
"src": "1815:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1818:4:27",
"nodeType": "YulLiteral",
"src": "1818:4:27",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nativeSrc": "1808:6:27",
"nodeType": "YulIdentifier",
"src": "1808:6:27"
},
"nativeSrc": "1808:15:27",
"nodeType": "YulFunctionCall",
"src": "1808:15:27"
},
"nativeSrc": "1808:15:27",
"nodeType": "YulExpressionStatement",
"src": "1808:15:27"
}
]
},
"name": "panic_error_0x22",
"nativeSrc": "1649:180:27",
"nodeType": "YulFunctionDefinition",
"src": "1649:180:27"
},
{
"body": {
"nativeSrc": "1886:269:27",
"nodeType": "YulBlock",
"src": "1886:269:27",
"statements": [
{
"nativeSrc": "1896:22:27",
"nodeType": "YulAssignment",
"src": "1896:22:27",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "1910:4:27",
"nodeType": "YulIdentifier",
"src": "1910:4:27"
},
{
"kind": "number",
"nativeSrc": "1916:1:27",
"nodeType": "YulLiteral",
"src": "1916:1:27",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nativeSrc": "1906:3:27",
"nodeType": "YulIdentifier",
"src": "1906:3:27"
},
"nativeSrc": "1906:12:27",
"nodeType": "YulFunctionCall",
"src": "1906:12:27"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "1896:6:27",
"nodeType": "YulIdentifier",
"src": "1896:6:27"
}
]
},
{
"nativeSrc": "1927:38:27",
"nodeType": "YulVariableDeclaration",
"src": "1927:38:27",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "1957:4:27",
"nodeType": "YulIdentifier",
"src": "1957:4:27"
},
{
"kind": "number",
"nativeSrc": "1963:1:27",
"nodeType": "YulLiteral",
"src": "1963:1:27",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nativeSrc": "1953:3:27",
"nodeType": "YulIdentifier",
"src": "1953:3:27"
},
"nativeSrc": "1953:12:27",
"nodeType": "YulFunctionCall",
"src": "1953:12:27"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "1931:18:27",
"nodeType": "YulTypedName",
"src": "1931:18:27",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "2004:51:27",
"nodeType": "YulBlock",
"src": "2004:51:27",
"statements": [
{
"nativeSrc": "2018:27:27",
"nodeType": "YulAssignment",
"src": "2018:27:27",
"value": {
"arguments": [
{
"name": "length",
"nativeSrc": "2032:6:27",
"nodeType": "YulIdentifier",
"src": "2032:6:27"
},
{
"kind": "number",
"nativeSrc": "2040:4:27",
"nodeType": "YulLiteral",
"src": "2040:4:27",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "2028:3:27",
"nodeType": "YulIdentifier",
"src": "2028:3:27"
},
"nativeSrc": "2028:17:27",
"nodeType": "YulFunctionCall",
"src": "2028:17:27"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "2018:6:27",
"nodeType": "YulIdentifier",
"src": "2018:6:27"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "1984:18:27",
"nodeType": "YulIdentifier",
"src": "1984:18:27"
}
],
"functionName": {
"name": "iszero",
"nativeSrc": "1977:6:27",
"nodeType": "YulIdentifier",
"src": "1977:6:27"
},
"nativeSrc": "1977:26:27",
"nodeType": "YulFunctionCall",
"src": "1977:26:27"
},
"nativeSrc": "1974:81:27",
"nodeType": "YulIf",
"src": "1974:81:27"
},
{
"body": {
"nativeSrc": "2107:42:27",
"nodeType": "YulBlock",
"src": "2107:42:27",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nativeSrc": "2121:16:27",
"nodeType": "YulIdentifier",
"src": "2121:16:27"
},
"nativeSrc": "2121:18:27",
"nodeType": "YulFunctionCall",
"src": "2121:18:27"
},
"nativeSrc": "2121:18:27",
"nodeType": "YulExpressionStatement",
"src": "2121:18:27"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nativeSrc": "2071:18:27",
"nodeType": "YulIdentifier",
"src": "2071:18:27"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "2094:6:27",
"nodeType": "YulIdentifier",
"src": "2094:6:27"
},
{
"kind": "number",
"nativeSrc": "2102:2:27",
"nodeType": "YulLiteral",
"src": "2102:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "2091:2:27",
"nodeType": "YulIdentifier",
"src": "2091:2:27"
},
"nativeSrc": "2091:14:27",
"nodeType": "YulFunctionCall",
"src": "2091:14:27"
}
],
"functionName": {
"name": "eq",
"nativeSrc": "2068:2:27",
"nodeType": "YulIdentifier",
"src": "2068:2:27"
},
"nativeSrc": "2068:38:27",
"nodeType": "YulFunctionCall",
"src": "2068:38:27"
},
"nativeSrc": "2065:84:27",
"nodeType": "YulIf",
"src": "2065:84:27"
}
]
},
"name": "extract_byte_array_length",
"nativeSrc": "1835:320:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "1870:4:27",
"nodeType": "YulTypedName",
"src": "1870:4:27",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "1879:6:27",
"nodeType": "YulTypedName",
"src": "1879:6:27",
"type": ""
}
],
"src": "1835:320:27"
},
{
"body": {
"nativeSrc": "2215:87:27",
"nodeType": "YulBlock",
"src": "2215:87:27",
"statements": [
{
"nativeSrc": "2225:11:27",
"nodeType": "YulAssignment",
"src": "2225:11:27",
"value": {
"name": "ptr",
"nativeSrc": "2233:3:27",
"nodeType": "YulIdentifier",
"src": "2233:3:27"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "2225:4:27",
"nodeType": "YulIdentifier",
"src": "2225:4:27"
}
]
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2253:1:27",
"nodeType": "YulLiteral",
"src": "2253:1:27",
"type": "",
"value": "0"
},
{
"name": "ptr",
"nativeSrc": "2256:3:27",
"nodeType": "YulIdentifier",
"src": "2256:3:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "2246:6:27",
"nodeType": "YulIdentifier",
"src": "2246:6:27"
},
"nativeSrc": "2246:14:27",
"nodeType": "YulFunctionCall",
"src": "2246:14:27"
},
"nativeSrc": "2246:14:27",
"nodeType": "YulExpressionStatement",
"src": "2246:14:27"
},
{
"nativeSrc": "2269:26:27",
"nodeType": "YulAssignment",
"src": "2269:26:27",
"value": {
"arguments": [
{
"kind": "number",
"nativeSrc": "2287:1:27",
"nodeType": "YulLiteral",
"src": "2287:1:27",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "2290:4:27",
"nodeType": "YulLiteral",
"src": "2290:4:27",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "keccak256",
"nativeSrc": "2277:9:27",
"nodeType": "YulIdentifier",
"src": "2277:9:27"
},
"nativeSrc": "2277:18:27",
"nodeType": "YulFunctionCall",
"src": "2277:18:27"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "2269:4:27",
"nodeType": "YulIdentifier",
"src": "2269:4:27"
}
]
}
]
},
"name": "array_dataslot_t_string_storage",
"nativeSrc": "2161:141:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nativeSrc": "2202:3:27",
"nodeType": "YulTypedName",
"src": "2202:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "data",
"nativeSrc": "2210:4:27",
"nodeType": "YulTypedName",
"src": "2210:4:27",
"type": ""
}
],
"src": "2161:141:27"
},
{
"body": {
"nativeSrc": "2352:49:27",
"nodeType": "YulBlock",
"src": "2352:49:27",
"statements": [
{
"nativeSrc": "2362:33:27",
"nodeType": "YulAssignment",
"src": "2362:33:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "2380:5:27",
"nodeType": "YulIdentifier",
"src": "2380:5:27"
},
{
"kind": "number",
"nativeSrc": "2387:2:27",
"nodeType": "YulLiteral",
"src": "2387:2:27",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "2376:3:27",
"nodeType": "YulIdentifier",
"src": "2376:3:27"
},
"nativeSrc": "2376:14:27",
"nodeType": "YulFunctionCall",
"src": "2376:14:27"
},
{
"kind": "number",
"nativeSrc": "2392:2:27",
"nodeType": "YulLiteral",
"src": "2392:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "div",
"nativeSrc": "2372:3:27",
"nodeType": "YulIdentifier",
"src": "2372:3:27"
},
"nativeSrc": "2372:23:27",
"nodeType": "YulFunctionCall",
"src": "2372:23:27"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "2362:6:27",
"nodeType": "YulIdentifier",
"src": "2362:6:27"
}
]
}
]
},
"name": "divide_by_32_ceil",
"nativeSrc": "2308:93:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2335:5:27",
"nodeType": "YulTypedName",
"src": "2335:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "2345:6:27",
"nodeType": "YulTypedName",
"src": "2345:6:27",
"type": ""
}
],
"src": "2308:93:27"
},
{
"body": {
"nativeSrc": "2460:54:27",
"nodeType": "YulBlock",
"src": "2460:54:27",
"statements": [
{
"nativeSrc": "2470:37:27",
"nodeType": "YulAssignment",
"src": "2470:37:27",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "2495:4:27",
"nodeType": "YulIdentifier",
"src": "2495:4:27"
},
{
"name": "value",
"nativeSrc": "2501:5:27",
"nodeType": "YulIdentifier",
"src": "2501:5:27"
}
],
"functionName": {
"name": "shl",
"nativeSrc": "2491:3:27",
"nodeType": "YulIdentifier",
"src": "2491:3:27"
},
"nativeSrc": "2491:16:27",
"nodeType": "YulFunctionCall",
"src": "2491:16:27"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "2470:8:27",
"nodeType": "YulIdentifier",
"src": "2470:8:27"
}
]
}
]
},
"name": "shift_left_dynamic",
"nativeSrc": "2407:107:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "2435:4:27",
"nodeType": "YulTypedName",
"src": "2435:4:27",
"type": ""
},
{
"name": "value",
"nativeSrc": "2441:5:27",
"nodeType": "YulTypedName",
"src": "2441:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "2451:8:27",
"nodeType": "YulTypedName",
"src": "2451:8:27",
"type": ""
}
],
"src": "2407:107:27"
},
{
"body": {
"nativeSrc": "2596:317:27",
"nodeType": "YulBlock",
"src": "2596:317:27",
"statements": [
{
"nativeSrc": "2606:35:27",
"nodeType": "YulVariableDeclaration",
"src": "2606:35:27",
"value": {
"arguments": [
{
"name": "shiftBytes",
"nativeSrc": "2627:10:27",
"nodeType": "YulIdentifier",
"src": "2627:10:27"
},
{
"kind": "number",
"nativeSrc": "2639:1:27",
"nodeType": "YulLiteral",
"src": "2639:1:27",
"type": "",
"value": "8"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "2623:3:27",
"nodeType": "YulIdentifier",
"src": "2623:3:27"
},
"nativeSrc": "2623:18:27",
"nodeType": "YulFunctionCall",
"src": "2623:18:27"
},
"variables": [
{
"name": "shiftBits",
"nativeSrc": "2610:9:27",
"nodeType": "YulTypedName",
"src": "2610:9:27",
"type": ""
}
]
},
{
"nativeSrc": "2650:109:27",
"nodeType": "YulVariableDeclaration",
"src": "2650:109:27",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "2681:9:27",
"nodeType": "YulIdentifier",
"src": "2681:9:27"
},
{
"kind": "number",
"nativeSrc": "2692:66:27",
"nodeType": "YulLiteral",
"src": "2692:66:27",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "2662:18:27",
"nodeType": "YulIdentifier",
"src": "2662:18:27"
},
"nativeSrc": "2662:97:27",
"nodeType": "YulFunctionCall",
"src": "2662:97:27"
},
"variables": [
{
"name": "mask",
"nativeSrc": "2654:4:27",
"nodeType": "YulTypedName",
"src": "2654:4:27",
"type": ""
}
]
},
{
"nativeSrc": "2768:51:27",
"nodeType": "YulAssignment",
"src": "2768:51:27",
"value": {
"arguments": [
{
"name": "shiftBits",
"nativeSrc": "2799:9:27",
"nodeType": "YulIdentifier",
"src": "2799:9:27"
},
{
"name": "toInsert",
"nativeSrc": "2810:8:27",
"nodeType": "YulIdentifier",
"src": "2810:8:27"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "2780:18:27",
"nodeType": "YulIdentifier",
"src": "2780:18:27"
},
"nativeSrc": "2780:39:27",
"nodeType": "YulFunctionCall",
"src": "2780:39:27"
},
"variableNames": [
{
"name": "toInsert",
"nativeSrc": "2768:8:27",
"nodeType": "YulIdentifier",
"src": "2768:8:27"
}
]
},
{
"nativeSrc": "2828:30:27",
"nodeType": "YulAssignment",
"src": "2828:30:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "2841:5:27",
"nodeType": "YulIdentifier",
"src": "2841:5:27"
},
{
"arguments": [
{
"name": "mask",
"nativeSrc": "2852:4:27",
"nodeType": "YulIdentifier",
"src": "2852:4:27"
}
],
"functionName": {
"name": "not",
"nativeSrc": "2848:3:27",
"nodeType": "YulIdentifier",
"src": "2848:3:27"
},
"nativeSrc": "2848:9:27",
"nodeType": "YulFunctionCall",
"src": "2848:9:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "2837:3:27",
"nodeType": "YulIdentifier",
"src": "2837:3:27"
},
"nativeSrc": "2837:21:27",
"nodeType": "YulFunctionCall",
"src": "2837:21:27"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "2828:5:27",
"nodeType": "YulIdentifier",
"src": "2828:5:27"
}
]
},
{
"nativeSrc": "2867:40:27",
"nodeType": "YulAssignment",
"src": "2867:40:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "2880:5:27",
"nodeType": "YulIdentifier",
"src": "2880:5:27"
},
{
"arguments": [
{
"name": "toInsert",
"nativeSrc": "2891:8:27",
"nodeType": "YulIdentifier",
"src": "2891:8:27"
},
{
"name": "mask",
"nativeSrc": "2901:4:27",
"nodeType": "YulIdentifier",
"src": "2901:4:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "2887:3:27",
"nodeType": "YulIdentifier",
"src": "2887:3:27"
},
"nativeSrc": "2887:19:27",
"nodeType": "YulFunctionCall",
"src": "2887:19:27"
}
],
"functionName": {
"name": "or",
"nativeSrc": "2877:2:27",
"nodeType": "YulIdentifier",
"src": "2877:2:27"
},
"nativeSrc": "2877:30:27",
"nodeType": "YulFunctionCall",
"src": "2877:30:27"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "2867:6:27",
"nodeType": "YulIdentifier",
"src": "2867:6:27"
}
]
}
]
},
"name": "update_byte_slice_dynamic32",
"nativeSrc": "2520:393:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2557:5:27",
"nodeType": "YulTypedName",
"src": "2557:5:27",
"type": ""
},
{
"name": "shiftBytes",
"nativeSrc": "2564:10:27",
"nodeType": "YulTypedName",
"src": "2564:10:27",
"type": ""
},
{
"name": "toInsert",
"nativeSrc": "2576:8:27",
"nodeType": "YulTypedName",
"src": "2576:8:27",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "2589:6:27",
"nodeType": "YulTypedName",
"src": "2589:6:27",
"type": ""
}
],
"src": "2520:393:27"
},
{
"body": {
"nativeSrc": "2964:32:27",
"nodeType": "YulBlock",
"src": "2964:32:27",
"statements": [
{
"nativeSrc": "2974:16:27",
"nodeType": "YulAssignment",
"src": "2974:16:27",
"value": {
"name": "value",
"nativeSrc": "2985:5:27",
"nodeType": "YulIdentifier",
"src": "2985:5:27"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "2974:7:27",
"nodeType": "YulIdentifier",
"src": "2974:7:27"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nativeSrc": "2919:77:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "2946:5:27",
"nodeType": "YulTypedName",
"src": "2946:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "2956:7:27",
"nodeType": "YulTypedName",
"src": "2956:7:27",
"type": ""
}
],
"src": "2919:77:27"
},
{
"body": {
"nativeSrc": "3034:28:27",
"nodeType": "YulBlock",
"src": "3034:28:27",
"statements": [
{
"nativeSrc": "3044:12:27",
"nodeType": "YulAssignment",
"src": "3044:12:27",
"value": {
"name": "value",
"nativeSrc": "3051:5:27",
"nodeType": "YulIdentifier",
"src": "3051:5:27"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "3044:3:27",
"nodeType": "YulIdentifier",
"src": "3044:3:27"
}
]
}
]
},
"name": "identity",
"nativeSrc": "3002:60:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3020:5:27",
"nodeType": "YulTypedName",
"src": "3020:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "3030:3:27",
"nodeType": "YulTypedName",
"src": "3030:3:27",
"type": ""
}
],
"src": "3002:60:27"
},
{
"body": {
"nativeSrc": "3128:82:27",
"nodeType": "YulBlock",
"src": "3128:82:27",
"statements": [
{
"nativeSrc": "3138:66:27",
"nodeType": "YulAssignment",
"src": "3138:66:27",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "3196:5:27",
"nodeType": "YulIdentifier",
"src": "3196:5:27"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "3178:17:27",
"nodeType": "YulIdentifier",
"src": "3178:17:27"
},
"nativeSrc": "3178:24:27",
"nodeType": "YulFunctionCall",
"src": "3178:24:27"
}
],
"functionName": {
"name": "identity",
"nativeSrc": "3169:8:27",
"nodeType": "YulIdentifier",
"src": "3169:8:27"
},
"nativeSrc": "3169:34:27",
"nodeType": "YulFunctionCall",
"src": "3169:34:27"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "3151:17:27",
"nodeType": "YulIdentifier",
"src": "3151:17:27"
},
"nativeSrc": "3151:53:27",
"nodeType": "YulFunctionCall",
"src": "3151:53:27"
},
"variableNames": [
{
"name": "converted",
"nativeSrc": "3138:9:27",
"nodeType": "YulIdentifier",
"src": "3138:9:27"
}
]
}
]
},
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "3068:142:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3108:5:27",
"nodeType": "YulTypedName",
"src": "3108:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "converted",
"nativeSrc": "3118:9:27",
"nodeType": "YulTypedName",
"src": "3118:9:27",
"type": ""
}
],
"src": "3068:142:27"
},
{
"body": {
"nativeSrc": "3263:28:27",
"nodeType": "YulBlock",
"src": "3263:28:27",
"statements": [
{
"nativeSrc": "3273:12:27",
"nodeType": "YulAssignment",
"src": "3273:12:27",
"value": {
"name": "value",
"nativeSrc": "3280:5:27",
"nodeType": "YulIdentifier",
"src": "3280:5:27"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "3273:3:27",
"nodeType": "YulIdentifier",
"src": "3273:3:27"
}
]
}
]
},
"name": "prepare_store_t_uint256",
"nativeSrc": "3216:75:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "3249:5:27",
"nodeType": "YulTypedName",
"src": "3249:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nativeSrc": "3259:3:27",
"nodeType": "YulTypedName",
"src": "3259:3:27",
"type": ""
}
],
"src": "3216:75:27"
},
{
"body": {
"nativeSrc": "3373:193:27",
"nodeType": "YulBlock",
"src": "3373:193:27",
"statements": [
{
"nativeSrc": "3383:63:27",
"nodeType": "YulVariableDeclaration",
"src": "3383:63:27",
"value": {
"arguments": [
{
"name": "value_0",
"nativeSrc": "3438:7:27",
"nodeType": "YulIdentifier",
"src": "3438:7:27"
}
],
"functionName": {
"name": "convert_t_uint256_to_t_uint256",
"nativeSrc": "3407:30:27",
"nodeType": "YulIdentifier",
"src": "3407:30:27"
},
"nativeSrc": "3407:39:27",
"nodeType": "YulFunctionCall",
"src": "3407:39:27"
},
"variables": [
{
"name": "convertedValue_0",
"nativeSrc": "3387:16:27",
"nodeType": "YulTypedName",
"src": "3387:16:27",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "3462:4:27",
"nodeType": "YulIdentifier",
"src": "3462:4:27"
},
{
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "3502:4:27",
"nodeType": "YulIdentifier",
"src": "3502:4:27"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "3496:5:27",
"nodeType": "YulIdentifier",
"src": "3496:5:27"
},
"nativeSrc": "3496:11:27",
"nodeType": "YulFunctionCall",
"src": "3496:11:27"
},
{
"name": "offset",
"nativeSrc": "3509:6:27",
"nodeType": "YulIdentifier",
"src": "3509:6:27"
},
{
"arguments": [
{
"name": "convertedValue_0",
"nativeSrc": "3541:16:27",
"nodeType": "YulIdentifier",
"src": "3541:16:27"
}
],
"functionName": {
"name": "prepare_store_t_uint256",
"nativeSrc": "3517:23:27",
"nodeType": "YulIdentifier",
"src": "3517:23:27"
},
"nativeSrc": "3517:41:27",
"nodeType": "YulFunctionCall",
"src": "3517:41:27"
}
],
"functionName": {
"name": "update_byte_slice_dynamic32",
"nativeSrc": "3468:27:27",
"nodeType": "YulIdentifier",
"src": "3468:27:27"
},
"nativeSrc": "3468:91:27",
"nodeType": "YulFunctionCall",
"src": "3468:91:27"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "3455:6:27",
"nodeType": "YulIdentifier",
"src": "3455:6:27"
},
"nativeSrc": "3455:105:27",
"nodeType": "YulFunctionCall",
"src": "3455:105:27"
},
"nativeSrc": "3455:105:27",
"nodeType": "YulExpressionStatement",
"src": "3455:105:27"
}
]
},
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "3297:269:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "3350:4:27",
"nodeType": "YulTypedName",
"src": "3350:4:27",
"type": ""
},
{
"name": "offset",
"nativeSrc": "3356:6:27",
"nodeType": "YulTypedName",
"src": "3356:6:27",
"type": ""
},
{
"name": "value_0",
"nativeSrc": "3364:7:27",
"nodeType": "YulTypedName",
"src": "3364:7:27",
"type": ""
}
],
"src": "3297:269:27"
},
{
"body": {
"nativeSrc": "3621:24:27",
"nodeType": "YulBlock",
"src": "3621:24:27",
"statements": [
{
"nativeSrc": "3631:8:27",
"nodeType": "YulAssignment",
"src": "3631:8:27",
"value": {
"kind": "number",
"nativeSrc": "3638:1:27",
"nodeType": "YulLiteral",
"src": "3638:1:27",
"type": "",
"value": "0"
},
"variableNames": [
{
"name": "ret",
"nativeSrc": "3631:3:27",
"nodeType": "YulIdentifier",
"src": "3631:3:27"
}
]
}
]
},
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "3572:73:27",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "ret",
"nativeSrc": "3617:3:27",
"nodeType": "YulTypedName",
"src": "3617:3:27",
"type": ""
}
],
"src": "3572:73:27"
},
{
"body": {
"nativeSrc": "3704:136:27",
"nodeType": "YulBlock",
"src": "3704:136:27",
"statements": [
{
"nativeSrc": "3714:46:27",
"nodeType": "YulVariableDeclaration",
"src": "3714:46:27",
"value": {
"arguments": [],
"functionName": {
"name": "zero_value_for_split_t_uint256",
"nativeSrc": "3728:30:27",
"nodeType": "YulIdentifier",
"src": "3728:30:27"
},
"nativeSrc": "3728:32:27",
"nodeType": "YulFunctionCall",
"src": "3728:32:27"
},
"variables": [
{
"name": "zero_0",
"nativeSrc": "3718:6:27",
"nodeType": "YulTypedName",
"src": "3718:6:27",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "3813:4:27",
"nodeType": "YulIdentifier",
"src": "3813:4:27"
},
{
"name": "offset",
"nativeSrc": "3819:6:27",
"nodeType": "YulIdentifier",
"src": "3819:6:27"
},
{
"name": "zero_0",
"nativeSrc": "3827:6:27",
"nodeType": "YulIdentifier",
"src": "3827:6:27"
}
],
"functionName": {
"name": "update_storage_value_t_uint256_to_t_uint256",
"nativeSrc": "3769:43:27",
"nodeType": "YulIdentifier",
"src": "3769:43:27"
},
"nativeSrc": "3769:65:27",
"nodeType": "YulFunctionCall",
"src": "3769:65:27"
},
"nativeSrc": "3769:65:27",
"nodeType": "YulExpressionStatement",
"src": "3769:65:27"
}
]
},
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "3651:189:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "3690:4:27",
"nodeType": "YulTypedName",
"src": "3690:4:27",
"type": ""
},
{
"name": "offset",
"nativeSrc": "3696:6:27",
"nodeType": "YulTypedName",
"src": "3696:6:27",
"type": ""
}
],
"src": "3651:189:27"
},
{
"body": {
"nativeSrc": "3896:136:27",
"nodeType": "YulBlock",
"src": "3896:136:27",
"statements": [
{
"body": {
"nativeSrc": "3963:63:27",
"nodeType": "YulBlock",
"src": "3963:63:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "start",
"nativeSrc": "4007:5:27",
"nodeType": "YulIdentifier",
"src": "4007:5:27"
},
{
"kind": "number",
"nativeSrc": "4014:1:27",
"nodeType": "YulLiteral",
"src": "4014:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "storage_set_to_zero_t_uint256",
"nativeSrc": "3977:29:27",
"nodeType": "YulIdentifier",
"src": "3977:29:27"
},
"nativeSrc": "3977:39:27",
"nodeType": "YulFunctionCall",
"src": "3977:39:27"
},
"nativeSrc": "3977:39:27",
"nodeType": "YulExpressionStatement",
"src": "3977:39:27"
}
]
},
"condition": {
"arguments": [
{
"name": "start",
"nativeSrc": "3916:5:27",
"nodeType": "YulIdentifier",
"src": "3916:5:27"
},
{
"name": "end",
"nativeSrc": "3923:3:27",
"nodeType": "YulIdentifier",
"src": "3923:3:27"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "3913:2:27",
"nodeType": "YulIdentifier",
"src": "3913:2:27"
},
"nativeSrc": "3913:14:27",
"nodeType": "YulFunctionCall",
"src": "3913:14:27"
},
"nativeSrc": "3906:120:27",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "3928:26:27",
"nodeType": "YulBlock",
"src": "3928:26:27",
"statements": [
{
"nativeSrc": "3930:22:27",
"nodeType": "YulAssignment",
"src": "3930:22:27",
"value": {
"arguments": [
{
"name": "start",
"nativeSrc": "3943:5:27",
"nodeType": "YulIdentifier",
"src": "3943:5:27"
},
{
"kind": "number",
"nativeSrc": "3950:1:27",
"nodeType": "YulLiteral",
"src": "3950:1:27",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "3939:3:27",
"nodeType": "YulIdentifier",
"src": "3939:3:27"
},
"nativeSrc": "3939:13:27",
"nodeType": "YulFunctionCall",
"src": "3939:13:27"
},
"variableNames": [
{
"name": "start",
"nativeSrc": "3930:5:27",
"nodeType": "YulIdentifier",
"src": "3930:5:27"
}
]
}
]
},
"pre": {
"nativeSrc": "3910:2:27",
"nodeType": "YulBlock",
"src": "3910:2:27",
"statements": []
},
"src": "3906:120:27"
}
]
},
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "3846:186:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "start",
"nativeSrc": "3884:5:27",
"nodeType": "YulTypedName",
"src": "3884:5:27",
"type": ""
},
{
"name": "end",
"nativeSrc": "3891:3:27",
"nodeType": "YulTypedName",
"src": "3891:3:27",
"type": ""
}
],
"src": "3846:186:27"
},
{
"body": {
"nativeSrc": "4117:464:27",
"nodeType": "YulBlock",
"src": "4117:464:27",
"statements": [
{
"body": {
"nativeSrc": "4143:431:27",
"nodeType": "YulBlock",
"src": "4143:431:27",
"statements": [
{
"nativeSrc": "4157:54:27",
"nodeType": "YulVariableDeclaration",
"src": "4157:54:27",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "4205:5:27",
"nodeType": "YulIdentifier",
"src": "4205:5:27"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "4173:31:27",
"nodeType": "YulIdentifier",
"src": "4173:31:27"
},
"nativeSrc": "4173:38:27",
"nodeType": "YulFunctionCall",
"src": "4173:38:27"
},
"variables": [
{
"name": "dataArea",
"nativeSrc": "4161:8:27",
"nodeType": "YulTypedName",
"src": "4161:8:27",
"type": ""
}
]
},
{
"nativeSrc": "4224:63:27",
"nodeType": "YulVariableDeclaration",
"src": "4224:63:27",
"value": {
"arguments": [
{
"name": "dataArea",
"nativeSrc": "4247:8:27",
"nodeType": "YulIdentifier",
"src": "4247:8:27"
},
{
"arguments": [
{
"name": "startIndex",
"nativeSrc": "4275:10:27",
"nodeType": "YulIdentifier",
"src": "4275:10:27"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "4257:17:27",
"nodeType": "YulIdentifier",
"src": "4257:17:27"
},
"nativeSrc": "4257:29:27",
"nodeType": "YulFunctionCall",
"src": "4257:29:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4243:3:27",
"nodeType": "YulIdentifier",
"src": "4243:3:27"
},
"nativeSrc": "4243:44:27",
"nodeType": "YulFunctionCall",
"src": "4243:44:27"
},
"variables": [
{
"name": "deleteStart",
"nativeSrc": "4228:11:27",
"nodeType": "YulTypedName",
"src": "4228:11:27",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "4444:27:27",
"nodeType": "YulBlock",
"src": "4444:27:27",
"statements": [
{
"nativeSrc": "4446:23:27",
"nodeType": "YulAssignment",
"src": "4446:23:27",
"value": {
"name": "dataArea",
"nativeSrc": "4461:8:27",
"nodeType": "YulIdentifier",
"src": "4461:8:27"
},
"variableNames": [
{
"name": "deleteStart",
"nativeSrc": "4446:11:27",
"nodeType": "YulIdentifier",
"src": "4446:11:27"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "startIndex",
"nativeSrc": "4428:10:27",
"nodeType": "YulIdentifier",
"src": "4428:10:27"
},
{
"kind": "number",
"nativeSrc": "4440:2:27",
"nodeType": "YulLiteral",
"src": "4440:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "4425:2:27",
"nodeType": "YulIdentifier",
"src": "4425:2:27"
},
"nativeSrc": "4425:18:27",
"nodeType": "YulFunctionCall",
"src": "4425:18:27"
},
"nativeSrc": "4422:49:27",
"nodeType": "YulIf",
"src": "4422:49:27"
},
{
"expression": {
"arguments": [
{
"name": "deleteStart",
"nativeSrc": "4513:11:27",
"nodeType": "YulIdentifier",
"src": "4513:11:27"
},
{
"arguments": [
{
"name": "dataArea",
"nativeSrc": "4530:8:27",
"nodeType": "YulIdentifier",
"src": "4530:8:27"
},
{
"arguments": [
{
"name": "len",
"nativeSrc": "4558:3:27",
"nodeType": "YulIdentifier",
"src": "4558:3:27"
}
],
"functionName": {
"name": "divide_by_32_ceil",
"nativeSrc": "4540:17:27",
"nodeType": "YulIdentifier",
"src": "4540:17:27"
},
"nativeSrc": "4540:22:27",
"nodeType": "YulFunctionCall",
"src": "4540:22:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "4526:3:27",
"nodeType": "YulIdentifier",
"src": "4526:3:27"
},
"nativeSrc": "4526:37:27",
"nodeType": "YulFunctionCall",
"src": "4526:37:27"
}
],
"functionName": {
"name": "clear_storage_range_t_bytes1",
"nativeSrc": "4484:28:27",
"nodeType": "YulIdentifier",
"src": "4484:28:27"
},
"nativeSrc": "4484:80:27",
"nodeType": "YulFunctionCall",
"src": "4484:80:27"
},
"nativeSrc": "4484:80:27",
"nodeType": "YulExpressionStatement",
"src": "4484:80:27"
}
]
},
"condition": {
"arguments": [
{
"name": "len",
"nativeSrc": "4134:3:27",
"nodeType": "YulIdentifier",
"src": "4134:3:27"
},
{
"kind": "number",
"nativeSrc": "4139:2:27",
"nodeType": "YulLiteral",
"src": "4139:2:27",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "4131:2:27",
"nodeType": "YulIdentifier",
"src": "4131:2:27"
},
"nativeSrc": "4131:11:27",
"nodeType": "YulFunctionCall",
"src": "4131:11:27"
},
"nativeSrc": "4128:446:27",
"nodeType": "YulIf",
"src": "4128:446:27"
}
]
},
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "4038:543:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "array",
"nativeSrc": "4093:5:27",
"nodeType": "YulTypedName",
"src": "4093:5:27",
"type": ""
},
{
"name": "len",
"nativeSrc": "4100:3:27",
"nodeType": "YulTypedName",
"src": "4100:3:27",
"type": ""
},
{
"name": "startIndex",
"nativeSrc": "4105:10:27",
"nodeType": "YulTypedName",
"src": "4105:10:27",
"type": ""
}
],
"src": "4038:543:27"
},
{
"body": {
"nativeSrc": "4650:54:27",
"nodeType": "YulBlock",
"src": "4650:54:27",
"statements": [
{
"nativeSrc": "4660:37:27",
"nodeType": "YulAssignment",
"src": "4660:37:27",
"value": {
"arguments": [
{
"name": "bits",
"nativeSrc": "4685:4:27",
"nodeType": "YulIdentifier",
"src": "4685:4:27"
},
{
"name": "value",
"nativeSrc": "4691:5:27",
"nodeType": "YulIdentifier",
"src": "4691:5:27"
}
],
"functionName": {
"name": "shr",
"nativeSrc": "4681:3:27",
"nodeType": "YulIdentifier",
"src": "4681:3:27"
},
"nativeSrc": "4681:16:27",
"nodeType": "YulFunctionCall",
"src": "4681:16:27"
},
"variableNames": [
{
"name": "newValue",
"nativeSrc": "4660:8:27",
"nodeType": "YulIdentifier",
"src": "4660:8:27"
}
]
}
]
},
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "4587:117:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "bits",
"nativeSrc": "4625:4:27",
"nodeType": "YulTypedName",
"src": "4625:4:27",
"type": ""
},
{
"name": "value",
"nativeSrc": "4631:5:27",
"nodeType": "YulTypedName",
"src": "4631:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "newValue",
"nativeSrc": "4641:8:27",
"nodeType": "YulTypedName",
"src": "4641:8:27",
"type": ""
}
],
"src": "4587:117:27"
},
{
"body": {
"nativeSrc": "4761:118:27",
"nodeType": "YulBlock",
"src": "4761:118:27",
"statements": [
{
"nativeSrc": "4771:68:27",
"nodeType": "YulVariableDeclaration",
"src": "4771:68:27",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nativeSrc": "4820:1:27",
"nodeType": "YulLiteral",
"src": "4820:1:27",
"type": "",
"value": "8"
},
{
"name": "bytes",
"nativeSrc": "4823:5:27",
"nodeType": "YulIdentifier",
"src": "4823:5:27"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "4816:3:27",
"nodeType": "YulIdentifier",
"src": "4816:3:27"
},
"nativeSrc": "4816:13:27",
"nodeType": "YulFunctionCall",
"src": "4816:13:27"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "4835:1:27",
"nodeType": "YulLiteral",
"src": "4835:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nativeSrc": "4831:3:27",
"nodeType": "YulIdentifier",
"src": "4831:3:27"
},
"nativeSrc": "4831:6:27",
"nodeType": "YulFunctionCall",
"src": "4831:6:27"
}
],
"functionName": {
"name": "shift_right_unsigned_dynamic",
"nativeSrc": "4787:28:27",
"nodeType": "YulIdentifier",
"src": "4787:28:27"
},
"nativeSrc": "4787:51:27",
"nodeType": "YulFunctionCall",
"src": "4787:51:27"
}
],
"functionName": {
"name": "not",
"nativeSrc": "4783:3:27",
"nodeType": "YulIdentifier",
"src": "4783:3:27"
},
"nativeSrc": "4783:56:27",
"nodeType": "YulFunctionCall",
"src": "4783:56:27"
},
"variables": [
{
"name": "mask",
"nativeSrc": "4775:4:27",
"nodeType": "YulTypedName",
"src": "4775:4:27",
"type": ""
}
]
},
{
"nativeSrc": "4848:25:27",
"nodeType": "YulAssignment",
"src": "4848:25:27",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "4862:4:27",
"nodeType": "YulIdentifier",
"src": "4862:4:27"
},
{
"name": "mask",
"nativeSrc": "4868:4:27",
"nodeType": "YulIdentifier",
"src": "4868:4:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "4858:3:27",
"nodeType": "YulIdentifier",
"src": "4858:3:27"
},
"nativeSrc": "4858:15:27",
"nodeType": "YulFunctionCall",
"src": "4858:15:27"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "4848:6:27",
"nodeType": "YulIdentifier",
"src": "4848:6:27"
}
]
}
]
},
"name": "mask_bytes_dynamic",
"nativeSrc": "4710:169:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "4738:4:27",
"nodeType": "YulTypedName",
"src": "4738:4:27",
"type": ""
},
{
"name": "bytes",
"nativeSrc": "4744:5:27",
"nodeType": "YulTypedName",
"src": "4744:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "4754:6:27",
"nodeType": "YulTypedName",
"src": "4754:6:27",
"type": ""
}
],
"src": "4710:169:27"
},
{
"body": {
"nativeSrc": "4965:214:27",
"nodeType": "YulBlock",
"src": "4965:214:27",
"statements": [
{
"nativeSrc": "5098:37:27",
"nodeType": "YulAssignment",
"src": "5098:37:27",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "5125:4:27",
"nodeType": "YulIdentifier",
"src": "5125:4:27"
},
{
"name": "len",
"nativeSrc": "5131:3:27",
"nodeType": "YulIdentifier",
"src": "5131:3:27"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "5106:18:27",
"nodeType": "YulIdentifier",
"src": "5106:18:27"
},
"nativeSrc": "5106:29:27",
"nodeType": "YulFunctionCall",
"src": "5106:29:27"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "5098:4:27",
"nodeType": "YulIdentifier",
"src": "5098:4:27"
}
]
},
{
"nativeSrc": "5144:29:27",
"nodeType": "YulAssignment",
"src": "5144:29:27",
"value": {
"arguments": [
{
"name": "data",
"nativeSrc": "5155:4:27",
"nodeType": "YulIdentifier",
"src": "5155:4:27"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "5165:1:27",
"nodeType": "YulLiteral",
"src": "5165:1:27",
"type": "",
"value": "2"
},
{
"name": "len",
"nativeSrc": "5168:3:27",
"nodeType": "YulIdentifier",
"src": "5168:3:27"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "5161:3:27",
"nodeType": "YulIdentifier",
"src": "5161:3:27"
},
"nativeSrc": "5161:11:27",
"nodeType": "YulFunctionCall",
"src": "5161:11:27"
}
],
"functionName": {
"name": "or",
"nativeSrc": "5152:2:27",
"nodeType": "YulIdentifier",
"src": "5152:2:27"
},
"nativeSrc": "5152:21:27",
"nodeType": "YulFunctionCall",
"src": "5152:21:27"
},
"variableNames": [
{
"name": "used",
"nativeSrc": "5144:4:27",
"nodeType": "YulIdentifier",
"src": "5144:4:27"
}
]
}
]
},
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "4884:295:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nativeSrc": "4946:4:27",
"nodeType": "YulTypedName",
"src": "4946:4:27",
"type": ""
},
{
"name": "len",
"nativeSrc": "4952:3:27",
"nodeType": "YulTypedName",
"src": "4952:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "used",
"nativeSrc": "4960:4:27",
"nodeType": "YulTypedName",
"src": "4960:4:27",
"type": ""
}
],
"src": "4884:295:27"
},
{
"body": {
"nativeSrc": "5276:1303:27",
"nodeType": "YulBlock",
"src": "5276:1303:27",
"statements": [
{
"nativeSrc": "5287:51:27",
"nodeType": "YulVariableDeclaration",
"src": "5287:51:27",
"value": {
"arguments": [
{
"name": "src",
"nativeSrc": "5334:3:27",
"nodeType": "YulIdentifier",
"src": "5334:3:27"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "5301:32:27",
"nodeType": "YulIdentifier",
"src": "5301:32:27"
},
"nativeSrc": "5301:37:27",
"nodeType": "YulFunctionCall",
"src": "5301:37:27"
},
"variables": [
{
"name": "newLen",
"nativeSrc": "5291:6:27",
"nodeType": "YulTypedName",
"src": "5291:6:27",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "5423:22:27",
"nodeType": "YulBlock",
"src": "5423:22:27",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nativeSrc": "5425:16:27",
"nodeType": "YulIdentifier",
"src": "5425:16:27"
},
"nativeSrc": "5425:18:27",
"nodeType": "YulFunctionCall",
"src": "5425:18:27"
},
"nativeSrc": "5425:18:27",
"nodeType": "YulExpressionStatement",
"src": "5425:18:27"
}
]
},
"condition": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "5395:6:27",
"nodeType": "YulIdentifier",
"src": "5395:6:27"
},
{
"kind": "number",
"nativeSrc": "5403:18:27",
"nodeType": "YulLiteral",
"src": "5403:18:27",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "5392:2:27",
"nodeType": "YulIdentifier",
"src": "5392:2:27"
},
"nativeSrc": "5392:30:27",
"nodeType": "YulFunctionCall",
"src": "5392:30:27"
},
"nativeSrc": "5389:56:27",
"nodeType": "YulIf",
"src": "5389:56:27"
},
{
"nativeSrc": "5455:52:27",
"nodeType": "YulVariableDeclaration",
"src": "5455:52:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "slot",
"nativeSrc": "5501:4:27",
"nodeType": "YulIdentifier",
"src": "5501:4:27"
}
],
"functionName": {
"name": "sload",
"nativeSrc": "5495:5:27",
"nodeType": "YulIdentifier",
"src": "5495:5:27"
},
"nativeSrc": "5495:11:27",
"nodeType": "YulFunctionCall",
"src": "5495:11:27"
}
],
"functionName": {
"name": "extract_byte_array_length",
"nativeSrc": "5469:25:27",
"nodeType": "YulIdentifier",
"src": "5469:25:27"
},
"nativeSrc": "5469:38:27",
"nodeType": "YulFunctionCall",
"src": "5469:38:27"
},
"variables": [
{
"name": "oldLen",
"nativeSrc": "5459:6:27",
"nodeType": "YulTypedName",
"src": "5459:6:27",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "5600:4:27",
"nodeType": "YulIdentifier",
"src": "5600:4:27"
},
{
"name": "oldLen",
"nativeSrc": "5606:6:27",
"nodeType": "YulIdentifier",
"src": "5606:6:27"
},
{
"name": "newLen",
"nativeSrc": "5614:6:27",
"nodeType": "YulIdentifier",
"src": "5614:6:27"
}
],
"functionName": {
"name": "clean_up_bytearray_end_slots_t_string_storage",
"nativeSrc": "5554:45:27",
"nodeType": "YulIdentifier",
"src": "5554:45:27"
},
"nativeSrc": "5554:67:27",
"nodeType": "YulFunctionCall",
"src": "5554:67:27"
},
"nativeSrc": "5554:67:27",
"nodeType": "YulExpressionStatement",
"src": "5554:67:27"
},
{
"nativeSrc": "5631:18:27",
"nodeType": "YulVariableDeclaration",
"src": "5631:18:27",
"value": {
"kind": "number",
"nativeSrc": "5648:1:27",
"nodeType": "YulLiteral",
"src": "5648:1:27",
"type": "",
"value": "0"
},
"variables": [
{
"name": "srcOffset",
"nativeSrc": "5635:9:27",
"nodeType": "YulTypedName",
"src": "5635:9:27",
"type": ""
}
]
},
{
"nativeSrc": "5659:17:27",
"nodeType": "YulAssignment",
"src": "5659:17:27",
"value": {
"kind": "number",
"nativeSrc": "5672:4:27",
"nodeType": "YulLiteral",
"src": "5672:4:27",
"type": "",
"value": "0x20"
},
"variableNames": [
{
"name": "srcOffset",
"nativeSrc": "5659:9:27",
"nodeType": "YulIdentifier",
"src": "5659:9:27"
}
]
},
{
"cases": [
{
"body": {
"nativeSrc": "5723:611:27",
"nodeType": "YulBlock",
"src": "5723:611:27",
"statements": [
{
"nativeSrc": "5737:37:27",
"nodeType": "YulVariableDeclaration",
"src": "5737:37:27",
"value": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "5756:6:27",
"nodeType": "YulIdentifier",
"src": "5756:6:27"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "5768:4:27",
"nodeType": "YulLiteral",
"src": "5768:4:27",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "not",
"nativeSrc": "5764:3:27",
"nodeType": "YulIdentifier",
"src": "5764:3:27"
},
"nativeSrc": "5764:9:27",
"nodeType": "YulFunctionCall",
"src": "5764:9:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "5752:3:27",
"nodeType": "YulIdentifier",
"src": "5752:3:27"
},
"nativeSrc": "5752:22:27",
"nodeType": "YulFunctionCall",
"src": "5752:22:27"
},
"variables": [
{
"name": "loopEnd",
"nativeSrc": "5741:7:27",
"nodeType": "YulTypedName",
"src": "5741:7:27",
"type": ""
}
]
},
{
"nativeSrc": "5788:51:27",
"nodeType": "YulVariableDeclaration",
"src": "5788:51:27",
"value": {
"arguments": [
{
"name": "slot",
"nativeSrc": "5834:4:27",
"nodeType": "YulIdentifier",
"src": "5834:4:27"
}
],
"functionName": {
"name": "array_dataslot_t_string_storage",
"nativeSrc": "5802:31:27",
"nodeType": "YulIdentifier",
"src": "5802:31:27"
},
"nativeSrc": "5802:37:27",
"nodeType": "YulFunctionCall",
"src": "5802:37:27"
},
"variables": [
{
"name": "dstPtr",
"nativeSrc": "5792:6:27",
"nodeType": "YulTypedName",
"src": "5792:6:27",
"type": ""
}
]
},
{
"nativeSrc": "5852:10:27",
"nodeType": "YulVariableDeclaration",
"src": "5852:10:27",
"value": {
"kind": "number",
"nativeSrc": "5861:1:27",
"nodeType": "YulLiteral",
"src": "5861:1:27",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nativeSrc": "5856:1:27",
"nodeType": "YulTypedName",
"src": "5856:1:27",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "5920:163:27",
"nodeType": "YulBlock",
"src": "5920:163:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "5945:6:27",
"nodeType": "YulIdentifier",
"src": "5945:6:27"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "5963:3:27",
"nodeType": "YulIdentifier",
"src": "5963:3:27"
},
{
"name": "srcOffset",
"nativeSrc": "5968:9:27",
"nodeType": "YulIdentifier",
"src": "5968:9:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5959:3:27",
"nodeType": "YulIdentifier",
"src": "5959:3:27"
},
"nativeSrc": "5959:19:27",
"nodeType": "YulFunctionCall",
"src": "5959:19:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "5953:5:27",
"nodeType": "YulIdentifier",
"src": "5953:5:27"
},
"nativeSrc": "5953:26:27",
"nodeType": "YulFunctionCall",
"src": "5953:26:27"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "5938:6:27",
"nodeType": "YulIdentifier",
"src": "5938:6:27"
},
"nativeSrc": "5938:42:27",
"nodeType": "YulFunctionCall",
"src": "5938:42:27"
},
"nativeSrc": "5938:42:27",
"nodeType": "YulExpressionStatement",
"src": "5938:42:27"
},
{
"nativeSrc": "5997:24:27",
"nodeType": "YulAssignment",
"src": "5997:24:27",
"value": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "6011:6:27",
"nodeType": "YulIdentifier",
"src": "6011:6:27"
},
{
"kind": "number",
"nativeSrc": "6019:1:27",
"nodeType": "YulLiteral",
"src": "6019:1:27",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6007:3:27",
"nodeType": "YulIdentifier",
"src": "6007:3:27"
},
"nativeSrc": "6007:14:27",
"nodeType": "YulFunctionCall",
"src": "6007:14:27"
},
"variableNames": [
{
"name": "dstPtr",
"nativeSrc": "5997:6:27",
"nodeType": "YulIdentifier",
"src": "5997:6:27"
}
]
},
{
"nativeSrc": "6038:31:27",
"nodeType": "YulAssignment",
"src": "6038:31:27",
"value": {
"arguments": [
{
"name": "srcOffset",
"nativeSrc": "6055:9:27",
"nodeType": "YulIdentifier",
"src": "6055:9:27"
},
{
"kind": "number",
"nativeSrc": "6066:2:27",
"nodeType": "YulLiteral",
"src": "6066:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6051:3:27",
"nodeType": "YulIdentifier",
"src": "6051:3:27"
},
"nativeSrc": "6051:18:27",
"nodeType": "YulFunctionCall",
"src": "6051:18:27"
},
"variableNames": [
{
"name": "srcOffset",
"nativeSrc": "6038:9:27",
"nodeType": "YulIdentifier",
"src": "6038:9:27"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nativeSrc": "5886:1:27",
"nodeType": "YulIdentifier",
"src": "5886:1:27"
},
{
"name": "loopEnd",
"nativeSrc": "5889:7:27",
"nodeType": "YulIdentifier",
"src": "5889:7:27"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "5883:2:27",
"nodeType": "YulIdentifier",
"src": "5883:2:27"
},
"nativeSrc": "5883:14:27",
"nodeType": "YulFunctionCall",
"src": "5883:14:27"
},
"nativeSrc": "5875:208:27",
"nodeType": "YulForLoop",
"post": {
"nativeSrc": "5898:21:27",
"nodeType": "YulBlock",
"src": "5898:21:27",
"statements": [
{
"nativeSrc": "5900:17:27",
"nodeType": "YulAssignment",
"src": "5900:17:27",
"value": {
"arguments": [
{
"name": "i",
"nativeSrc": "5909:1:27",
"nodeType": "YulIdentifier",
"src": "5909:1:27"
},
{
"kind": "number",
"nativeSrc": "5912:4:27",
"nodeType": "YulLiteral",
"src": "5912:4:27",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "5905:3:27",
"nodeType": "YulIdentifier",
"src": "5905:3:27"
},
"nativeSrc": "5905:12:27",
"nodeType": "YulFunctionCall",
"src": "5905:12:27"
},
"variableNames": [
{
"name": "i",
"nativeSrc": "5900:1:27",
"nodeType": "YulIdentifier",
"src": "5900:1:27"
}
]
}
]
},
"pre": {
"nativeSrc": "5879:3:27",
"nodeType": "YulBlock",
"src": "5879:3:27",
"statements": []
},
"src": "5875:208:27"
},
{
"body": {
"nativeSrc": "6119:156:27",
"nodeType": "YulBlock",
"src": "6119:156:27",
"statements": [
{
"nativeSrc": "6137:43:27",
"nodeType": "YulVariableDeclaration",
"src": "6137:43:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "6164:3:27",
"nodeType": "YulIdentifier",
"src": "6164:3:27"
},
{
"name": "srcOffset",
"nativeSrc": "6169:9:27",
"nodeType": "YulIdentifier",
"src": "6169:9:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6160:3:27",
"nodeType": "YulIdentifier",
"src": "6160:3:27"
},
"nativeSrc": "6160:19:27",
"nodeType": "YulFunctionCall",
"src": "6160:19:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "6154:5:27",
"nodeType": "YulIdentifier",
"src": "6154:5:27"
},
"nativeSrc": "6154:26:27",
"nodeType": "YulFunctionCall",
"src": "6154:26:27"
},
"variables": [
{
"name": "lastValue",
"nativeSrc": "6141:9:27",
"nodeType": "YulTypedName",
"src": "6141:9:27",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "dstPtr",
"nativeSrc": "6204:6:27",
"nodeType": "YulIdentifier",
"src": "6204:6:27"
},
{
"arguments": [
{
"name": "lastValue",
"nativeSrc": "6231:9:27",
"nodeType": "YulIdentifier",
"src": "6231:9:27"
},
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "6246:6:27",
"nodeType": "YulIdentifier",
"src": "6246:6:27"
},
{
"kind": "number",
"nativeSrc": "6254:4:27",
"nodeType": "YulLiteral",
"src": "6254:4:27",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "and",
"nativeSrc": "6242:3:27",
"nodeType": "YulIdentifier",
"src": "6242:3:27"
},
"nativeSrc": "6242:17:27",
"nodeType": "YulFunctionCall",
"src": "6242:17:27"
}
],
"functionName": {
"name": "mask_bytes_dynamic",
"nativeSrc": "6212:18:27",
"nodeType": "YulIdentifier",
"src": "6212:18:27"
},
"nativeSrc": "6212:48:27",
"nodeType": "YulFunctionCall",
"src": "6212:48:27"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "6197:6:27",
"nodeType": "YulIdentifier",
"src": "6197:6:27"
},
"nativeSrc": "6197:64:27",
"nodeType": "YulFunctionCall",
"src": "6197:64:27"
},
"nativeSrc": "6197:64:27",
"nodeType": "YulExpressionStatement",
"src": "6197:64:27"
}
]
},
"condition": {
"arguments": [
{
"name": "loopEnd",
"nativeSrc": "6102:7:27",
"nodeType": "YulIdentifier",
"src": "6102:7:27"
},
{
"name": "newLen",
"nativeSrc": "6111:6:27",
"nodeType": "YulIdentifier",
"src": "6111:6:27"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "6099:2:27",
"nodeType": "YulIdentifier",
"src": "6099:2:27"
},
"nativeSrc": "6099:19:27",
"nodeType": "YulFunctionCall",
"src": "6099:19:27"
},
"nativeSrc": "6096:179:27",
"nodeType": "YulIf",
"src": "6096:179:27"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "6295:4:27",
"nodeType": "YulIdentifier",
"src": "6295:4:27"
},
{
"arguments": [
{
"arguments": [
{
"name": "newLen",
"nativeSrc": "6309:6:27",
"nodeType": "YulIdentifier",
"src": "6309:6:27"
},
{
"kind": "number",
"nativeSrc": "6317:1:27",
"nodeType": "YulLiteral",
"src": "6317:1:27",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "6305:3:27",
"nodeType": "YulIdentifier",
"src": "6305:3:27"
},
"nativeSrc": "6305:14:27",
"nodeType": "YulFunctionCall",
"src": "6305:14:27"
},
{
"kind": "number",
"nativeSrc": "6321:1:27",
"nodeType": "YulLiteral",
"src": "6321:1:27",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6301:3:27",
"nodeType": "YulIdentifier",
"src": "6301:3:27"
},
"nativeSrc": "6301:22:27",
"nodeType": "YulFunctionCall",
"src": "6301:22:27"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "6288:6:27",
"nodeType": "YulIdentifier",
"src": "6288:6:27"
},
"nativeSrc": "6288:36:27",
"nodeType": "YulFunctionCall",
"src": "6288:36:27"
},
"nativeSrc": "6288:36:27",
"nodeType": "YulExpressionStatement",
"src": "6288:36:27"
}
]
},
"nativeSrc": "5716:618:27",
"nodeType": "YulCase",
"src": "5716:618:27",
"value": {
"kind": "number",
"nativeSrc": "5721:1:27",
"nodeType": "YulLiteral",
"src": "5721:1:27",
"type": "",
"value": "1"
}
},
{
"body": {
"nativeSrc": "6351:222:27",
"nodeType": "YulBlock",
"src": "6351:222:27",
"statements": [
{
"nativeSrc": "6365:14:27",
"nodeType": "YulVariableDeclaration",
"src": "6365:14:27",
"value": {
"kind": "number",
"nativeSrc": "6378:1:27",
"nodeType": "YulLiteral",
"src": "6378:1:27",
"type": "",
"value": "0"
},
"variables": [
{
"name": "value",
"nativeSrc": "6369:5:27",
"nodeType": "YulTypedName",
"src": "6369:5:27",
"type": ""
}
]
},
{
"body": {
"nativeSrc": "6402:67:27",
"nodeType": "YulBlock",
"src": "6402:67:27",
"statements": [
{
"nativeSrc": "6420:35:27",
"nodeType": "YulAssignment",
"src": "6420:35:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nativeSrc": "6439:3:27",
"nodeType": "YulIdentifier",
"src": "6439:3:27"
},
{
"name": "srcOffset",
"nativeSrc": "6444:9:27",
"nodeType": "YulIdentifier",
"src": "6444:9:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6435:3:27",
"nodeType": "YulIdentifier",
"src": "6435:3:27"
},
"nativeSrc": "6435:19:27",
"nodeType": "YulFunctionCall",
"src": "6435:19:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "6429:5:27",
"nodeType": "YulIdentifier",
"src": "6429:5:27"
},
"nativeSrc": "6429:26:27",
"nodeType": "YulFunctionCall",
"src": "6429:26:27"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "6420:5:27",
"nodeType": "YulIdentifier",
"src": "6420:5:27"
}
]
}
]
},
"condition": {
"name": "newLen",
"nativeSrc": "6395:6:27",
"nodeType": "YulIdentifier",
"src": "6395:6:27"
},
"nativeSrc": "6392:77:27",
"nodeType": "YulIf",
"src": "6392:77:27"
},
{
"expression": {
"arguments": [
{
"name": "slot",
"nativeSrc": "6489:4:27",
"nodeType": "YulIdentifier",
"src": "6489:4:27"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "6548:5:27",
"nodeType": "YulIdentifier",
"src": "6548:5:27"
},
{
"name": "newLen",
"nativeSrc": "6555:6:27",
"nodeType": "YulIdentifier",
"src": "6555:6:27"
}
],
"functionName": {
"name": "extract_used_part_and_set_length_of_short_byte_array",
"nativeSrc": "6495:52:27",
"nodeType": "YulIdentifier",
"src": "6495:52:27"
},
"nativeSrc": "6495:67:27",
"nodeType": "YulFunctionCall",
"src": "6495:67:27"
}
],
"functionName": {
"name": "sstore",
"nativeSrc": "6482:6:27",
"nodeType": "YulIdentifier",
"src": "6482:6:27"
},
"nativeSrc": "6482:81:27",
"nodeType": "YulFunctionCall",
"src": "6482:81:27"
},
"nativeSrc": "6482:81:27",
"nodeType": "YulExpressionStatement",
"src": "6482:81:27"
}
]
},
"nativeSrc": "6343:230:27",
"nodeType": "YulCase",
"src": "6343:230:27",
"value": "default"
}
],
"expression": {
"arguments": [
{
"name": "newLen",
"nativeSrc": "5696:6:27",
"nodeType": "YulIdentifier",
"src": "5696:6:27"
},
{
"kind": "number",
"nativeSrc": "5704:2:27",
"nodeType": "YulLiteral",
"src": "5704:2:27",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "gt",
"nativeSrc": "5693:2:27",
"nodeType": "YulIdentifier",
"src": "5693:2:27"
},
"nativeSrc": "5693:14:27",
"nodeType": "YulFunctionCall",
"src": "5693:14:27"
},
"nativeSrc": "5686:887:27",
"nodeType": "YulSwitch",
"src": "5686:887:27"
}
]
},
"name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage",
"nativeSrc": "5184:1395:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "slot",
"nativeSrc": "5265:4:27",
"nodeType": "YulTypedName",
"src": "5265:4:27",
"type": ""
},
{
"name": "src",
"nativeSrc": "5271:3:27",
"nodeType": "YulTypedName",
"src": "5271:3:27",
"type": ""
}
],
"src": "5184:1395:27"
},
{
"body": {
"nativeSrc": "6681:73:27",
"nodeType": "YulBlock",
"src": "6681:73:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "6698:3:27",
"nodeType": "YulIdentifier",
"src": "6698:3:27"
},
{
"name": "length",
"nativeSrc": "6703:6:27",
"nodeType": "YulIdentifier",
"src": "6703:6:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6691:6:27",
"nodeType": "YulIdentifier",
"src": "6691:6:27"
},
"nativeSrc": "6691:19:27",
"nodeType": "YulFunctionCall",
"src": "6691:19:27"
},
"nativeSrc": "6691:19:27",
"nodeType": "YulExpressionStatement",
"src": "6691:19:27"
},
{
"nativeSrc": "6719:29:27",
"nodeType": "YulAssignment",
"src": "6719:29:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "6738:3:27",
"nodeType": "YulIdentifier",
"src": "6738:3:27"
},
{
"kind": "number",
"nativeSrc": "6743:4:27",
"nodeType": "YulLiteral",
"src": "6743:4:27",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6734:3:27",
"nodeType": "YulIdentifier",
"src": "6734:3:27"
},
"nativeSrc": "6734:14:27",
"nodeType": "YulFunctionCall",
"src": "6734:14:27"
},
"variableNames": [
{
"name": "updated_pos",
"nativeSrc": "6719:11:27",
"nodeType": "YulIdentifier",
"src": "6719:11:27"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "6585:169:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "6653:3:27",
"nodeType": "YulTypedName",
"src": "6653:3:27",
"type": ""
},
{
"name": "length",
"nativeSrc": "6658:6:27",
"nodeType": "YulTypedName",
"src": "6658:6:27",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nativeSrc": "6669:11:27",
"nodeType": "YulTypedName",
"src": "6669:11:27",
"type": ""
}
],
"src": "6585:169:27"
},
{
"body": {
"nativeSrc": "6866:58:27",
"nodeType": "YulBlock",
"src": "6866:58:27",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nativeSrc": "6888:6:27",
"nodeType": "YulIdentifier",
"src": "6888:6:27"
},
{
"kind": "number",
"nativeSrc": "6896:1:27",
"nodeType": "YulLiteral",
"src": "6896:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "6884:3:27",
"nodeType": "YulIdentifier",
"src": "6884:3:27"
},
"nativeSrc": "6884:14:27",
"nodeType": "YulFunctionCall",
"src": "6884:14:27"
},
{
"hexValue": "4d696e746572206973207a65726f",
"kind": "string",
"nativeSrc": "6900:16:27",
"nodeType": "YulLiteral",
"src": "6900:16:27",
"type": "",
"value": "Minter is zero"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "6877:6:27",
"nodeType": "YulIdentifier",
"src": "6877:6:27"
},
"nativeSrc": "6877:40:27",
"nodeType": "YulFunctionCall",
"src": "6877:40:27"
},
"nativeSrc": "6877:40:27",
"nodeType": "YulExpressionStatement",
"src": "6877:40:27"
}
]
},
"name": "store_literal_in_memory_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21",
"nativeSrc": "6760:164:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nativeSrc": "6858:6:27",
"nodeType": "YulTypedName",
"src": "6858:6:27",
"type": ""
}
],
"src": "6760:164:27"
},
{
"body": {
"nativeSrc": "7076:220:27",
"nodeType": "YulBlock",
"src": "7076:220:27",
"statements": [
{
"nativeSrc": "7086:74:27",
"nodeType": "YulAssignment",
"src": "7086:74:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "7152:3:27",
"nodeType": "YulIdentifier",
"src": "7152:3:27"
},
{
"kind": "number",
"nativeSrc": "7157:2:27",
"nodeType": "YulLiteral",
"src": "7157:2:27",
"type": "",
"value": "14"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "7093:58:27",
"nodeType": "YulIdentifier",
"src": "7093:58:27"
},
"nativeSrc": "7093:67:27",
"nodeType": "YulFunctionCall",
"src": "7093:67:27"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "7086:3:27",
"nodeType": "YulIdentifier",
"src": "7086:3:27"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "7258:3:27",
"nodeType": "YulIdentifier",
"src": "7258:3:27"
}
],
"functionName": {
"name": "store_literal_in_memory_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21",
"nativeSrc": "7169:88:27",
"nodeType": "YulIdentifier",
"src": "7169:88:27"
},
"nativeSrc": "7169:93:27",
"nodeType": "YulFunctionCall",
"src": "7169:93:27"
},
"nativeSrc": "7169:93:27",
"nodeType": "YulExpressionStatement",
"src": "7169:93:27"
},
{
"nativeSrc": "7271:19:27",
"nodeType": "YulAssignment",
"src": "7271:19:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "7282:3:27",
"nodeType": "YulIdentifier",
"src": "7282:3:27"
},
{
"kind": "number",
"nativeSrc": "7287:2:27",
"nodeType": "YulLiteral",
"src": "7287:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7278:3:27",
"nodeType": "YulIdentifier",
"src": "7278:3:27"
},
"nativeSrc": "7278:12:27",
"nodeType": "YulFunctionCall",
"src": "7278:12:27"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "7271:3:27",
"nodeType": "YulIdentifier",
"src": "7271:3:27"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21_to_t_string_memory_ptr_fromStack",
"nativeSrc": "6930:366:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "7064:3:27",
"nodeType": "YulTypedName",
"src": "7064:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "7072:3:27",
"nodeType": "YulTypedName",
"src": "7072:3:27",
"type": ""
}
],
"src": "6930:366:27"
},
{
"body": {
"nativeSrc": "7473:248:27",
"nodeType": "YulBlock",
"src": "7473:248:27",
"statements": [
{
"nativeSrc": "7483:26:27",
"nodeType": "YulAssignment",
"src": "7483:26:27",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "7495:9:27",
"nodeType": "YulIdentifier",
"src": "7495:9:27"
},
{
"kind": "number",
"nativeSrc": "7506:2:27",
"nodeType": "YulLiteral",
"src": "7506:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7491:3:27",
"nodeType": "YulIdentifier",
"src": "7491:3:27"
},
"nativeSrc": "7491:18:27",
"nodeType": "YulFunctionCall",
"src": "7491:18:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "7483:4:27",
"nodeType": "YulIdentifier",
"src": "7483:4:27"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "7530:9:27",
"nodeType": "YulIdentifier",
"src": "7530:9:27"
},
{
"kind": "number",
"nativeSrc": "7541:1:27",
"nodeType": "YulLiteral",
"src": "7541:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7526:3:27",
"nodeType": "YulIdentifier",
"src": "7526:3:27"
},
"nativeSrc": "7526:17:27",
"nodeType": "YulFunctionCall",
"src": "7526:17:27"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "7549:4:27",
"nodeType": "YulIdentifier",
"src": "7549:4:27"
},
{
"name": "headStart",
"nativeSrc": "7555:9:27",
"nodeType": "YulIdentifier",
"src": "7555:9:27"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "7545:3:27",
"nodeType": "YulIdentifier",
"src": "7545:3:27"
},
"nativeSrc": "7545:20:27",
"nodeType": "YulFunctionCall",
"src": "7545:20:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "7519:6:27",
"nodeType": "YulIdentifier",
"src": "7519:6:27"
},
"nativeSrc": "7519:47:27",
"nodeType": "YulFunctionCall",
"src": "7519:47:27"
},
"nativeSrc": "7519:47:27",
"nodeType": "YulExpressionStatement",
"src": "7519:47:27"
},
{
"nativeSrc": "7575:139:27",
"nodeType": "YulAssignment",
"src": "7575:139:27",
"value": {
"arguments": [
{
"name": "tail",
"nativeSrc": "7709:4:27",
"nodeType": "YulIdentifier",
"src": "7709:4:27"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21_to_t_string_memory_ptr_fromStack",
"nativeSrc": "7583:124:27",
"nodeType": "YulIdentifier",
"src": "7583:124:27"
},
"nativeSrc": "7583:131:27",
"nodeType": "YulFunctionCall",
"src": "7583:131:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "7575:4:27",
"nodeType": "YulIdentifier",
"src": "7575:4:27"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "7302:419:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "7453:9:27",
"nodeType": "YulTypedName",
"src": "7453:9:27",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "7468:4:27",
"nodeType": "YulTypedName",
"src": "7468:4:27",
"type": ""
}
],
"src": "7302:419:27"
},
{
"body": {
"nativeSrc": "7833:57:27",
"nodeType": "YulBlock",
"src": "7833:57:27",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nativeSrc": "7855:6:27",
"nodeType": "YulIdentifier",
"src": "7855:6:27"
},
{
"kind": "number",
"nativeSrc": "7863:1:27",
"nodeType": "YulLiteral",
"src": "7863:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "7851:3:27",
"nodeType": "YulIdentifier",
"src": "7851:3:27"
},
"nativeSrc": "7851:14:27",
"nodeType": "YulFunctionCall",
"src": "7851:14:27"
},
{
"hexValue": "53746f7265206973207a65726f",
"kind": "string",
"nativeSrc": "7867:15:27",
"nodeType": "YulLiteral",
"src": "7867:15:27",
"type": "",
"value": "Store is zero"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "7844:6:27",
"nodeType": "YulIdentifier",
"src": "7844:6:27"
},
"nativeSrc": "7844:39:27",
"nodeType": "YulFunctionCall",
"src": "7844:39:27"
},
"nativeSrc": "7844:39:27",
"nodeType": "YulExpressionStatement",
"src": "7844:39:27"
}
]
},
"name": "store_literal_in_memory_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0",
"nativeSrc": "7727:163:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nativeSrc": "7825:6:27",
"nodeType": "YulTypedName",
"src": "7825:6:27",
"type": ""
}
],
"src": "7727:163:27"
},
{
"body": {
"nativeSrc": "8042:220:27",
"nodeType": "YulBlock",
"src": "8042:220:27",
"statements": [
{
"nativeSrc": "8052:74:27",
"nodeType": "YulAssignment",
"src": "8052:74:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "8118:3:27",
"nodeType": "YulIdentifier",
"src": "8118:3:27"
},
{
"kind": "number",
"nativeSrc": "8123:2:27",
"nodeType": "YulLiteral",
"src": "8123:2:27",
"type": "",
"value": "13"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "8059:58:27",
"nodeType": "YulIdentifier",
"src": "8059:58:27"
},
"nativeSrc": "8059:67:27",
"nodeType": "YulFunctionCall",
"src": "8059:67:27"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "8052:3:27",
"nodeType": "YulIdentifier",
"src": "8052:3:27"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "8224:3:27",
"nodeType": "YulIdentifier",
"src": "8224:3:27"
}
],
"functionName": {
"name": "store_literal_in_memory_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0",
"nativeSrc": "8135:88:27",
"nodeType": "YulIdentifier",
"src": "8135:88:27"
},
"nativeSrc": "8135:93:27",
"nodeType": "YulFunctionCall",
"src": "8135:93:27"
},
"nativeSrc": "8135:93:27",
"nodeType": "YulExpressionStatement",
"src": "8135:93:27"
},
{
"nativeSrc": "8237:19:27",
"nodeType": "YulAssignment",
"src": "8237:19:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "8248:3:27",
"nodeType": "YulIdentifier",
"src": "8248:3:27"
},
{
"kind": "number",
"nativeSrc": "8253:2:27",
"nodeType": "YulLiteral",
"src": "8253:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8244:3:27",
"nodeType": "YulIdentifier",
"src": "8244:3:27"
},
"nativeSrc": "8244:12:27",
"nodeType": "YulFunctionCall",
"src": "8244:12:27"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "8237:3:27",
"nodeType": "YulIdentifier",
"src": "8237:3:27"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0_to_t_string_memory_ptr_fromStack",
"nativeSrc": "7896:366:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nativeSrc": "8030:3:27",
"nodeType": "YulTypedName",
"src": "8030:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "8038:3:27",
"nodeType": "YulTypedName",
"src": "8038:3:27",
"type": ""
}
],
"src": "7896:366:27"
},
{
"body": {
"nativeSrc": "8439:248:27",
"nodeType": "YulBlock",
"src": "8439:248:27",
"statements": [
{
"nativeSrc": "8449:26:27",
"nodeType": "YulAssignment",
"src": "8449:26:27",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "8461:9:27",
"nodeType": "YulIdentifier",
"src": "8461:9:27"
},
{
"kind": "number",
"nativeSrc": "8472:2:27",
"nodeType": "YulLiteral",
"src": "8472:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8457:3:27",
"nodeType": "YulIdentifier",
"src": "8457:3:27"
},
"nativeSrc": "8457:18:27",
"nodeType": "YulFunctionCall",
"src": "8457:18:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "8449:4:27",
"nodeType": "YulIdentifier",
"src": "8449:4:27"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "8496:9:27",
"nodeType": "YulIdentifier",
"src": "8496:9:27"
},
{
"kind": "number",
"nativeSrc": "8507:1:27",
"nodeType": "YulLiteral",
"src": "8507:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "8492:3:27",
"nodeType": "YulIdentifier",
"src": "8492:3:27"
},
"nativeSrc": "8492:17:27",
"nodeType": "YulFunctionCall",
"src": "8492:17:27"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "8515:4:27",
"nodeType": "YulIdentifier",
"src": "8515:4:27"
},
{
"name": "headStart",
"nativeSrc": "8521:9:27",
"nodeType": "YulIdentifier",
"src": "8521:9:27"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "8511:3:27",
"nodeType": "YulIdentifier",
"src": "8511:3:27"
},
"nativeSrc": "8511:20:27",
"nodeType": "YulFunctionCall",
"src": "8511:20:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "8485:6:27",
"nodeType": "YulIdentifier",
"src": "8485:6:27"
},
"nativeSrc": "8485:47:27",
"nodeType": "YulFunctionCall",
"src": "8485:47:27"
},
"nativeSrc": "8485:47:27",
"nodeType": "YulExpressionStatement",
"src": "8485:47:27"
},
{
"nativeSrc": "8541:139:27",
"nodeType": "YulAssignment",
"src": "8541:139:27",
"value": {
"arguments": [
{
"name": "tail",
"nativeSrc": "8675:4:27",
"nodeType": "YulIdentifier",
"src": "8675:4:27"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0_to_t_string_memory_ptr_fromStack",
"nativeSrc": "8549:124:27",
"nodeType": "YulIdentifier",
"src": "8549:124:27"
},
"nativeSrc": "8549:131:27",
"nodeType": "YulFunctionCall",
"src": "8549:131:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "8541:4:27",
"nodeType": "YulIdentifier",
"src": "8541:4:27"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "8268:419:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "8419:9:27",
"nodeType": "YulTypedName",
"src": "8419:9:27",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "8434:4:27",
"nodeType": "YulTypedName",
"src": "8434:4:27",
"type": ""
}
],
"src": "8268:419:27"
},
{
"body": {
"nativeSrc": "8738:32:27",
"nodeType": "YulBlock",
"src": "8738:32:27",
"statements": [
{
"nativeSrc": "8748:16:27",
"nodeType": "YulAssignment",
"src": "8748:16:27",
"value": {
"name": "value",
"nativeSrc": "8759:5:27",
"nodeType": "YulIdentifier",
"src": "8759:5:27"
},
"variableNames": [
{
"name": "cleaned",
"nativeSrc": "8748:7:27",
"nodeType": "YulIdentifier",
"src": "8748:7:27"
}
]
}
]
},
"name": "cleanup_t_bytes32",
"nativeSrc": "8693:77:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "8720:5:27",
"nodeType": "YulTypedName",
"src": "8720:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nativeSrc": "8730:7:27",
"nodeType": "YulTypedName",
"src": "8730:7:27",
"type": ""
}
],
"src": "8693:77:27"
},
{
"body": {
"nativeSrc": "8841:53:27",
"nodeType": "YulBlock",
"src": "8841:53:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "8858:3:27",
"nodeType": "YulIdentifier",
"src": "8858:3:27"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "8881:5:27",
"nodeType": "YulIdentifier",
"src": "8881:5:27"
}
],
"functionName": {
"name": "cleanup_t_bytes32",
"nativeSrc": "8863:17:27",
"nodeType": "YulIdentifier",
"src": "8863:17:27"
},
"nativeSrc": "8863:24:27",
"nodeType": "YulFunctionCall",
"src": "8863:24:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "8851:6:27",
"nodeType": "YulIdentifier",
"src": "8851:6:27"
},
"nativeSrc": "8851:37:27",
"nodeType": "YulFunctionCall",
"src": "8851:37:27"
},
"nativeSrc": "8851:37:27",
"nodeType": "YulExpressionStatement",
"src": "8851:37:27"
}
]
},
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nativeSrc": "8776:118:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "8829:5:27",
"nodeType": "YulTypedName",
"src": "8829:5:27",
"type": ""
},
{
"name": "pos",
"nativeSrc": "8836:3:27",
"nodeType": "YulTypedName",
"src": "8836:3:27",
"type": ""
}
],
"src": "8776:118:27"
},
{
"body": {
"nativeSrc": "8965:53:27",
"nodeType": "YulBlock",
"src": "8965:53:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "8982:3:27",
"nodeType": "YulIdentifier",
"src": "8982:3:27"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "9005:5:27",
"nodeType": "YulIdentifier",
"src": "9005:5:27"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nativeSrc": "8987:17:27",
"nodeType": "YulIdentifier",
"src": "8987:17:27"
},
"nativeSrc": "8987:24:27",
"nodeType": "YulFunctionCall",
"src": "8987:24:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "8975:6:27",
"nodeType": "YulIdentifier",
"src": "8975:6:27"
},
"nativeSrc": "8975:37:27",
"nodeType": "YulFunctionCall",
"src": "8975:37:27"
},
"nativeSrc": "8975:37:27",
"nodeType": "YulExpressionStatement",
"src": "8975:37:27"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "8900:118:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "8953:5:27",
"nodeType": "YulTypedName",
"src": "8953:5:27",
"type": ""
},
{
"name": "pos",
"nativeSrc": "8960:3:27",
"nodeType": "YulTypedName",
"src": "8960:3:27",
"type": ""
}
],
"src": "8900:118:27"
},
{
"body": {
"nativeSrc": "9089:53:27",
"nodeType": "YulBlock",
"src": "9089:53:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nativeSrc": "9106:3:27",
"nodeType": "YulIdentifier",
"src": "9106:3:27"
},
{
"arguments": [
{
"name": "value",
"nativeSrc": "9129:5:27",
"nodeType": "YulIdentifier",
"src": "9129:5:27"
}
],
"functionName": {
"name": "cleanup_t_address",
"nativeSrc": "9111:17:27",
"nodeType": "YulIdentifier",
"src": "9111:17:27"
},
"nativeSrc": "9111:24:27",
"nodeType": "YulFunctionCall",
"src": "9111:24:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "9099:6:27",
"nodeType": "YulIdentifier",
"src": "9099:6:27"
},
"nativeSrc": "9099:37:27",
"nodeType": "YulFunctionCall",
"src": "9099:37:27"
},
"nativeSrc": "9099:37:27",
"nodeType": "YulExpressionStatement",
"src": "9099:37:27"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nativeSrc": "9024:118:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "9077:5:27",
"nodeType": "YulTypedName",
"src": "9077:5:27",
"type": ""
},
{
"name": "pos",
"nativeSrc": "9084:3:27",
"nodeType": "YulTypedName",
"src": "9084:3:27",
"type": ""
}
],
"src": "9024:118:27"
},
{
"body": {
"nativeSrc": "9358:454:27",
"nodeType": "YulBlock",
"src": "9358:454:27",
"statements": [
{
"nativeSrc": "9368:27:27",
"nodeType": "YulAssignment",
"src": "9368:27:27",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "9380:9:27",
"nodeType": "YulIdentifier",
"src": "9380:9:27"
},
{
"kind": "number",
"nativeSrc": "9391:3:27",
"nodeType": "YulLiteral",
"src": "9391:3:27",
"type": "",
"value": "160"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9376:3:27",
"nodeType": "YulIdentifier",
"src": "9376:3:27"
},
"nativeSrc": "9376:19:27",
"nodeType": "YulFunctionCall",
"src": "9376:19:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "9368:4:27",
"nodeType": "YulIdentifier",
"src": "9368:4:27"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nativeSrc": "9449:6:27",
"nodeType": "YulIdentifier",
"src": "9449:6:27"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "9462:9:27",
"nodeType": "YulIdentifier",
"src": "9462:9:27"
},
{
"kind": "number",
"nativeSrc": "9473:1:27",
"nodeType": "YulLiteral",
"src": "9473:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9458:3:27",
"nodeType": "YulIdentifier",
"src": "9458:3:27"
},
"nativeSrc": "9458:17:27",
"nodeType": "YulFunctionCall",
"src": "9458:17:27"
}
],
"functionName": {
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nativeSrc": "9405:43:27",
"nodeType": "YulIdentifier",
"src": "9405:43:27"
},
"nativeSrc": "9405:71:27",
"nodeType": "YulFunctionCall",
"src": "9405:71:27"
},
"nativeSrc": "9405:71:27",
"nodeType": "YulExpressionStatement",
"src": "9405:71:27"
},
{
"expression": {
"arguments": [
{
"name": "value1",
"nativeSrc": "9530:6:27",
"nodeType": "YulIdentifier",
"src": "9530:6:27"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "9543:9:27",
"nodeType": "YulIdentifier",
"src": "9543:9:27"
},
{
"kind": "number",
"nativeSrc": "9554:2:27",
"nodeType": "YulLiteral",
"src": "9554:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9539:3:27",
"nodeType": "YulIdentifier",
"src": "9539:3:27"
},
"nativeSrc": "9539:18:27",
"nodeType": "YulFunctionCall",
"src": "9539:18:27"
}
],
"functionName": {
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nativeSrc": "9486:43:27",
"nodeType": "YulIdentifier",
"src": "9486:43:27"
},
"nativeSrc": "9486:72:27",
"nodeType": "YulFunctionCall",
"src": "9486:72:27"
},
"nativeSrc": "9486:72:27",
"nodeType": "YulExpressionStatement",
"src": "9486:72:27"
},
{
"expression": {
"arguments": [
{
"name": "value2",
"nativeSrc": "9612:6:27",
"nodeType": "YulIdentifier",
"src": "9612:6:27"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "9625:9:27",
"nodeType": "YulIdentifier",
"src": "9625:9:27"
},
{
"kind": "number",
"nativeSrc": "9636:2:27",
"nodeType": "YulLiteral",
"src": "9636:2:27",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9621:3:27",
"nodeType": "YulIdentifier",
"src": "9621:3:27"
},
"nativeSrc": "9621:18:27",
"nodeType": "YulFunctionCall",
"src": "9621:18:27"
}
],
"functionName": {
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nativeSrc": "9568:43:27",
"nodeType": "YulIdentifier",
"src": "9568:43:27"
},
"nativeSrc": "9568:72:27",
"nodeType": "YulFunctionCall",
"src": "9568:72:27"
},
"nativeSrc": "9568:72:27",
"nodeType": "YulExpressionStatement",
"src": "9568:72:27"
},
{
"expression": {
"arguments": [
{
"name": "value3",
"nativeSrc": "9694:6:27",
"nodeType": "YulIdentifier",
"src": "9694:6:27"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "9707:9:27",
"nodeType": "YulIdentifier",
"src": "9707:9:27"
},
{
"kind": "number",
"nativeSrc": "9718:2:27",
"nodeType": "YulLiteral",
"src": "9718:2:27",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9703:3:27",
"nodeType": "YulIdentifier",
"src": "9703:3:27"
},
"nativeSrc": "9703:18:27",
"nodeType": "YulFunctionCall",
"src": "9703:18:27"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nativeSrc": "9650:43:27",
"nodeType": "YulIdentifier",
"src": "9650:43:27"
},
"nativeSrc": "9650:72:27",
"nodeType": "YulFunctionCall",
"src": "9650:72:27"
},
"nativeSrc": "9650:72:27",
"nodeType": "YulExpressionStatement",
"src": "9650:72:27"
},
{
"expression": {
"arguments": [
{
"name": "value4",
"nativeSrc": "9776:6:27",
"nodeType": "YulIdentifier",
"src": "9776:6:27"
},
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "9789:9:27",
"nodeType": "YulIdentifier",
"src": "9789:9:27"
},
{
"kind": "number",
"nativeSrc": "9800:3:27",
"nodeType": "YulLiteral",
"src": "9800:3:27",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9785:3:27",
"nodeType": "YulIdentifier",
"src": "9785:3:27"
},
"nativeSrc": "9785:19:27",
"nodeType": "YulFunctionCall",
"src": "9785:19:27"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nativeSrc": "9732:43:27",
"nodeType": "YulIdentifier",
"src": "9732:43:27"
},
"nativeSrc": "9732:73:27",
"nodeType": "YulFunctionCall",
"src": "9732:73:27"
},
"nativeSrc": "9732:73:27",
"nodeType": "YulExpressionStatement",
"src": "9732:73:27"
}
]
},
"name": "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed",
"nativeSrc": "9148:664:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "9298:9:27",
"nodeType": "YulTypedName",
"src": "9298:9:27",
"type": ""
},
{
"name": "value4",
"nativeSrc": "9310:6:27",
"nodeType": "YulTypedName",
"src": "9310:6:27",
"type": ""
},
{
"name": "value3",
"nativeSrc": "9318:6:27",
"nodeType": "YulTypedName",
"src": "9318:6:27",
"type": ""
},
{
"name": "value2",
"nativeSrc": "9326:6:27",
"nodeType": "YulTypedName",
"src": "9326:6:27",
"type": ""
},
{
"name": "value1",
"nativeSrc": "9334:6:27",
"nodeType": "YulTypedName",
"src": "9334:6:27",
"type": ""
},
{
"name": "value0",
"nativeSrc": "9342:6:27",
"nodeType": "YulTypedName",
"src": "9342:6:27",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "9353:4:27",
"nodeType": "YulTypedName",
"src": "9353:4:27",
"type": ""
}
],
"src": "9148:664:27"
},
{
"body": {
"nativeSrc": "9880:77:27",
"nodeType": "YulBlock",
"src": "9880:77:27",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nativeSrc": "9897:3:27",
"nodeType": "YulIdentifier",
"src": "9897:3:27"
},
{
"name": "src",
"nativeSrc": "9902:3:27",
"nodeType": "YulIdentifier",
"src": "9902:3:27"
},
{
"name": "length",
"nativeSrc": "9907:6:27",
"nodeType": "YulIdentifier",
"src": "9907:6:27"
}
],
"functionName": {
"name": "mcopy",
"nativeSrc": "9891:5:27",
"nodeType": "YulIdentifier",
"src": "9891:5:27"
},
"nativeSrc": "9891:23:27",
"nodeType": "YulFunctionCall",
"src": "9891:23:27"
},
"nativeSrc": "9891:23:27",
"nodeType": "YulExpressionStatement",
"src": "9891:23:27"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nativeSrc": "9934:3:27",
"nodeType": "YulIdentifier",
"src": "9934:3:27"
},
{
"name": "length",
"nativeSrc": "9939:6:27",
"nodeType": "YulIdentifier",
"src": "9939:6:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "9930:3:27",
"nodeType": "YulIdentifier",
"src": "9930:3:27"
},
"nativeSrc": "9930:16:27",
"nodeType": "YulFunctionCall",
"src": "9930:16:27"
},
{
"kind": "number",
"nativeSrc": "9948:1:27",
"nodeType": "YulLiteral",
"src": "9948:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "9923:6:27",
"nodeType": "YulIdentifier",
"src": "9923:6:27"
},
"nativeSrc": "9923:27:27",
"nodeType": "YulFunctionCall",
"src": "9923:27:27"
},
"nativeSrc": "9923:27:27",
"nodeType": "YulExpressionStatement",
"src": "9923:27:27"
}
]
},
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "9818:139:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nativeSrc": "9862:3:27",
"nodeType": "YulTypedName",
"src": "9862:3:27",
"type": ""
},
{
"name": "dst",
"nativeSrc": "9867:3:27",
"nodeType": "YulTypedName",
"src": "9867:3:27",
"type": ""
},
{
"name": "length",
"nativeSrc": "9872:6:27",
"nodeType": "YulTypedName",
"src": "9872:6:27",
"type": ""
}
],
"src": "9818:139:27"
},
{
"body": {
"nativeSrc": "10011:54:27",
"nodeType": "YulBlock",
"src": "10011:54:27",
"statements": [
{
"nativeSrc": "10021:38:27",
"nodeType": "YulAssignment",
"src": "10021:38:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "10039:5:27",
"nodeType": "YulIdentifier",
"src": "10039:5:27"
},
{
"kind": "number",
"nativeSrc": "10046:2:27",
"nodeType": "YulLiteral",
"src": "10046:2:27",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10035:3:27",
"nodeType": "YulIdentifier",
"src": "10035:3:27"
},
"nativeSrc": "10035:14:27",
"nodeType": "YulFunctionCall",
"src": "10035:14:27"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "10055:2:27",
"nodeType": "YulLiteral",
"src": "10055:2:27",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nativeSrc": "10051:3:27",
"nodeType": "YulIdentifier",
"src": "10051:3:27"
},
"nativeSrc": "10051:7:27",
"nodeType": "YulFunctionCall",
"src": "10051:7:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "10031:3:27",
"nodeType": "YulIdentifier",
"src": "10031:3:27"
},
"nativeSrc": "10031:28:27",
"nodeType": "YulFunctionCall",
"src": "10031:28:27"
},
"variableNames": [
{
"name": "result",
"nativeSrc": "10021:6:27",
"nodeType": "YulIdentifier",
"src": "10021:6:27"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nativeSrc": "9963:102:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "9994:5:27",
"nodeType": "YulTypedName",
"src": "9994:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nativeSrc": "10004:6:27",
"nodeType": "YulTypedName",
"src": "10004:6:27",
"type": ""
}
],
"src": "9963:102:27"
},
{
"body": {
"nativeSrc": "10163:285:27",
"nodeType": "YulBlock",
"src": "10163:285:27",
"statements": [
{
"nativeSrc": "10173:53:27",
"nodeType": "YulVariableDeclaration",
"src": "10173:53:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "10220:5:27",
"nodeType": "YulIdentifier",
"src": "10220:5:27"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nativeSrc": "10187:32:27",
"nodeType": "YulIdentifier",
"src": "10187:32:27"
},
"nativeSrc": "10187:39:27",
"nodeType": "YulFunctionCall",
"src": "10187:39:27"
},
"variables": [
{
"name": "length",
"nativeSrc": "10177:6:27",
"nodeType": "YulTypedName",
"src": "10177:6:27",
"type": ""
}
]
},
{
"nativeSrc": "10235:78:27",
"nodeType": "YulAssignment",
"src": "10235:78:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "10301:3:27",
"nodeType": "YulIdentifier",
"src": "10301:3:27"
},
{
"name": "length",
"nativeSrc": "10306:6:27",
"nodeType": "YulIdentifier",
"src": "10306:6:27"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nativeSrc": "10242:58:27",
"nodeType": "YulIdentifier",
"src": "10242:58:27"
},
"nativeSrc": "10242:71:27",
"nodeType": "YulFunctionCall",
"src": "10242:71:27"
},
"variableNames": [
{
"name": "pos",
"nativeSrc": "10235:3:27",
"nodeType": "YulIdentifier",
"src": "10235:3:27"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nativeSrc": "10361:5:27",
"nodeType": "YulIdentifier",
"src": "10361:5:27"
},
{
"kind": "number",
"nativeSrc": "10368:4:27",
"nodeType": "YulLiteral",
"src": "10368:4:27",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10357:3:27",
"nodeType": "YulIdentifier",
"src": "10357:3:27"
},
"nativeSrc": "10357:16:27",
"nodeType": "YulFunctionCall",
"src": "10357:16:27"
},
{
"name": "pos",
"nativeSrc": "10375:3:27",
"nodeType": "YulIdentifier",
"src": "10375:3:27"
},
{
"name": "length",
"nativeSrc": "10380:6:27",
"nodeType": "YulIdentifier",
"src": "10380:6:27"
}
],
"functionName": {
"name": "copy_memory_to_memory_with_cleanup",
"nativeSrc": "10322:34:27",
"nodeType": "YulIdentifier",
"src": "10322:34:27"
},
"nativeSrc": "10322:65:27",
"nodeType": "YulFunctionCall",
"src": "10322:65:27"
},
"nativeSrc": "10322:65:27",
"nodeType": "YulExpressionStatement",
"src": "10322:65:27"
},
{
"nativeSrc": "10396:46:27",
"nodeType": "YulAssignment",
"src": "10396:46:27",
"value": {
"arguments": [
{
"name": "pos",
"nativeSrc": "10407:3:27",
"nodeType": "YulIdentifier",
"src": "10407:3:27"
},
{
"arguments": [
{
"name": "length",
"nativeSrc": "10434:6:27",
"nodeType": "YulIdentifier",
"src": "10434:6:27"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nativeSrc": "10412:21:27",
"nodeType": "YulIdentifier",
"src": "10412:21:27"
},
"nativeSrc": "10412:29:27",
"nodeType": "YulFunctionCall",
"src": "10412:29:27"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10403:3:27",
"nodeType": "YulIdentifier",
"src": "10403:3:27"
},
"nativeSrc": "10403:39:27",
"nodeType": "YulFunctionCall",
"src": "10403:39:27"
},
"variableNames": [
{
"name": "end",
"nativeSrc": "10396:3:27",
"nodeType": "YulIdentifier",
"src": "10396:3:27"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "10071:377:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "10144:5:27",
"nodeType": "YulTypedName",
"src": "10144:5:27",
"type": ""
},
{
"name": "pos",
"nativeSrc": "10151:3:27",
"nodeType": "YulTypedName",
"src": "10151:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nativeSrc": "10159:3:27",
"nodeType": "YulTypedName",
"src": "10159:3:27",
"type": ""
}
],
"src": "10071:377:27"
},
{
"body": {
"nativeSrc": "10572:195:27",
"nodeType": "YulBlock",
"src": "10572:195:27",
"statements": [
{
"nativeSrc": "10582:26:27",
"nodeType": "YulAssignment",
"src": "10582:26:27",
"value": {
"arguments": [
{
"name": "headStart",
"nativeSrc": "10594:9:27",
"nodeType": "YulIdentifier",
"src": "10594:9:27"
},
{
"kind": "number",
"nativeSrc": "10605:2:27",
"nodeType": "YulLiteral",
"src": "10605:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10590:3:27",
"nodeType": "YulIdentifier",
"src": "10590:3:27"
},
"nativeSrc": "10590:18:27",
"nodeType": "YulFunctionCall",
"src": "10590:18:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "10582:4:27",
"nodeType": "YulIdentifier",
"src": "10582:4:27"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nativeSrc": "10629:9:27",
"nodeType": "YulIdentifier",
"src": "10629:9:27"
},
{
"kind": "number",
"nativeSrc": "10640:1:27",
"nodeType": "YulLiteral",
"src": "10640:1:27",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10625:3:27",
"nodeType": "YulIdentifier",
"src": "10625:3:27"
},
"nativeSrc": "10625:17:27",
"nodeType": "YulFunctionCall",
"src": "10625:17:27"
},
{
"arguments": [
{
"name": "tail",
"nativeSrc": "10648:4:27",
"nodeType": "YulIdentifier",
"src": "10648:4:27"
},
{
"name": "headStart",
"nativeSrc": "10654:9:27",
"nodeType": "YulIdentifier",
"src": "10654:9:27"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "10644:3:27",
"nodeType": "YulIdentifier",
"src": "10644:3:27"
},
"nativeSrc": "10644:20:27",
"nodeType": "YulFunctionCall",
"src": "10644:20:27"
}
],
"functionName": {
"name": "mstore",
"nativeSrc": "10618:6:27",
"nodeType": "YulIdentifier",
"src": "10618:6:27"
},
"nativeSrc": "10618:47:27",
"nodeType": "YulFunctionCall",
"src": "10618:47:27"
},
"nativeSrc": "10618:47:27",
"nodeType": "YulExpressionStatement",
"src": "10618:47:27"
},
{
"nativeSrc": "10674:86:27",
"nodeType": "YulAssignment",
"src": "10674:86:27",
"value": {
"arguments": [
{
"name": "value0",
"nativeSrc": "10746:6:27",
"nodeType": "YulIdentifier",
"src": "10746:6:27"
},
{
"name": "tail",
"nativeSrc": "10755:4:27",
"nodeType": "YulIdentifier",
"src": "10755:4:27"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nativeSrc": "10682:63:27",
"nodeType": "YulIdentifier",
"src": "10682:63:27"
},
"nativeSrc": "10682:78:27",
"nodeType": "YulFunctionCall",
"src": "10682:78:27"
},
"variableNames": [
{
"name": "tail",
"nativeSrc": "10674:4:27",
"nodeType": "YulIdentifier",
"src": "10674:4:27"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nativeSrc": "10454:313:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nativeSrc": "10544:9:27",
"nodeType": "YulTypedName",
"src": "10544:9:27",
"type": ""
},
{
"name": "value0",
"nativeSrc": "10556:6:27",
"nodeType": "YulTypedName",
"src": "10556:6:27",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nativeSrc": "10567:4:27",
"nodeType": "YulTypedName",
"src": "10567:4:27",
"type": ""
}
],
"src": "10454:313:27"
},
{
"body": {
"nativeSrc": "10831:40:27",
"nodeType": "YulBlock",
"src": "10831:40:27",
"statements": [
{
"nativeSrc": "10842:22:27",
"nodeType": "YulAssignment",
"src": "10842:22:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "10858:5:27",
"nodeType": "YulIdentifier",
"src": "10858:5:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "10852:5:27",
"nodeType": "YulIdentifier",
"src": "10852:5:27"
},
"nativeSrc": "10852:12:27",
"nodeType": "YulFunctionCall",
"src": "10852:12:27"
},
"variableNames": [
{
"name": "length",
"nativeSrc": "10842:6:27",
"nodeType": "YulIdentifier",
"src": "10842:6:27"
}
]
}
]
},
"name": "array_length_t_bytes_memory_ptr",
"nativeSrc": "10773:98:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nativeSrc": "10814:5:27",
"nodeType": "YulTypedName",
"src": "10814:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nativeSrc": "10824:6:27",
"nodeType": "YulTypedName",
"src": "10824:6:27",
"type": ""
}
],
"src": "10773:98:27"
},
{
"body": {
"nativeSrc": "10933:60:27",
"nodeType": "YulBlock",
"src": "10933:60:27",
"statements": [
{
"nativeSrc": "10943:11:27",
"nodeType": "YulAssignment",
"src": "10943:11:27",
"value": {
"name": "ptr",
"nativeSrc": "10951:3:27",
"nodeType": "YulIdentifier",
"src": "10951:3:27"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "10943:4:27",
"nodeType": "YulIdentifier",
"src": "10943:4:27"
}
]
},
{
"nativeSrc": "10964:22:27",
"nodeType": "YulAssignment",
"src": "10964:22:27",
"value": {
"arguments": [
{
"name": "ptr",
"nativeSrc": "10976:3:27",
"nodeType": "YulIdentifier",
"src": "10976:3:27"
},
{
"kind": "number",
"nativeSrc": "10981:4:27",
"nodeType": "YulLiteral",
"src": "10981:4:27",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nativeSrc": "10972:3:27",
"nodeType": "YulIdentifier",
"src": "10972:3:27"
},
"nativeSrc": "10972:14:27",
"nodeType": "YulFunctionCall",
"src": "10972:14:27"
},
"variableNames": [
{
"name": "data",
"nativeSrc": "10964:4:27",
"nodeType": "YulIdentifier",
"src": "10964:4:27"
}
]
}
]
},
"name": "array_dataslot_t_bytes_memory_ptr",
"nativeSrc": "10877:116:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nativeSrc": "10920:3:27",
"nodeType": "YulTypedName",
"src": "10920:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "data",
"nativeSrc": "10928:4:27",
"nodeType": "YulTypedName",
"src": "10928:4:27",
"type": ""
}
],
"src": "10877:116:27"
},
{
"body": {
"nativeSrc": "11054:99:27",
"nodeType": "YulBlock",
"src": "11054:99:27",
"statements": [
{
"nativeSrc": "11065:42:27",
"nodeType": "YulVariableDeclaration",
"src": "11065:42:27",
"value": {
"arguments": [
{
"arguments": [
{
"name": "ptr",
"nativeSrc": "11102:3:27",
"nodeType": "YulIdentifier",
"src": "11102:3:27"
}
],
"functionName": {
"name": "mload",
"nativeSrc": "11096:5:27",
"nodeType": "YulIdentifier",
"src": "11096:5:27"
},
"nativeSrc": "11096:10:27",
"nodeType": "YulFunctionCall",
"src": "11096:10:27"
}
],
"functionName": {
"name": "cleanup_t_bytes32",
"nativeSrc": "11078:17:27",
"nodeType": "YulIdentifier",
"src": "11078:17:27"
},
"nativeSrc": "11078:29:27",
"nodeType": "YulFunctionCall",
"src": "11078:29:27"
},
"variables": [
{
"name": "value",
"nativeSrc": "11069:5:27",
"nodeType": "YulTypedName",
"src": "11069:5:27",
"type": ""
}
]
},
{
"nativeSrc": "11117:29:27",
"nodeType": "YulAssignment",
"src": "11117:29:27",
"value": {
"name": "value",
"nativeSrc": "11141:5:27",
"nodeType": "YulIdentifier",
"src": "11141:5:27"
},
"variableNames": [
{
"name": "returnValue",
"nativeSrc": "11117:11:27",
"nodeType": "YulIdentifier",
"src": "11117:11:27"
}
]
}
]
},
"name": "read_from_memoryt_bytes32",
"nativeSrc": "10999:154:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "ptr",
"nativeSrc": "11034:3:27",
"nodeType": "YulTypedName",
"src": "11034:3:27",
"type": ""
}
],
"returnVariables": [
{
"name": "returnValue",
"nativeSrc": "11042:11:27",
"nodeType": "YulTypedName",
"src": "11042:11:27",
"type": ""
}
],
"src": "10999:154:27"
},
{
"body": {
"nativeSrc": "11249:504:27",
"nodeType": "YulBlock",
"src": "11249:504:27",
"statements": [
{
"nativeSrc": "11260:52:27",
"nodeType": "YulVariableDeclaration",
"src": "11260:52:27",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "11306:5:27",
"nodeType": "YulIdentifier",
"src": "11306:5:27"
}
],
"functionName": {
"name": "array_length_t_bytes_memory_ptr",
"nativeSrc": "11274:31:27",
"nodeType": "YulIdentifier",
"src": "11274:31:27"
},
"nativeSrc": "11274:38:27",
"nodeType": "YulFunctionCall",
"src": "11274:38:27"
},
"variables": [
{
"name": "length",
"nativeSrc": "11264:6:27",
"nodeType": "YulTypedName",
"src": "11264:6:27",
"type": ""
}
]
},
{
"nativeSrc": "11321:21:27",
"nodeType": "YulVariableDeclaration",
"src": "11321:21:27",
"value": {
"name": "array",
"nativeSrc": "11337:5:27",
"nodeType": "YulIdentifier",
"src": "11337:5:27"
},
"variables": [
{
"name": "dataArea",
"nativeSrc": "11325:8:27",
"nodeType": "YulTypedName",
"src": "11325:8:27",
"type": ""
}
]
},
{
"nativeSrc": "11352:52:27",
"nodeType": "YulAssignment",
"src": "11352:52:27",
"value": {
"arguments": [
{
"name": "array",
"nativeSrc": "11398:5:27",
"nodeType": "YulIdentifier",
"src": "11398:5:27"
}
],
"functionName": {
"name": "array_dataslot_t_bytes_memory_ptr",
"nativeSrc": "11364:33:27",
"nodeType": "YulIdentifier",
"src": "11364:33:27"
},
"nativeSrc": "11364:40:27",
"nodeType": "YulFunctionCall",
"src": "11364:40:27"
},
"variableNames": [
{
"name": "dataArea",
"nativeSrc": "11352:8:27",
"nodeType": "YulIdentifier",
"src": "11352:8:27"
}
]
},
{
"nativeSrc": "11414:44:27",
"nodeType": "YulAssignment",
"src": "11414:44:27",
"value": {
"arguments": [
{
"name": "dataArea",
"nativeSrc": "11449:8:27",
"nodeType": "YulIdentifier",
"src": "11449:8:27"
}
],
"functionName": {
"name": "read_from_memoryt_bytes32",
"nativeSrc": "11423:25:27",
"nodeType": "YulIdentifier",
"src": "11423:25:27"
},
"nativeSrc": "11423:35:27",
"nodeType": "YulFunctionCall",
"src": "11423:35:27"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "11414:5:27",
"nodeType": "YulIdentifier",
"src": "11414:5:27"
}
]
},
{
"body": {
"nativeSrc": "11486:260:27",
"nodeType": "YulBlock",
"src": "11486:260:27",
"statements": [
{
"nativeSrc": "11500:236:27",
"nodeType": "YulAssignment",
"src": "11500:236:27",
"value": {
"arguments": [
{
"name": "value",
"nativeSrc": "11530:5:27",
"nodeType": "YulIdentifier",
"src": "11530:5:27"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nativeSrc": "11597:1:27",
"nodeType": "YulLiteral",
"src": "11597:1:27",
"type": "",
"value": "8"
},
{
"arguments": [
{
"kind": "number",
"nativeSrc": "11604:2:27",
"nodeType": "YulLiteral",
"src": "11604:2:27",
"type": "",
"value": "32"
},
{
"name": "length",
"nativeSrc": "11608:6:27",
"nodeType": "YulIdentifier",
"src": "11608:6:27"
}
],
"functionName": {
"name": "sub",
"nativeSrc": "11600:3:27",
"nodeType": "YulIdentifier",
"src": "11600:3:27"
},
"nativeSrc": "11600:15:27",
"nodeType": "YulFunctionCall",
"src": "11600:15:27"
}
],
"functionName": {
"name": "mul",
"nativeSrc": "11593:3:27",
"nodeType": "YulIdentifier",
"src": "11593:3:27"
},
"nativeSrc": "11593:23:27",
"nodeType": "YulFunctionCall",
"src": "11593:23:27"
},
{
"kind": "number",
"nativeSrc": "11638:66:27",
"nodeType": "YulLiteral",
"src": "11638:66:27",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "shift_left_dynamic",
"nativeSrc": "11553:18:27",
"nodeType": "YulIdentifier",
"src": "11553:18:27"
},
"nativeSrc": "11553:169:27",
"nodeType": "YulFunctionCall",
"src": "11553:169:27"
}
],
"functionName": {
"name": "and",
"nativeSrc": "11509:3:27",
"nodeType": "YulIdentifier",
"src": "11509:3:27"
},
"nativeSrc": "11509:227:27",
"nodeType": "YulFunctionCall",
"src": "11509:227:27"
},
"variableNames": [
{
"name": "value",
"nativeSrc": "11500:5:27",
"nodeType": "YulIdentifier",
"src": "11500:5:27"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "length",
"nativeSrc": "11474:6:27",
"nodeType": "YulIdentifier",
"src": "11474:6:27"
},
{
"kind": "number",
"nativeSrc": "11482:2:27",
"nodeType": "YulLiteral",
"src": "11482:2:27",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nativeSrc": "11471:2:27",
"nodeType": "YulIdentifier",
"src": "11471:2:27"
},
"nativeSrc": "11471:14:27",
"nodeType": "YulFunctionCall",
"src": "11471:14:27"
},
"nativeSrc": "11468:278:27",
"nodeType": "YulIf",
"src": "11468:278:27"
}
]
},
"name": "convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32",
"nativeSrc": "11159:594:27",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "array",
"nativeSrc": "11233:5:27",
"nodeType": "YulTypedName",
"src": "11233:5:27",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nativeSrc": "11243:5:27",
"nodeType": "YulTypedName",
"src": "11243:5:27",
"type": ""
}
],
"src": "11159:594:27"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_addresst_address_fromMemory(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function array_dataslot_t_string_storage(ptr) -> data {\n data := ptr\n\n mstore(0, ptr)\n data := keccak256(0, 0x20)\n\n }\n\n function divide_by_32_ceil(value) -> result {\n result := div(add(value, 31), 32)\n }\n\n function shift_left_dynamic(bits, value) -> newValue {\n newValue :=\n\n shl(bits, value)\n\n }\n\n function update_byte_slice_dynamic32(value, shiftBytes, toInsert) -> result {\n let shiftBits := mul(shiftBytes, 8)\n let mask := shift_left_dynamic(shiftBits, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n toInsert := shift_left_dynamic(shiftBits, toInsert)\n value := and(value, not(mask))\n result := or(value, and(toInsert, mask))\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function identity(value) -> ret {\n ret := value\n }\n\n function convert_t_uint256_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(identity(cleanup_t_uint256(value)))\n }\n\n function prepare_store_t_uint256(value) -> ret {\n ret := value\n }\n\n function update_storage_value_t_uint256_to_t_uint256(slot, offset, value_0) {\n let convertedValue_0 := convert_t_uint256_to_t_uint256(value_0)\n sstore(slot, update_byte_slice_dynamic32(sload(slot), offset, prepare_store_t_uint256(convertedValue_0)))\n }\n\n function zero_value_for_split_t_uint256() -> ret {\n ret := 0\n }\n\n function storage_set_to_zero_t_uint256(slot, offset) {\n let zero_0 := zero_value_for_split_t_uint256()\n update_storage_value_t_uint256_to_t_uint256(slot, offset, zero_0)\n }\n\n function clear_storage_range_t_bytes1(start, end) {\n for {} lt(start, end) { start := add(start, 1) }\n {\n storage_set_to_zero_t_uint256(start, 0)\n }\n }\n\n function clean_up_bytearray_end_slots_t_string_storage(array, len, startIndex) {\n\n if gt(len, 31) {\n let dataArea := array_dataslot_t_string_storage(array)\n let deleteStart := add(dataArea, divide_by_32_ceil(startIndex))\n // If we are clearing array to be short byte array, we want to clear only data starting from array data area.\n if lt(startIndex, 32) { deleteStart := dataArea }\n clear_storage_range_t_bytes1(deleteStart, add(dataArea, divide_by_32_ceil(len)))\n }\n\n }\n\n function shift_right_unsigned_dynamic(bits, value) -> newValue {\n newValue :=\n\n shr(bits, value)\n\n }\n\n function mask_bytes_dynamic(data, bytes) -> result {\n let mask := not(shift_right_unsigned_dynamic(mul(8, bytes), not(0)))\n result := and(data, mask)\n }\n function extract_used_part_and_set_length_of_short_byte_array(data, len) -> used {\n // we want to save only elements that are part of the array after resizing\n // others should be set to zero\n data := mask_bytes_dynamic(data, len)\n used := or(data, mul(2, len))\n }\n function copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage(slot, src) {\n\n let newLen := array_length_t_string_memory_ptr(src)\n // Make sure array length is sane\n if gt(newLen, 0xffffffffffffffff) { panic_error_0x41() }\n\n let oldLen := extract_byte_array_length(sload(slot))\n\n // potentially truncate data\n clean_up_bytearray_end_slots_t_string_storage(slot, oldLen, newLen)\n\n let srcOffset := 0\n\n srcOffset := 0x20\n\n switch gt(newLen, 31)\n case 1 {\n let loopEnd := and(newLen, not(0x1f))\n\n let dstPtr := array_dataslot_t_string_storage(slot)\n let i := 0\n for { } lt(i, loopEnd) { i := add(i, 0x20) } {\n sstore(dstPtr, mload(add(src, srcOffset)))\n dstPtr := add(dstPtr, 1)\n srcOffset := add(srcOffset, 32)\n }\n if lt(loopEnd, newLen) {\n let lastValue := mload(add(src, srcOffset))\n sstore(dstPtr, mask_bytes_dynamic(lastValue, and(newLen, 0x1f)))\n }\n sstore(slot, add(mul(newLen, 2), 1))\n }\n default {\n let value := 0\n if newLen {\n value := mload(add(src, srcOffset))\n }\n sstore(slot, extract_used_part_and_set_length_of_short_byte_array(value, newLen))\n }\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function store_literal_in_memory_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21(memPtr) {\n\n mstore(add(memPtr, 0), \"Minter is zero\")\n\n }\n\n function abi_encode_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 14)\n store_literal_in_memory_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_4e696f3a70b22e173a6fb86b1973d0430eb8acb15643212ba396ee1cea183a21_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0(memPtr) {\n\n mstore(add(memPtr, 0), \"Store is zero\")\n\n }\n\n function abi_encode_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 13)\n store_literal_in_memory_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_871da71a5e17a23242851930bb1756bb918aa6e3f7445891a7cfc34118365cf0_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function cleanup_t_bytes32(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_bytes32_to_t_bytes32_fromStack(value, pos) {\n mstore(pos, cleanup_t_bytes32(value))\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed(headStart , value4, value3, value2, value1, value0) -> tail {\n tail := add(headStart, 160)\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value1, add(headStart, 32))\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value2, add(headStart, 64))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value3, add(headStart, 96))\n\n abi_encode_t_address_to_t_address_fromStack(value4, add(headStart, 128))\n\n }\n\n function copy_memory_to_memory_with_cleanup(src, dst, length) {\n\n mcopy(dst, src, length)\n mstore(add(dst, length), 0)\n\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory_with_cleanup(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function array_length_t_bytes_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_dataslot_t_bytes_memory_ptr(ptr) -> data {\n data := ptr\n\n data := add(ptr, 0x20)\n\n }\n\n function read_from_memoryt_bytes32(ptr) -> returnValue {\n\n let value := cleanup_t_bytes32(mload(ptr))\n\n returnValue :=\n\n value\n\n }\n\n function convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32(array) -> value {\n\n let length := array_length_t_bytes_memory_ptr(array)\n let dataArea := array\n\n dataArea := array_dataslot_t_bytes_memory_ptr(array)\n\n value := read_from_memoryt_bytes32(dataArea)\n\n if lt(length, 32) {\n value := and(\n value,\n shift_left_dynamic(\n mul(8, sub(32, length)),\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n )\n )\n }\n\n }\n\n}\n",
"id": 27,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "6101a0604052348015610010575f5ffd5b5060405161467438038061467483398181016040528101906100329190610498565b6040518060400160405280601681526020017f446f6e6f7220476f7665726e616e636520546f6b656e00000000000000000000815250806040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506040518060400160405280601681526020017f446f6e6f7220476f7665726e616e636520546f6b656e000000000000000000008152506040518060400160405280600381526020017f4447540000000000000000000000000000000000000000000000000000000000815250816003908161011a9190610713565b50806004908161012a9190610713565b50505061014160058361032560201b90919060201c565b610120818152505061015d60068261032560201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a0818152505061019a61037260201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023d9061083c565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab906108a4565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166101608173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff166101808173ffffffffffffffffffffffffffffffffffffffff16815250505050610a52565b5f6020835110156103465761033f836103cc60201b60201c565b905061036c565b826103568361043160201b60201c565b5f0190816103649190610713565b5060ff5f1b90505b92915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016103b19594939291906108f8565b60405160208183030381529060405280519060200120905090565b5f5f829050601f8151111561041857826040517f305a27a900000000000000000000000000000000000000000000000000000000815260040161040f919061099f565b60405180910390fd5b805181610424906109ec565b5f1c175f1b915050919050565b5f819050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6104678261043e565b9050919050565b6104778161045d565b8114610481575f5ffd5b50565b5f815190506104928161046e565b92915050565b5f5f604083850312156104ae576104ad61043a565b5b5f6104bb85828601610484565b92505060206104cc85828601610484565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061055157607f821691505b6020821081036105645761056361050d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026105c67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261058b565b6105d0868361058b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61061461060f61060a846105e8565b6105f1565b6105e8565b9050919050565b5f819050919050565b61062d836105fa565b6106416106398261061b565b848454610597565b825550505050565b5f5f905090565b610658610649565b610663818484610624565b505050565b5b818110156106865761067b5f82610650565b600181019050610669565b5050565b601f8211156106cb5761069c8161056a565b6106a58461057c565b810160208510156106b4578190505b6106c86106c08561057c565b830182610668565b50505b505050565b5f82821c905092915050565b5f6106eb5f19846008026106d0565b1980831691505092915050565b5f61070383836106dc565b9150826002028217905092915050565b61071c826104d6565b67ffffffffffffffff811115610735576107346104e0565b5b61073f825461053a565b61074a82828561068a565b5f60209050601f83116001811461077b575f8415610769578287015190505b61077385826106f8565b8655506107da565b601f1984166107898661056a565b5f5b828110156107b05784890151825560018201915060208501945060208101905061078b565b868310156107cd57848901516107c9601f8916826106dc565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f4d696e746572206973207a65726f0000000000000000000000000000000000005f82015250565b5f610826600e836107e2565b9150610831826107f2565b602082019050919050565b5f6020820190508181035f8301526108538161081a565b9050919050565b7f53746f7265206973207a65726f000000000000000000000000000000000000005f82015250565b5f61088e600d836107e2565b91506108998261085a565b602082019050919050565b5f6020820190508181035f8301526108bb81610882565b9050919050565b5f819050919050565b6108d4816108c2565b82525050565b6108e3816105e8565b82525050565b6108f28161045d565b82525050565b5f60a08201905061090b5f8301886108cb565b61091860208301876108cb565b61092560408301866108cb565b61093260608301856108da565b61093f60808301846108e9565b9695505050505050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610971826104d6565b61097b81856107e2565b935061098b818560208601610949565b61099481610957565b840191505092915050565b5f6020820190508181035f8301526109b78184610967565b905092915050565b5f81519050919050565b5f819050602082019050919050565b5f6109e382516108c2565b80915050919050565b5f6109f6826109bf565b82610a00846109c9565b9050610a0b816109d8565b92506020821015610a4b57610a467fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080261058b565b831692505b5050919050565b60805160a05160c05160e0516101005161012051610140516101605161018051613ba8610acc5f395f81816107d80152610c6301525f818161063b015281816107490152610a3301525f61162a01525f6115ef01525f611a3201525f611a1101525f61115501525f6111ab01525f6111d40152613ba85ff3fe608060405234801561000f575f5ffd5b50600436106101a7575f3560e01c806370a08231116100f7578063975057e711610095578063c3cda5201161006f578063c3cda52014610511578063d505accf1461052d578063dd62ed3e14610549578063f1127ed814610579576101a7565b8063975057e7146104935780639ab24eb0146104b1578063a9059cbb146104e1576101a7565b806384b0196e116100d157806384b0196e146104035780638e539e8c1461042757806391ddadf41461045757806395d89b4114610475576101a7565b806370a082311461038757806379cc6790146103b75780637ecebe00146103d3576101a7565b80633644e515116101645780634bf5d7e91161013e5780634bf5d7e9146102ed578063587cde1e1461030b5780635c19a95c1461033b5780636fcfff4514610357576101a7565b80633644e515146102835780633a46b1a8146102a157806340c10f19146102d1576101a7565b806306fdde03146101ab57806307546172146101c9578063095ea7b3146101e757806318160ddd1461021757806323b872dd14610235578063313ce56714610265575b5f5ffd5b6101b36105a9565b6040516101c09190612d51565b60405180910390f35b6101d1610639565b6040516101de9190612db0565b60405180910390f35b61020160048036038101906101fc9190612e2a565b61065d565b60405161020e9190612e82565b60405180910390f35b61021f61067f565b60405161022c9190612eaa565b60405180910390f35b61024f600480360381019061024a9190612ec3565b610688565b60405161025c9190612e82565b60405180910390f35b61026d6106b6565b60405161027a9190612f2e565b60405180910390f35b61028b6106bd565b6040516102989190612f5f565b60405180910390f35b6102bb60048036038101906102b69190612e2a565b6106cb565b6040516102c89190612eaa565b60405180910390f35b6102eb60048036038101906102e69190612e2a565b610747565b005b6102f56108c9565b6040516103029190612d51565b60405180910390f35b61032560048036038101906103209190612f78565b61095d565b6040516103329190612db0565b60405180910390f35b61035560048036038101906103509190612f78565b6109c2565b005b610371600480360381019061036c9190612f78565b6109db565b60405161037e9190612fc1565b60405180910390f35b6103a1600480360381019061039c9190612f78565b6109ec565b6040516103ae9190612eaa565b60405180910390f35b6103d160048036038101906103cc9190612e2a565b610a31565b005b6103ed60048036038101906103e89190612f78565b610acd565b6040516103fa9190612eaa565b60405180910390f35b61040b610ade565b60405161041e97969594939291906130cb565b60405180910390f35b610441600480360381019061043c919061314d565b610b83565b60405161044e9190612eaa565b60405180910390f35b61045f610bc3565b60405161046c9190613198565b60405180910390f35b61047d610bd1565b60405161048a9190612d51565b60405180910390f35b61049b610c61565b6040516104a8919061320c565b60405180910390f35b6104cb60048036038101906104c69190612f78565b610c85565b6040516104d89190612eaa565b60405180910390f35b6104fb60048036038101906104f69190612e2a565b610cee565b6040516105089190612e82565b60405180910390f35b61052b60048036038101906105269190613279565b610d10565b005b61054760048036038101906105429190613302565b610dd5565b005b610563600480360381019061055e919061339f565b610f1a565b6040516105709190612eaa565b60405180910390f35b610593600480360381019061058e9190613407565b610f9c565b6040516105a091906134b5565b60405180910390f35b6060600380546105b8906134fb565b80601f01602080910402602001604051908101604052809291908181526020018280546105e4906134fb565b801561062f5780601f106106065761010080835404028352916020019161062f565b820191905f5260205f20905b81548152906001019060200180831161061257829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f610667610fb6565b9050610674818585610fbd565b600191505092915050565b5f600254905090565b5f5f610692610fb6565b905061069f858285610fcf565b6106aa858585611062565b60019150509392505050565b5f5f905090565b5f6106c6611152565b905090565b5f6107236106d883611208565b60095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061127390919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16905092915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc90613575565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663344612c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561083f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061086391906135a7565b9050808261086f61067f565b61087991906135ff565b11156108ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b19061367c565b60405180910390fd5b6108c48383611363565b505050565b60606108d36113e2565b65ffffffffffff166108e3610bc3565b65ffffffffffff1614610922576040517f6ff0714000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280601d81526020017f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000815250905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f6109cb610fb6565b90506109d781836113f1565b5050565b5f6109e582611501565b9050919050565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610abf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab690613575565b60405180910390fd5b610ac98282611556565b5050565b5f610ad7826115d5565b9050919050565b5f6060805f5f5f6060610aef6115e6565b610af7611621565b46305f5f1b5f67ffffffffffffffff811115610b1657610b1561369a565b5b604051908082528060200260200182016040528015610b445781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f610ba0610b9083611208565b600a61127390919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b5f610bcc6113e2565b905090565b606060048054610be0906134fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0c906134fb565b8015610c575780601f10610c2e57610100808354040283529160200191610c57565b820191905f5260205f20905b815481529060010190602001808311610c3a57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610ccb60095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061165c565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b5f5f610cf8610fb6565b9050610d05818585611062565b600191505092915050565b83421115610d5557836040517f4683af0e000000000000000000000000000000000000000000000000000000008152600401610d4c9190612eaa565b60405180910390fd5b5f610db6610dae7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf898989604051602001610d9394939291906136c7565b604051602081830303815290604052805190602001206116be565b8585856116d7565b9050610dc28187611705565b610dcc81886113f1565b50505050505050565b83421115610e1a57836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610e119190612eaa565b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610e488c61175c565b89604051602001610e5e9695949392919061370a565b6040516020818303038152906040528051906020012090505f610e80826116be565b90505f610e8f828787876116d7565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f0357808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610efa929190613769565b60405180910390fd5b610f0e8a8a8a610fbd565b50505050505050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610fa4612ca5565b610fae83836117af565b905092915050565b5f33905090565b610fca838383600161180e565b505050565b5f610fda8484610f1a565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81101561105c578181101561104d578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161104493929190613790565b60405180910390fd5b61105b84848484035f61180e565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036110d2575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016110c99190612db0565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611142575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016111399190612db0565b60405180910390fd5b61114d8383836119dd565b505050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480156111cd57507f000000000000000000000000000000000000000000000000000000000000000046145b156111fa577f00000000000000000000000000000000000000000000000000000000000000009050611205565b6112026119ed565b90505b90565b5f5f611212610bc3565b90508065ffffffffffff1683106112625782816040517fecd3f81e0000000000000000000000000000000000000000000000000000000081526004016112599291906137c5565b60405180910390fd5b61126b83611a82565b915050919050565b5f5f835f018054905090505f5f90505f82905060058311156112f7575f61129984611adb565b846112a491906137ec565b90506112b2875f0182611c75565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff1610156112e5578091506112f5565b6001816112f291906135ff565b92505b505b5f611306875f01878585611c87565b90505f811461135557611327875f0160018361132291906137ec565b611c75565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff16611357565b5f5b94505050505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113d3575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016113ca9190612db0565b60405180910390fd5b6113de5f83836119dd565b5050565b5f6113ec43611a82565b905090565b5f6113fb8361095d565b90508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46114fc81836114f786611cfc565b611d0d565b505050565b5f61154f61154a60095f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20611f7d565b611f8c565b9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115c6575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016115bd9190612db0565b60405180910390fd5b6115d1825f836119dd565b5050565b5f6115df82611fe3565b9050919050565b606061161c60057f000000000000000000000000000000000000000000000000000000000000000061202990919063ffffffff16565b905090565b606061165760067f000000000000000000000000000000000000000000000000000000000000000061202990919063ffffffff16565b905090565b5f5f825f018054905090505f81146116b457611686835f0160018361168191906137ec565b611c75565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff166116b6565b5f5b915050919050565b5f6116d06116ca611152565b836120d6565b9050919050565b5f5f5f5f6116e788888888612116565b9250925092506116f782826121fd565b829350505050949350505050565b5f61170f8361175c565b90508082146117575782816040517f752d88c000000000000000000000000000000000000000000000000000000000815260040161174e92919061381f565b60405180910390fd5b505050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050559050919050565b6117b7612ca5565b6118068260095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061235f90919063ffffffff16565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361187e575f6040517fe602df050000000000000000000000000000000000000000000000000000000081526004016118759190612db0565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118ee575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016118e59190612db0565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080156119d7578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516119ce9190612eaa565b60405180910390a35b50505050565b6119e883838361242e565b505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004630604051602001611a67959493929190613846565b60405160208183030381529060405280519060200120905090565b5f65ffffffffffff8016821115611ad3576030826040517f6dfcc650000000000000000000000000000000000000000000000000000000008152600401611aca9291906138d0565b60405180910390fd5b819050919050565b5f60018211611aec57819050611c70565b5f8290505f600190507001000000000000000000000000000000008210611b1c57608082901c9150604081901b90505b680100000000000000008210611b3b57604082901c9150602081901b90505b6401000000008210611b5657602082901c9150601081901b90505b620100008210611b6f57601082901c9150600881901b90505b6101008210611b8757600882901c9150600481901b90505b60108210611b9e57600482901c9150600281901b90505b60048210611bae57600181901b90505b600181600302901c90506001818581611bca57611bc96138f7565b5b048201901c90506001818581611be357611be26138f7565b5b048201901c90506001818581611bfc57611bfb6138f7565b5b048201901c90506001818581611c1557611c146138f7565b5b048201901c90506001818581611c2e57611c2d6138f7565b5b048201901c90506001818581611c4757611c466138f7565b5b048201901c9050611c69818581611c6157611c606138f7565b5b0482116124dc565b8103925050505b919050565b5f825f528160205f2001905092915050565b5f5b81831015611cf1575f611c9c84846124e7565b90508465ffffffffffff16611cb18783611c75565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff161115611cdb57809250611ceb565b600181611ce891906135ff565b93505b50611c89565b819050949350505050565b5f611d06826109ec565b9050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d4857505f81115b15611f78575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611e62575f5f611dd360095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061250c611dce86612521565b61258e565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611e57929190613924565b60405180910390a250505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611f77575f5f611ee860095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206125cd611ee386612521565b61258e565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611f6c929190613924565b60405180910390a250505b5b505050565b5f815f01805490509050919050565b5f63ffffffff8016821115611fdb576020826040517f6dfcc650000000000000000000000000000000000000000000000000000000008152600401611fd2929190613984565b60405180910390fd5b819050919050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b606060ff5f1b83146120455761203e836125e2565b90506120d0565b818054612051906134fb565b80601f016020809104026020016040519081016040528092919081815260200182805461207d906134fb565b80156120c85780601f1061209f576101008083540402835291602001916120c8565b820191905f5260205f20905b8154815290600101906020018083116120ab57829003601f168201915b505050505090505b92915050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115612152575f6003859250925092506121f3565b5f6001888888886040515f815260200160405260405161217594939291906139ab565b6020604051602081039080840390855afa158015612195573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e6575f60015f5f1b935093509350506121f3565b805f5f5f1b935093509350505b9450945094915050565b5f60038111156122105761220f6139ee565b5b826003811115612223576122226139ee565b5b031561235b576001600381111561223d5761223c6139ee565b5b8260038111156122505761224f6139ee565b5b03612287576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561229b5761229a6139ee565b5b8260038111156122ae576122ad6139ee565b5b036122f257805f1c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016122e99190612eaa565b60405180910390fd5b600380811115612305576123046139ee565b5b826003811115612318576123176139ee565b5b0361235a57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016123519190612f5f565b60405180910390fd5b5b5050565b612367612ca5565b825f018263ffffffff168154811061238257612381613a1b565b5b905f5260205f20016040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b612439838383612654565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036124cc575f61247561067f565b90505f61248061286d565b9050808211156124c95781816040517f1cb15d260000000000000000000000000000000000000000000000000000000081526004016124c0929190613924565b60405180910390fd5b50505b6124d7838383612890565b505050565b5f8115159050919050565b5f60028284186124f79190613a48565b82841661250491906135ff565b905092915050565b5f81836125199190613a78565b905092915050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff80168211156125865760d0826040517f6dfcc65000000000000000000000000000000000000000000000000000000000815260040161257d929190613afe565b60405180910390fd5b819050919050565b5f5f6125c161259b610bc3565b6125b16125a78861165c565b868863ffffffff16565b876129489092919063ffffffff16565b91509150935093915050565b5f81836125da9190613b25565b905092915050565b60605f6125ee83612963565b90505f602067ffffffffffffffff81111561260c5761260b61369a565b5b6040519080825280601f01601f19166020018201604052801561263e5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036126a4578060025f82825461269891906135ff565b92505081905550612772565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561272d578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161272493929190613790565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036127b9578060025f8282540392505081905550612803565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516128609190612eaa565b60405180910390a3505050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff8016905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036128dc576128d9600a6125cd6128d484612521565b61258e565b50505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361292857612925600a61250c61292084612521565b61258e565b50505b6129436129348461095d565b61293d8461095d565b83611d0d565b505050565b5f5f612957855f0185856129b1565b91509150935093915050565b5f5f60ff835f1c169050601f8111156129a8576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f5f5f858054905090505f811115612bbd575f6129da876001846129d591906137ec565b611c75565b90505f815f015f9054906101000a900465ffffffffffff1690505f825f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1690508765ffffffffffff168265ffffffffffff161115612a6b576040517f2520601d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8765ffffffffffff168265ffffffffffff1603612ad55786835f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550612bae565b8860405180604001604052808a65ffffffffffff1681526020018979ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b80879550955050505050612c9d565b8560405180604001604052808765ffffffffffff1681526020018679ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505f8492509250505b935093915050565b60405180604001604052805f65ffffffffffff1681526020015f79ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525090565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612d2382612ce1565b612d2d8185612ceb565b9350612d3d818560208601612cfb565b612d4681612d09565b840191505092915050565b5f6020820190508181035f830152612d698184612d19565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612d9a82612d71565b9050919050565b612daa81612d90565b82525050565b5f602082019050612dc35f830184612da1565b92915050565b5f5ffd5b612dd681612d90565b8114612de0575f5ffd5b50565b5f81359050612df181612dcd565b92915050565b5f819050919050565b612e0981612df7565b8114612e13575f5ffd5b50565b5f81359050612e2481612e00565b92915050565b5f5f60408385031215612e4057612e3f612dc9565b5b5f612e4d85828601612de3565b9250506020612e5e85828601612e16565b9150509250929050565b5f8115159050919050565b612e7c81612e68565b82525050565b5f602082019050612e955f830184612e73565b92915050565b612ea481612df7565b82525050565b5f602082019050612ebd5f830184612e9b565b92915050565b5f5f5f60608486031215612eda57612ed9612dc9565b5b5f612ee786828701612de3565b9350506020612ef886828701612de3565b9250506040612f0986828701612e16565b9150509250925092565b5f60ff82169050919050565b612f2881612f13565b82525050565b5f602082019050612f415f830184612f1f565b92915050565b5f819050919050565b612f5981612f47565b82525050565b5f602082019050612f725f830184612f50565b92915050565b5f60208284031215612f8d57612f8c612dc9565b5b5f612f9a84828501612de3565b91505092915050565b5f63ffffffff82169050919050565b612fbb81612fa3565b82525050565b5f602082019050612fd45f830184612fb2565b92915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b61300e81612fda565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61304681612df7565b82525050565b5f613057838361303d565b60208301905092915050565b5f602082019050919050565b5f61307982613014565b613083818561301e565b935061308e8361302e565b805f5b838110156130be5781516130a5888261304c565b97506130b083613063565b925050600181019050613091565b5085935050505092915050565b5f60e0820190506130de5f83018a613005565b81810360208301526130f08189612d19565b905081810360408301526131048188612d19565b90506131136060830187612e9b565b6131206080830186612da1565b61312d60a0830185612f50565b81810360c083015261313f818461306f565b905098975050505050505050565b5f6020828403121561316257613161612dc9565b5b5f61316f84828501612e16565b91505092915050565b5f65ffffffffffff82169050919050565b61319281613178565b82525050565b5f6020820190506131ab5f830184613189565b92915050565b5f819050919050565b5f6131d46131cf6131ca84612d71565b6131b1565b612d71565b9050919050565b5f6131e5826131ba565b9050919050565b5f6131f6826131db565b9050919050565b613206816131ec565b82525050565b5f60208201905061321f5f8301846131fd565b92915050565b61322e81612f13565b8114613238575f5ffd5b50565b5f8135905061324981613225565b92915050565b61325881612f47565b8114613262575f5ffd5b50565b5f813590506132738161324f565b92915050565b5f5f5f5f5f5f60c0878903121561329357613292612dc9565b5b5f6132a089828a01612de3565b96505060206132b189828a01612e16565b95505060406132c289828a01612e16565b94505060606132d389828a0161323b565b93505060806132e489828a01613265565b92505060a06132f589828a01613265565b9150509295509295509295565b5f5f5f5f5f5f5f60e0888a03121561331d5761331c612dc9565b5b5f61332a8a828b01612de3565b975050602061333b8a828b01612de3565b965050604061334c8a828b01612e16565b955050606061335d8a828b01612e16565b945050608061336e8a828b0161323b565b93505060a061337f8a828b01613265565b92505060c06133908a828b01613265565b91505092959891949750929550565b5f5f604083850312156133b5576133b4612dc9565b5b5f6133c285828601612de3565b92505060206133d385828601612de3565b9150509250929050565b6133e681612fa3565b81146133f0575f5ffd5b50565b5f81359050613401816133dd565b92915050565b5f5f6040838503121561341d5761341c612dc9565b5b5f61342a85828601612de3565b925050602061343b858286016133f3565b9150509250929050565b61344e81613178565b82525050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b61348281613454565b82525050565b604082015f82015161349c5f850182613445565b5060208201516134af6020850182613479565b50505050565b5f6040820190506134c85f830184613488565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061351257607f821691505b602082108103613525576135246134ce565b5b50919050565b7f4e6f7420617574686f72697a65640000000000000000000000000000000000005f82015250565b5f61355f600e83612ceb565b915061356a8261352b565b602082019050919050565b5f6020820190508181035f83015261358c81613553565b9050919050565b5f815190506135a181612e00565b92915050565b5f602082840312156135bc576135bb612dc9565b5b5f6135c984828501613593565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61360982612df7565b915061361483612df7565b925082820190508082111561362c5761362b6135d2565b5b92915050565b7f43617020657863656564656400000000000000000000000000000000000000005f82015250565b5f613666600c83612ceb565b915061367182613632565b602082019050919050565b5f6020820190508181035f8301526136938161365a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f6080820190506136da5f830187612f50565b6136e76020830186612da1565b6136f46040830185612e9b565b6137016060830184612e9b565b95945050505050565b5f60c08201905061371d5f830189612f50565b61372a6020830188612da1565b6137376040830187612da1565b6137446060830186612e9b565b6137516080830185612e9b565b61375e60a0830184612e9b565b979650505050505050565b5f60408201905061377c5f830185612da1565b6137896020830184612da1565b9392505050565b5f6060820190506137a35f830186612da1565b6137b06020830185612e9b565b6137bd6040830184612e9b565b949350505050565b5f6040820190506137d85f830185612e9b565b6137e56020830184613189565b9392505050565b5f6137f682612df7565b915061380183612df7565b9250828203905081811115613819576138186135d2565b5b92915050565b5f6040820190506138325f830185612da1565b61383f6020830184612e9b565b9392505050565b5f60a0820190506138595f830188612f50565b6138666020830187612f50565b6138736040830186612f50565b6138806060830185612e9b565b61388d6080830184612da1565b9695505050505050565b5f819050919050565b5f6138ba6138b56138b084613897565b6131b1565b612f13565b9050919050565b6138ca816138a0565b82525050565b5f6040820190506138e35f8301856138c1565b6138f06020830184612e9b565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6040820190506139375f830185612e9b565b6139446020830184612e9b565b9392505050565b5f819050919050565b5f61396e6139696139648461394b565b6131b1565b612f13565b9050919050565b61397e81613954565b82525050565b5f6040820190506139975f830185613975565b6139a46020830184612e9b565b9392505050565b5f6080820190506139be5f830187612f50565b6139cb6020830186612f1f565b6139d86040830185612f50565b6139e56060830184612f50565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f613a5282612df7565b9150613a5d83612df7565b925082613a6d57613a6c6138f7565b5b828204905092915050565b5f613a8282613454565b9150613a8d83613454565b9250828203905079ffffffffffffffffffffffffffffffffffffffffffffffffffff811115613abf57613abe6135d2565b5b92915050565b5f819050919050565b5f613ae8613ae3613ade84613ac5565b6131b1565b612f13565b9050919050565b613af881613ace565b82525050565b5f604082019050613b115f830185613aef565b613b1e6020830184612e9b565b9392505050565b5f613b2f82613454565b9150613b3a83613454565b9250828201905079ffffffffffffffffffffffffffffffffffffffffffffffffffff811115613b6c57613b6b6135d2565b5b9291505056fea26469706673582212208a6a5bacae63da85ee059490e3d11d84789b33b27b37c6df680b1e8c103cfce064736f6c634300081e0033",
"opcodes": "PUSH2 0x1A0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x4674 CODESIZE SUB DUP1 PUSH2 0x4674 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0x498 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x446F6E6F7220476F7665726E616E636520546F6B656E00000000000000000000 DUP2 MSTORE POP DUP1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3100000000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x446F6E6F7220476F7665726E616E636520546F6B656E00000000000000000000 DUP2 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4447540000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x3 SWAP1 DUP2 PUSH2 0x11A SWAP2 SWAP1 PUSH2 0x713 JUMP JUMPDEST POP DUP1 PUSH1 0x4 SWAP1 DUP2 PUSH2 0x12A SWAP2 SWAP1 PUSH2 0x713 JUMP JUMPDEST POP POP POP PUSH2 0x141 PUSH1 0x5 DUP4 PUSH2 0x325 PUSH1 0x20 SHL SWAP1 SWAP2 SWAP1 PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x120 DUP2 DUP2 MSTORE POP POP PUSH2 0x15D PUSH1 0x6 DUP3 PUSH2 0x325 PUSH1 0x20 SHL SWAP1 SWAP2 SWAP1 PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x140 DUP2 DUP2 MSTORE POP POP DUP2 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH1 0xE0 DUP2 DUP2 MSTORE POP POP DUP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0x100 DUP2 DUP2 MSTORE POP POP CHAINID PUSH1 0xA0 DUP2 DUP2 MSTORE POP POP PUSH2 0x19A PUSH2 0x372 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0x80 DUP2 DUP2 MSTORE POP POP ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xC0 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP POP POP POP PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x246 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x23D SWAP1 PUSH2 0x83C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0x2B4 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x2AB SWAP1 PUSH2 0x8A4 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x160 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x180 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE POP POP POP POP PUSH2 0xA52 JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP4 MLOAD LT ISZERO PUSH2 0x346 JUMPI PUSH2 0x33F DUP4 PUSH2 0x3CC PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP1 POP PUSH2 0x36C JUMP JUMPDEST DUP3 PUSH2 0x356 DUP4 PUSH2 0x431 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH0 ADD SWAP1 DUP2 PUSH2 0x364 SWAP2 SWAP1 PUSH2 0x713 JUMP JUMPDEST POP PUSH1 0xFF PUSH0 SHL SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD CHAINID ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x3B1 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x8F8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH0 PUSH0 DUP3 SWAP1 POP PUSH1 0x1F DUP2 MLOAD GT ISZERO PUSH2 0x418 JUMPI DUP3 PUSH1 0x40 MLOAD PUSH32 0x305A27A900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x40F SWAP2 SWAP1 PUSH2 0x99F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 MLOAD DUP2 PUSH2 0x424 SWAP1 PUSH2 0x9EC JUMP JUMPDEST PUSH0 SHR OR PUSH0 SHL SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH2 0x467 DUP3 PUSH2 0x43E JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x477 DUP2 PUSH2 0x45D JUMP JUMPDEST DUP2 EQ PUSH2 0x481 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH0 DUP2 M
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment