Commit 6f07bb8f authored by inphi's avatar inphi

remove methodId snapshots

Also move snapshots to appropriate subdirectories
parent c236b79e
...@@ -33,17 +33,11 @@ const getAllContracts = (): Array<string> => { ...@@ -33,17 +33,11 @@ const getAllContracts = (): Array<string> => {
} }
type AbiSpecStorageLayoutEntry = { type AbiSpecStorageLayoutEntry = {
label: string
slot: number slot: number
offset: number offset: number
type: string
} }
type AbiSpecMethodIdentifiers = { [key: string]: string }
type AbiSpecStorageLayout = { [key: string]: AbiSpecStorageLayoutEntry }
type AbiSpecEntry = {
methodIdentifiers: AbiSpecMethodIdentifiers
storageLayout: AbiSpecStorageLayout
abi: any
}
const sortKeys = (obj: any) => { const sortKeys = (obj: any) => {
if (typeof obj !== 'object' || obj === null) { if (typeof obj !== 'object' || obj === null) {
return obj return obj
...@@ -61,7 +55,11 @@ const sortKeys = (obj: any) => { ...@@ -61,7 +55,11 @@ const sortKeys = (obj: any) => {
const main = async () => { const main = async () => {
console.log(`writing abi spec to ${outdir}`) console.log(`writing abi spec to ${outdir}`)
fs.mkdirSync(outdir, { recursive: true })
const storageLayoutDir = path.join(outdir, 'storageLayout')
const abiDir = path.join(outdir, 'abi')
fs.mkdirSync(storageLayoutDir, { recursive: true })
fs.mkdirSync(abiDir, { recursive: true })
const contracts = getAllContracts() const contracts = getAllContracts()
...@@ -70,8 +68,6 @@ const main = async () => { ...@@ -70,8 +68,6 @@ const main = async () => {
const contractFile = contract.split(':')[0] const contractFile = contract.split(':')[0]
const contractName = toks[1] const contractName = toks[1]
const storageLayout: AbiSpecStorageLayout = {}
let artifactFile = path.join( let artifactFile = path.join(
forgeArtifactsDir, forgeArtifactsDir,
contractFile, contractFile,
...@@ -94,39 +90,36 @@ const main = async () => { ...@@ -94,39 +90,36 @@ const main = async () => {
} }
// HACK: This is a hack to ignore libraries. Not robust against changes to solc's internal ast repr // HACK: This is a hack to ignore libraries. Not robust against changes to solc's internal ast repr
const isContract = artifact.ast.nodes.find((node: any) => { const isContract = artifact.ast.nodes.some((node: any) => {
if ( return (
node.nodeType === 'ContractDefinition' && node.nodeType === 'ContractDefinition' &&
node.name === contractName && node.name === contractName &&
node.kind === 'contract' node.contractKind === 'contract'
) { )
return node
}
}) })
if (!isContract) { if (!isContract) {
console.log(`ignoring library/interface ${contractName}`) console.log(`ignoring library/interface ${contractName}`)
continue continue
} }
const storageLayout: AbiSpecStorageLayoutEntry[] = []
for (const storageEntry of artifact.storageLayout.storage) { for (const storageEntry of artifact.storageLayout.storage) {
storageLayout[storageEntry.label] = { storageLayout.push({
slot: storageEntry.slot, label: storageEntry.label,
offset: storageEntry.offset, offset: storageEntry.offset,
} slot: storageEntry.slot,
} type: storageEntry.type,
const ids: AbiSpecMethodIdentifiers = {} })
for (const [key, value] of Object.entries(artifact.methodIdentifiers)) {
ids[value as string] = key
} }
const entry: AbiSpecEntry = { // Sort snapshots for easier manual inspection
methodIdentifiers: ids, fs.writeFileSync(
storageLayout, `${abiDir}/${contractName}.json`,
abi: artifact.abi, JSON.stringify(sortKeys(artifact.abi), null, 2)
} )
fs.writeFileSync( fs.writeFileSync(
`${outdir}/${contractName}.json`, `${storageLayoutDir}/${contractName}.json`,
JSON.stringify(sortKeys(entry), null, 2) JSON.stringify(sortKeys(storageLayout), null, 2)
) )
} }
} }
......
{
"abi": [],
"methodIdentifiers": {},
"storageLayout": {}
}
\ No newline at end of file
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "newAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "oldAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"methodIdentifiers": {
"715018a6": "renounceOwnership()",
"8da5cb5b": "owner()",
"9b2ea4bd": "setAddress(string,address)",
"bf40fac1": "getAddress(string)",
"f2fde38b": "transferOwnership(address)"
},
"storageLayout": {
"_owner": {
"offset": 0,
"slot": "0"
},
"addresses": {
"offset": 0,
"slot": "1"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_minWithdrawalAmount",
"type": "uint256"
},
{
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "_withdrawalNetwork",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "withdrawalNetwork",
"type": "uint8"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"inputs": [],
"name": "MIN_WITHDRAWAL_AMOUNT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RECIPIENT",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "WITHDRAWAL_NETWORK",
"outputs": [
{
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalProcessed",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"methodIdentifiers": {
"0d9019e1": "RECIPIENT()",
"3ccfd60b": "withdraw()",
"54fd4d50": "version()",
"84411d65": "totalProcessed()",
"d0e12f90": "WITHDRAWAL_NETWORK()",
"d3e5792b": "MIN_WITHDRAWAL_AMOUNT()"
},
"storageLayout": {
"totalProcessed": {
"offset": 0,
"slot": "0"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [],
"name": "BlockHashNotPresent",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
},
{
"indexed": true,
"internalType": "Hash",
"name": "blockHash",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "Timestamp",
"name": "childTimestamp",
"type": "uint64"
}
],
"name": "Checkpoint",
"type": "event"
},
{
"inputs": [],
"name": "checkpoint",
"outputs": [
{
"internalType": "uint256",
"name": "blockNumber_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_blockNumber",
"type": "uint256"
}
],
"name": "load",
"outputs": [
{
"components": [
{
"internalType": "Hash",
"name": "hash",
"type": "bytes32"
},
{
"internalType": "Timestamp",
"name": "childTimestamp",
"type": "uint64"
}
],
"internalType": "struct BlockOracle.BlockInfo",
"name": "blockInfo_",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"54fd4d50": "version()",
"99d548aa": "load(uint256)",
"c2c4c5c1": "checkpoint()"
},
"storageLayout": {
"blocks": {
"offset": 0,
"slot": "0"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "vetoer_",
"type": "address"
},
{
"internalType": "address",
"name": "initiator_",
"type": "address"
},
{
"internalType": "address",
"name": "target_",
"type": "address"
},
{
"internalType": "uint256",
"name": "operatingDelay_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyDelayed",
"type": "error"
},
{
"inputs": [],
"name": "ForwardingEarly",
"type": "error"
},
{
"inputs": [],
"name": "TargetUnitialized",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "expected",
"type": "address"
},
{
"internalType": "address",
"name": "actual",
"type": "address"
}
],
"name": "Unauthorized",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "delay",
"type": "uint256"
}
],
"name": "DelayActivated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "callHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "Forwarded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "callHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "Initiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "callHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "Vetoed",
"type": "event"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
},
{
"inputs": [],
"name": "delay",
"outputs": [
{
"internalType": "uint256",
"name": "delay_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initiator",
"outputs": [
{
"internalType": "address",
"name": "initiator_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "callHash",
"type": "bytes32"
}
],
"name": "queuedAt",
"outputs": [
{
"internalType": "uint256",
"name": "queuedAt_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "target",
"outputs": [
{
"internalType": "address",
"name": "target_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vetoer",
"outputs": [
{
"internalType": "address",
"name": "vetoer_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"methodIdentifiers": {
"54fd4d50": "version()",
"5c39fcc1": "initiator()",
"6a42b8f8": "delay()",
"b912de5d": "queuedAt(bytes32)",
"d4b83992": "target()",
"d8bff440": "vetoer()"
},
"storageLayout": {
"_delay": {
"offset": 0,
"slot": "0"
},
"_queuedAt": {
"offset": 0,
"slot": "1"
}
}
}
\ No newline at end of file
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnerChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "oldOwner",
"type": "address"
}
],
"name": "WhitelistDisabled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "deployer",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "whitelisted",
"type": "bool"
}
],
"name": "WhitelistStatusChanged",
"type": "event"
},
{
"inputs": [],
"name": "enableArbitraryContractDeployment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_deployer",
"type": "address"
}
],
"name": "isDeployerAllowed",
"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": "_owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_deployer",
"type": "address"
},
{
"internalType": "bool",
"name": "_isWhitelisted",
"type": "bool"
}
],
"name": "setWhitelistedDeployer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "whitelist",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"08fd6322": "setWhitelistedDeployer(address,bool)",
"13af4035": "setOwner(address)",
"54fd4d50": "version()",
"8da5cb5b": "owner()",
"9b19251a": "whitelist(address)",
"b1540a01": "isDeployerAllowed(address)",
"bdc7b54f": "enableArbitraryContractDeployment()"
},
"storageLayout": {
"owner": {
"offset": 0,
"slot": "0"
},
"whitelist": {
"offset": 0,
"slot": "1"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "Hash",
"name": "uuid",
"type": "bytes32"
}
],
"name": "GameAlreadyExists",
"type": "error"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "gameType",
"type": "uint8"
}
],
"name": "NoImplementation",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "disputeProxy",
"type": "address"
},
{
"indexed": true,
"internalType": "GameType",
"name": "gameType",
"type": "uint8"
},
{
"indexed": true,
"internalType": "Claim",
"name": "rootClaim",
"type": "bytes32"
}
],
"name": "DisputeGameCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "impl",
"type": "address"
},
{
"indexed": true,
"internalType": "GameType",
"name": "gameType",
"type": "uint8"
}
],
"name": "ImplementationSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"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"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "_gameType",
"type": "uint8"
},
{
"internalType": "Claim",
"name": "_rootClaim",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "create",
"outputs": [
{
"internalType": "contract IDisputeGame",
"name": "proxy_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "gameAtIndex",
"outputs": [
{
"internalType": "GameType",
"name": "gameType_",
"type": "uint8"
},
{
"internalType": "Timestamp",
"name": "timestamp_",
"type": "uint64"
},
{
"internalType": "contract IDisputeGame",
"name": "proxy_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gameCount",
"outputs": [
{
"internalType": "uint256",
"name": "gameCount_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "",
"type": "uint8"
}
],
"name": "gameImpls",
"outputs": [
{
"internalType": "contract IDisputeGame",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "_gameType",
"type": "uint8"
},
{
"internalType": "Claim",
"name": "_rootClaim",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "games",
"outputs": [
{
"internalType": "contract IDisputeGame",
"name": "proxy_",
"type": "address"
},
{
"internalType": "Timestamp",
"name": "timestamp_",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "_gameType",
"type": "uint8"
},
{
"internalType": "Claim",
"name": "_rootClaim",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "getGameUUID",
"outputs": [
{
"internalType": "Hash",
"name": "uuid_",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "GameType",
"name": "_gameType",
"type": "uint8"
},
{
"internalType": "contract IDisputeGame",
"name": "_impl",
"type": "address"
}
],
"name": "setImplementation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"26daafbe": "getGameUUID(uint8,bytes32,bytes)",
"3142e55e": "create(uint8,bytes32,bytes)",
"45583b7a": "setImplementation(uint8,address)",
"4d1975b4": "gameCount()",
"54fd4d50": "version()",
"715018a6": "renounceOwnership()",
"8da5cb5b": "owner()",
"bb8aa1fc": "gameAtIndex(uint256)",
"c49d5271": "games(uint8,bytes32,bytes)",
"c4d66de8": "initialize(address)",
"dfa162d3": "gameImpls(uint8)",
"f2fde38b": "transferOwnership(address)"
},
"storageLayout": {
"__gap": {
"offset": 0,
"slot": "52"
},
"_disputeGameList": {
"offset": 0,
"slot": "103"
},
"_disputeGames": {
"offset": 0,
"slot": "102"
},
"_initialized": {
"offset": 0,
"slot": "0"
},
"_initializing": {
"offset": 1,
"slot": "0"
},
"_owner": {
"offset": 0,
"slot": "51"
},
"gameImpls": {
"offset": 0,
"slot": "101"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [],
"name": "DECIMALS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "baseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "gasPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "getL1Fee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "getL1GasUsed",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1BaseFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "overhead",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "scalar",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"0c18c162": "overhead()",
"2e0f2625": "DECIMALS()",
"313ce567": "decimals()",
"49948e0e": "getL1Fee(bytes)",
"519b4bd3": "l1BaseFee()",
"54fd4d50": "version()",
"6ef25c3a": "baseFee()",
"de26c4a1": "getL1GasUsed(bytes)",
"f45e65d8": "scalar()",
"fe173b97": "gasPrice()"
},
"storageLayout": {}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [],
"name": "DEPOSITOR_ACCOUNT",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "basefee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "batcherHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "hash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1FeeOverhead",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1FeeScalar",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "number",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "sequenceNumber",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "_number",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "_timestamp",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "_basefee",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "_hash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "_sequenceNumber",
"type": "uint64"
},
{
"internalType": "bytes32",
"name": "_batcherHash",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_l1FeeOverhead",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_l1FeeScalar",
"type": "uint256"
}
],
"name": "setL1BlockValues",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "timestamp",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"015d8eb9": "setL1BlockValues(uint64,uint64,uint256,bytes32,uint64,bytes32,uint256,uint256)",
"09bd5a60": "hash()",
"54fd4d50": "version()",
"5cf24969": "basefee()",
"64ca23ef": "sequenceNumber()",
"8381f58a": "number()",
"8b239f73": "l1FeeOverhead()",
"9e8c4966": "l1FeeScalar()",
"b80777ea": "timestamp()",
"e591b282": "DEPOSITOR_ACCOUNT()",
"e81b2c6d": "batcherHash()"
},
"storageLayout": {
"basefee": {
"offset": 0,
"slot": "1"
},
"batcherHash": {
"offset": 0,
"slot": "4"
},
"hash": {
"offset": 0,
"slot": "2"
},
"l1FeeOverhead": {
"offset": 0,
"slot": "5"
},
"l1FeeScalar": {
"offset": 0,
"slot": "6"
},
"number": {
"offset": 0,
"slot": "0"
},
"sequenceNumber": {
"offset": 0,
"slot": "3"
},
"timestamp": {
"offset": 8,
"slot": "0"
}
}
}
\ No newline at end of file
{
"abi": [
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "getL1BlockNumber",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"methodIdentifiers": {
"54fd4d50": "version()",
"b9b3efe9": "getL1BlockNumber()"
},
"storageLayout": {}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "getImplementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_code",
"type": "bytes"
}
],
"name": "setCode",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_key",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_value",
"type": "bytes32"
}
],
"name": "setStorage",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"methodIdentifiers": {
"13af4035": "setOwner(address)",
"6c5d4ad0": "setCode(bytes)",
"893d20e8": "getOwner()",
"9b0b0fda": "setStorage(bytes32,bytes32)",
"aaf10f42": "getImplementation()"
},
"storageLayout": {}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_messenger",
"type": "address"
},
{
"internalType": "address",
"name": "_otherBridge",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "localToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "remoteToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "extraData",
"type": "bytes"
}
],
"name": "ERC721BridgeFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "localToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "remoteToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "extraData",
"type": "bytes"
}
],
"name": "ERC721BridgeInitiated",
"type": "event"
},
{
"inputs": [],
"name": "MESSENGER",
"outputs": [
{
"internalType": "contract CrossDomainMessenger",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_localToken",
"type": "address"
},
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "uint32",
"name": "_minGasLimit",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "bridgeERC721",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_localToken",
"type": "address"
},
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "uint32",
"name": "_minGasLimit",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "bridgeERC721To",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "deposits",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_localToken",
"type": "address"
},
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_extraData",
"type": "bytes"
}
],
"name": "finalizeBridgeERC721",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "messenger",
"outputs": [
{
"internalType": "contract CrossDomainMessenger",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "otherBridge",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"3687011a": "bridgeERC721(address,address,uint256,uint32,bytes)",
"3cb747bf": "messenger()",
"54fd4d50": "version()",
"5d93a3fc": "deposits(address,address,uint256)",
"761f4493": "finalizeBridgeERC721(address,address,address,address,uint256,bytes)",
"7f46ddb2": "OTHER_BRIDGE()",
"927ede2d": "MESSENGER()",
"aa557452": "bridgeERC721To(address,address,address,uint256,uint32,bytes)",
"c89701a2": "otherBridge()"
},
"storageLayout": {
"__gap": {
"offset": 0,
"slot": "0"
},
"deposits": {
"offset": 0,
"slot": "49"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_minWithdrawalAmount",
"type": "uint256"
},
{
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "_withdrawalNetwork",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "withdrawalNetwork",
"type": "uint8"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"inputs": [],
"name": "MIN_WITHDRAWAL_AMOUNT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RECIPIENT",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "WITHDRAWAL_NETWORK",
"outputs": [
{
"internalType": "enum FeeVault.WithdrawalNetwork",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalProcessed",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"methodIdentifiers": {
"0d9019e1": "RECIPIENT()",
"3ccfd60b": "withdraw()",
"54fd4d50": "version()",
"84411d65": "totalProcessed()",
"d0e12f90": "WITHDRAWAL_NETWORK()",
"d3e5792b": "MIN_WITHDRAWAL_AMOUNT()"
},
"storageLayout": {
"totalProcessed": {
"offset": 0,
"slot": "0"
}
}
}
\ No newline at end of file
{
"abi": [
{
"inputs": [
{
"internalType": "bytes",
"name": "_message",
"type": "bytes"
}
],
"name": "passMessageToL1",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "sentMessages",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"methodIdentifiers": {
"54fd4d50": "version()",
"82e3702d": "sentMessages(bytes32)",
"cafa81dc": "passMessageToL1(bytes)"
},
"storageLayout": {
"sentMessages": {
"offset": 0,
"slot": "0"
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"abi": [
{
"inputs": [
{
"internalType": "contract AddressManager",
"name": "_addressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"methodIdentifiers": {},
"storageLayout": {
"addressManager": {
"offset": 0,
"slot": "1"
},
"implementationName": {
"offset": 0,
"slot": "0"
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
[
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "check",
"outputs": [
{
"internalType": "bool",
"name": "execute_",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
}
]
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment