UNPKG

@ensdomains/root

Version:

[![Build Status](https://travis-ci.com/ensdomains/root.svg?branch=master)](https://travis-ci.com/ensdomains/root) [![License](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](LICENSE)

1,063 lines (1,062 loc) 273 kB
{ "contractName": "Root", "abi": [ { "inputs": [ { "internalType": "contract ENS", "name": "_ens", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "controller", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "enabled", "type": "bool" } ], "name": "ControllerChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "label", "type": "bytes32" } ], "name": "TLDLocked", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "controllers", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ens", "outputs": [ { "internalType": "contract ENS", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "addr", "type": "address" } ], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "locked", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "controller", "type": "address" }, { "internalType": "bool", "name": "enabled", "type": "bool" } ], "name": "setController", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "label", "type": "bytes32" }, { "internalType": "address", "name": "owner", "type": "address" } ], "name": "setSubnodeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "resolver", "type": "address" } ], "name": "setResolver", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "label", "type": "bytes32" } ], "name": "lock", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"ControllerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"name\":\"TLDLocked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"controllers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"internalType\":\"contract ENS\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"locked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/arachnid/Dropbox/projects/ensroot/contracts/Root.sol\":\"Root\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/arachnid/Dropbox/projects/ensroot/contracts/Controllable.sol\":{\"keccak256\":\"0x7831ef51f75e27af50364373a90b7647f5269821e5734320dba761c724283507\",\"urls\":[\"bzz-raw://9f4f444ec804c0fbc91fc28461896dc5c06e304acc88f57eedb84a2583f8ad31\",\"dweb:/ipfs/Qmc4JdaVBoPTyzijtDz4Zte94Zx86PrdMt9WsxNdiPVEwe\"]},\"/home/arachnid/Dropbox/projects/ensroot/contracts/Ownable.sol\":{\"keccak256\":\"0xa39db48420aa699761dd40f5cc98480f508f6a3d92588d7dc8350df0e4a9bae3\",\"urls\":[\"bzz-raw://8d934467f5bfd41b0109db0bff22d177bb9d3d117074a08f399dbe5d8f9013a2\",\"dweb:/ipfs/Qme3nbeWp3FxfHvr54RYA96xANS95GaXpPr8z96XUK1o5r\"]},\"/home/arachnid/Dropbox/projects/ensroot/contracts/Root.sol\":{\"keccak256\":\"0xe75451a23ab9f5ea75afef8cf944cba33f7ad6b7140ea30d59a2159d3b4ffc20\",\"urls\":[\"bzz-raw://077975f90c7385f6b40cce190b40c44739a0e3cd3be47126c1253e5c9072913d\",\"dweb:/ipfs/QmTg4WofJWw5fctpXzzX6Yv9LyeGQQTMGGuYEzq7D8pJhE\"]},\"@ensdomains/ens/contracts/ENS.sol\":{\"keccak256\":\"0xe91a9e0c491e424dd7e873fab45b267ecea488dabab0a577d57b46631e7648f9\",\"urls\":[\"bzz-raw://2efece18eaa2dc0d76e739e9cb1c365ce338f2bfaee15648830173957025797e\",\"dweb:/ipfs/QmNm6FguAyCV6ZGN1KeUts9iYAqdAR6StFjHv6uuBpVVuQ\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051610c58380380610c58833981810160405281019061003291906100ce565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610152565b6000815190506100c88161013b565b92915050565b6000602082840312156100e057600080fd5b60006100ee848285016100b9565b91505092915050565b60006101028261011b565b9050919050565b6000610114826100f7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61014481610109565b811461014f57600080fd5b50565b610af7806101616000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638cb8ecec116100715780638cb8ecec146101645780638da5cb5b14610180578063cbe9e7641461019e578063da8c229e146101ce578063e0dba60f146101fe578063f2fde38b1461021a576100a9565b806301670ba9146100ae57806301ffc9a7146100ca5780632f54bf6e146100fa5780633f15457f1461012a5780634e543b2614610148575b600080fd5b6100c860048036038101906100c39190610829565b610236565b005b6100e460048036038101906100df91906108b7565b6102a4565b6040516100f19190610937565b60405180910390f35b610114600480360381019061010f91906107c4565b61030e565b6040516101219190610937565b60405180910390f35b610132610366565b60405161013f91906109b2565b60405180910390f35b610162600480360381019061015d91906107c4565b61038c565b005b61017e6004803603810190610179919061087b565b610433565b005b61018861056d565b604051610195919061091c565b60405180910390f35b6101b860048036038101906101b39190610829565b610591565b6040516101c59190610937565b60405180910390f35b6101e860048036038101906101e391906107c4565b6105b1565b6040516101f59190610937565b60405180910390f35b610218600480360381019061021391906107ed565b6105d1565b005b610234600480360381019061022f91906107c4565b61068c565b005b61023f3361030e565b61024857600080fd5b807f1764176cfa565853ba1ded547a830a9f9bff95231ef6fd228b3ddd617577756960405160405180910390a260016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60007f01ffc9a7a5cef8baa21ed3c5c0d7e23accb804b619e9333b597f47a0d84076e27bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008173ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103953361030e565b61039e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a6000801b836040518363ffffffff1660e01b81526004016103fe929190610952565b600060405180830381600087803b15801561041857600080fd5b505af115801561042c573d6000803e3d6000fd5b5050505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661048957600080fd5b6003600083815260200190815260200160002060009054906101000a900460ff16156104b457600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59236000801b84846040518463ffffffff1660e01b81526004016105169392919061097b565b602060405180830381600087803b15801561053057600080fd5b505af1158015610544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105689190610852565b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6105da3361030e565b6105e357600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f4c97694570a07277810af7e5669ffd5f6a2d6b74b6e9a274b8b870fd5114cf87826040516106809190610937565b60405180910390a25050565b6106953361030e565b61069e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008135905061076a81610a65565b92915050565b60008135905061077f81610a7c565b92915050565b60008135905061079481610a93565b92915050565b6000815190506107a981610a93565b92915050565b6000813590506107be81610aaa565b92915050565b6000602082840312156107d657600080fd5b60006107e48482850161075b565b91505092915050565b6000806040838503121561080057600080fd5b600061080e8582860161075b565b925050602061081f85828601610770565b9150509250929050565b60006020828403121561083b57600080fd5b600061084984828501610785565b91505092915050565b60006020828403121561086457600080fd5b60006108728482850161079a565b91505092915050565b6000806040838503121561088e57600080fd5b600061089c85828601610785565b92505060206108ad8582860161075b565b9150509250929050565b6000602082840312156108c957600080fd5b60006108d7848285016107af565b91505092915050565b6108e9816109cd565b82525050565b6108f8816109df565b82525050565b610907816109eb565b82525050565b61091681610a41565b82525050565b600060208201905061093160008301846108e0565b92915050565b600060208201905061094c60008301846108ef565b92915050565b600060408201905061096760008301856108fe565b61097460208301846108e0565b9392505050565b600060608201905061099060008301866108fe565b61099d60208301856108fe565b6109aa60408301846108e0565b949350505050565b60006020820190506109c7600083018461090d565b92915050565b60006109d882610a21565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610a4c82610a53565b9050919050565b6000610a5e82610a21565b9050919050565b610a6e816109cd565b8114610a7957600080fd5b50565b610a85816109df565b8114610a9057600080fd5b50565b610a9c816109eb565b8114610aa757600080fd5b50565b610ab3816109f5565b8114610abe57600080fd5b5056fea26469706673582212209873712ab004eaf27fefee8a51e7f0b961417b7fbabac410398c65e36dfadc9264736f6c63430008030033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638cb8ecec116100715780638cb8ecec146101645780638da5cb5b14610180578063cbe9e7641461019e578063da8c229e146101ce578063e0dba60f146101fe578063f2fde38b1461021a576100a9565b806301670ba9146100ae57806301ffc9a7146100ca5780632f54bf6e146100fa5780633f15457f1461012a5780634e543b2614610148575b600080fd5b6100c860048036038101906100c39190610829565b610236565b005b6100e460048036038101906100df91906108b7565b6102a4565b6040516100f19190610937565b60405180910390f35b610114600480360381019061010f91906107c4565b61030e565b6040516101219190610937565b60405180910390f35b610132610366565b60405161013f91906109b2565b60405180910390f35b610162600480360381019061015d91906107c4565b61038c565b005b61017e6004803603810190610179919061087b565b610433565b005b61018861056d565b604051610195919061091c565b60405180910390f35b6101b860048036038101906101b39190610829565b610591565b6040516101c59190610937565b60405180910390f35b6101e860048036038101906101e391906107c4565b6105b1565b6040516101f59190610937565b60405180910390f35b610218600480360381019061021391906107ed565b6105d1565b005b610234600480360381019061022f91906107c4565b61068c565b005b61023f3361030e565b61024857600080fd5b807f1764176cfa565853ba1ded547a830a9f9bff95231ef6fd228b3ddd617577756960405160405180910390a260016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60007f01ffc9a7a5cef8baa21ed3c5c0d7e23accb804b619e9333b597f47a0d84076e27bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008173ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103953361030e565b61039e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a6000801b836040518363ffffffff1660e01b81526004016103fe929190610952565b600060405180830381600087803b15801561041857600080fd5b505af115801561042c573d6000803e3d6000fd5b5050505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661048957600080fd5b6003600083815260200190815260200160002060009054906101000a900460ff16156104b457600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59236000801b84846040518463ffffffff1660e01b81526004016105169392919061097b565b602060405180830381600087803b15801561053057600080fd5b505af1158015610544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105689190610852565b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b6105da3361030e565b6105e357600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f4c97694570a07277810af7e5669ffd5f6a2d6b74b6e9a274b8b870fd5114cf87826040516106809190610937565b60405180910390a25050565b6106953361030e565b61069e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008135905061076a81610a65565b92915050565b60008135905061077f81610a7c565b92915050565b60008135905061079481610a93565b92915050565b6000815190506107a981610a93565b92915050565b6000813590506107be81610aaa565b92915050565b6000602082840312156107d657600080fd5b60006107e48482850161075b565b91505092915050565b6000806040838503121561080057600080fd5b600061080e8582860161075b565b925050602061081f85828601610770565b9150509250929050565b60006020828403121561083b57600080fd5b600061084984828501610785565b91505092915050565b60006020828403121561086457600080fd5b60006108728482850161079a565b91505092915050565b6000806040838503121561088e57600080fd5b600061089c85828601610785565b92505060206108ad8582860161075b565b9150509250929050565b6000602082840312156108c957600080fd5b60006108d7848285016107af565b91505092915050565b6108e9816109cd565b82525050565b6108f8816109df565b82525050565b610907816109eb565b82525050565b61091681610a41565b82525050565b600060208201905061093160008301846108e0565b92915050565b600060208201905061094c60008301846108ef565b92915050565b600060408201905061096760008301856108fe565b61097460208301846108e0565b9392505050565b600060608201905061099060008301866108fe565b61099d60208301856108fe565b6109aa60408301846108e0565b949350505050565b60006020820190506109c7600083018461090d565b92915050565b60006109d882610a21565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610a4c82610a53565b9050919050565b6000610a5e82610a21565b9050919050565b610a6e816109cd565b8114610a7957600080fd5b50565b610a85816109df565b8114610a9057600080fd5b50565b610a9c816109eb565b8114610aa757600080fd5b50565b610ab3816109f5565b8114610abe57600080fd5b5056fea26469706673582212209873712ab004eaf27fefee8a51e7f0b961417b7fbabac410398c65e36dfadc9264736f6c63430008030033", "immutableReferences": {}, "generatedSources": [ { "ast": { "nodeType": "YulBlock", "src": "0:984:7", "statements": [ { "body": { "nodeType": "YulBlock", "src": "81:91:7", "statements": [ { "nodeType": "YulAssignment", "src": "91:22:7", "value": { "arguments": [ { "name": "offset", "nodeType": "YulIdentifier", "src": "106:6:7" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "100:5:7" }, "nodeType": "YulFunctionCall", "src": "100:13:7" }, "variableNames": [ { "name": "value", "nodeType": "YulIdentifier", "src": "91:5:7" } ] }, { "expression": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "160:5:7" } ], "functionName": { "name": "validator_revert_t_contract$_ENS_$421", "nodeType": "YulIdentifier", "src": "122:37:7" }, "nodeType": "YulFunctionCall", "src": "122:44:7" }, "nodeType": "YulExpressionStatement", "src": "122:44:7" } ] }, "name": "abi_decode_t_contract$_ENS_$421_fromMemory", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "offset", "nodeType": "YulTypedName", "src": "59:6:7", "type": "" }, { "name": "end", "nodeType": "YulTypedName", "src": "67:3:7", "type": "" } ], "returnVariables": [ { "name": "value", "nodeType": "YulTypedName", "src": "75:5:7", "type": "" } ], "src": "7:165:7" }, { "body": { "nodeType": "YulBlock", "src": "266:218:7", "statements": [ { "body": { "nodeType": "YulBlock", "src": "312:16:7", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "321:1:7", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "324:1:7", "type": "", "value": "0" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "314:6:7" }, "nodeType": "YulFunctionCall", "src": "314:12:7" }, "nodeType": "YulExpressionStatement", "src": "314:12:7" } ] }, "condition": { "arguments": [ { "arguments": [ { "name": "dataEnd", "nodeType": "YulIdentifier", "src": "287:7:7" }, { "name": "headStart", "nodeType": "YulIdentifier", "src": "296:9:7" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "283:3:7" }, "nodeType": "YulFunctionCall", "src": "283:23:7" }, { "kind": "number", "nodeType": "YulLiteral", "src": "308:2:7", "type": "", "value": "32" } ], "functionName": { "name": "slt", "nodeType": "YulIdentifier", "src": "279:3:7" }, "nodeType": "YulFunctionCall", "src": "279:32:7" }, "nodeType": "YulIf", "src": "276:2:7" }, { "nodeType": "YulBlock", "src": "338:139:7", "statements": [ { "nodeType": "YulVariableDeclaration", "src": "353:15:7", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "367:1:7", "type": "", "value": "0" }, "variables": [ { "name": "offset", "nodeType": "YulTypedName", "src": "357:6:7", "type": "" } ] }, { "nodeType": "YulAssignment", "src": "382:85:7", "value": { "arguments": [ { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "439:9:7" }, { "name": "offset", "nodeType": "YulIdentifier", "src": "450:6:7" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "435:3:7" }, "nodeType": "YulFunctionCall", "src": "435:22:7" }, { "name": "dataEnd", "nodeType": "YulIdentifier", "src": "459:7:7" } ], "functionName": { "name": "abi_decode_t_contract$_ENS_$421_fromMemory", "nodeType": "YulIdentifier", "src": "392:42:7" }, "nodeType": "YulFunctionCall", "src": "392:75:7" }, "variableNames": [ { "name": "value0", "nodeType": "YulIdentifier", "src": "382:6:7" } ] } ] } ] }, "name": "abi_decode_tuple_t_contract$_ENS_$421_fromMemory", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "236:9:7", "type": "" }, { "name": "dataEnd", "nodeType": "YulTypedName", "src": "247:7:7", "type": "" } ], "returnVariables": [ { "name": "value0", "nodeType": "YulTypedName", "src": "259:6:7", "type": "" } ], "src": "178:306:7" }, { "body": { "nodeType": "YulBlock", "src": "535:51:7", "statements": [ { "nodeType": "YulAssignment", "src": "545:35:7", "value": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "574:5:7" } ], "functionName": { "name": "cleanup_t_uint160", "nodeType": "YulIdentifier", "src": "556:17:7" }, "nodeType": "YulFunctionCall", "src": "556:24:7" }, "variableNames": [ { "name": "cleaned", "nodeType": "YulIdentifier", "src": "545:7:7" } ] } ] }, "name": "cleanup_t_address", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "517:5:7", "type": "" } ], "returnVariables": [ { "name": "cleaned", "nodeType": "YulTypedName", "src": "527:7:7", "type": "" } ], "src": "490:96:7" }, { "body": { "nodeType": "YulBlock", "src": "648:51:7", "statements": [ { "nodeType": "YulAssignment", "src": "658:35:7", "value": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "687:5:7" } ], "functionName": { "name": "cleanup_t_address", "nodeType": "YulIdentifier", "src": "669:17:7" }, "nodeType": "YulFunctionCall", "src": "669:24:7" }, "variableNames": [ { "name": "cleaned", "nodeType": "YulIdentifier", "src": "658:7:7" } ] } ] }, "name": "cleanup_t_contract$_ENS_$421", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "630:5:7", "type": "" } ], "returnVariables": [ { "name": "cleaned", "nodeType": "YulTypedName", "src": "640:7:7", "type": "" } ], "src": "592:107:7" }, { "body": { "nodeType": "YulBlock", "src": "750:81:7", "statements": [ { "nodeType": "YulAssignment", "src": "760:65:7", "value": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "775:5:7" }, { "kind": "number", "nodeType": "YulLiteral", "src": "782:42:7", "type": "", "value": "0xffffffffffffffffffffffffffffffffffffffff" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "771:3:7" }, "nodeType": "YulFunctionCall", "src": "771:54:7" }, "variableNames": [ { "name": "cleaned", "nodeType": "YulIdentifier", "src": "760:7:7" } ] } ] }, "name": "cleanup_t_uint160", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "732:5:7", "type": "" } ], "returnVariables": [ { "name": "cleaned", "nodeType": "YulTypedName", "src": "742:7:7", "type": "" } ], "src": "705:126:7" }, { "body": { "nodeType": "YulBlock", "src": "891:90:7", "statements": [ { "body": { "nodeType": "YulBlock", "src": "959:16:7", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "968:1:7", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "971:1:7", "type": "", "value": "0" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "961:6:7" }, "nodeType": "YulFunctionCall", "src": "961:12:7" }, "nodeType": "YulExpressionStatement", "src": "961:12:7" } ] }, "condition": { "arguments": [ { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "914:5:7" }, { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "950:5:7" } ], "functionName": { "name": "cleanup_t_contract$_ENS_$421", "nodeType": "YulIdentifier", "src": "921:28:7" }, "nodeType": "YulFunctionCall", "src": "921:35:7" } ], "functionName": { "name": "eq", "nodeType": "YulIdentifier", "src": "911:2:7" }, "nodeType": "YulFunctionCall", "src": "911:46:7" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "904:6:7" }, "nodeType": "YulFunctionCall", "src": "904:54:7" }, "nodeType": "YulIf", "src": "901:2:7" } ] }, "name": "validator_revert_t_contract$_ENS_$421", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "884:5:7", "type": "" } ], "src": "837:144:7" } ] }, "contents": "{\n\n function abi_decode_t_contract$_ENS_$421_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_contract$_ENS_$421(value)\n }\n\n function abi_decode_tuple_t_contract$_ENS_$421_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_contract$_ENS_$421_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_contract$_ENS_$421(value) -> cleaned {\n cleaned := cleanup_t_address(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function validator_revert_t_contract$_ENS_$421(value) {\n if iszero(eq(value, cleanup_t_contract$_ENS_$421(value))) { revert(0, 0) }\n }\n\n}\n", "id": 7, "language": "Yul", "name": "#utility.yul" } ], "deployedGeneratedSources": [ { "ast": { "nodeType": "YulBlock", "src": "0:5995:7", "statements": [ { "body": { "nodeType": "YulBlock", "src": "59:87:7", "statements": [ { "nodeType": "YulAssignment", "src": "69:29:7", "value": { "arguments": [ { "name": "offset", "nodeType": "YulIdentifier", "src": "91:6:7" } ], "functionName": { "name": "calldataload", "nodeType": "YulIdentifier", "src": "78:12:7" }, "nodeType": "YulFunctionCall", "src": "78:20:7" }, "variableNames": [ { "name": "value", "nodeType": "YulIdentifier", "src": "69:5:7" } ] }, { "expression": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "134:5:7" } ], "functionName": { "name": "validator_revert_t_address", "nodeType": "YulIdentifier", "src": "107:26:7" }, "nodeType": "YulFunctionCall", "src": "107:33:7" }, "nodeType": "YulExpressionStatement", "src": "107:33:7" } ] }, "name": "abi_decode_t_address", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "offset", "nodeType": "YulTypedName", "src": "37:6:7", "type": "" }, { "name": "end", "nodeType": "YulTypedName", "src": "45:3:7", "type": "" } ], "returnVariables": [ { "name": "value", "nodeType": "YulTypedName", "src": "53:5:7", "type": "" } ], "src": "7:139:7" }, { "body": { "nodeType": "YulBlock", "src": "201:84:7", "statements": [ { "nodeType": "YulAssignment", "src": "211:29:7", "value": { "arguments": [ { "name": "offset", "nodeType": "YulIdentifier", "src": "233:6:7" } ], "functionName": { "name": "calldataload", "nodeType": "YulIdentifier", "src": "220:12:7" }, "nodeType": "YulFunctionCall", "src": "220:20:7" }, "variableNames": [ { "name": "value", "nodeType": "YulIdentifier", "src": "211:5:7" } ] }, { "expression": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "273:5:7" } ], "functionName": { "name": "validator_revert_t_bool", "nodeType": "YulIdentifier", "src": "249:23:7" }, "nodeType": "YulFunctionCall", "src": "249:30:7" }, "nodeType": "YulExpressionStatement", "src": "249:30:7" } ] }, "name": "abi_decode_t_bool", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "offset", "nodeType": "YulTypedName", "src": "179:6:7", "type": "" }, { "name": "end", "nodeType": "YulTypedName", "src": "187:3:7", "type": "" } ], "returnVariables": [ { "name": "value", "nodeType": "YulTypedName", "src": "195:5:7", "type": "" } ], "src": "152:133:7" }, { "body": { "nodeType": "YulBlock", "src": "343:87:7", "statements": [ { "nodeType": "YulAssignment", "src": "353:29:7", "value": { "arguments": [ { "name": "offset", "nodeType": "YulIdentifier", "src": "375:6:7" } ], "functionName": { "name": "calldataload", "nodeType": "YulIdentifier", "src": "362:12:7" }, "nodeType": "YulFunctionCall", "src": "362:20:7" }, "variableNames": [ { "name": "value", "nodeType": "YulIdentifier", "src": "353:5:7" } ] }, { "expression": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "418:5:7" } ], "functionName": { "name": "validator_revert_t_bytes32", "nodeType": "YulIdentifier", "src": "391:26:7" }, "nodeType": "YulFunctionCall", "src": "391:33:7" }, "nodeType": "YulExpressionStatement", "src": "391:33:7" } ] }, "name": "abi_decode_t_bytes32", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "offset", "nodeType": "YulTypedName", "src": "321:6:7", "type": "" }, { "name": "end", "nodeType": "YulTypedName", "src": "329:3:7", "type": "" } ], "returnVariables": [ { "name": "value", "nodeType": "YulTypedName", "src": "337:5:7", "type": "" } ], "src": "291:139:7" }, { "body": { "nodeType": "YulBlock", "src": "499:80:7", "statements": [ { "nodeType": "YulAssignment", "src": "509:22:7", "value": { "arguments": [ { "name": "offset", "nodeType": "YulIdentifier", "src": "524:6:7" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "518:5:7" },