0g-storage-node/storage-contracts-abis/PoraMineTest.json

945 lines
65 KiB
JSON
Raw Normal View History

2024-07-22 09:32:51 +00:00
{
"_format": "hh-sol-artifact-1",
"contractName": "PoraMineTest",
"sourceName": "contracts/test/PoraMineTest.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "settings",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
}
],
"name": "NewMinerId",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "epoch",
"type": "uint256"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "epochIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
}
],
"name": "NewSubmission",
"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": "minerId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "UpdateMinerId",
"type": "event"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "contextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "startPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineLength",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "shardId",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "shardMask",
"type": "uint64"
}
],
"internalType": "struct RecallRange",
"name": "range",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sealOffset",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sealedContextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32[128]",
"name": "sealedData",
"type": "bytes32[128]"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"internalType": "struct MineLib.PoraAnswer",
"name": "answer",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "epoch",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineStart",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "flowRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "flowLength",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "blockDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "digest",
"type": "bytes32"
}
],
"internalType": "struct MineContext",
"name": "context",
"type": "tuple"
}
],
"name": "basicCheck",
"outputs": [],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "beneficiaries",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "canSubmit",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "currentSubmissions",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dataProofEnabled",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "difficultyAdjustRatio",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fixedDifficulty",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "flow",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "difficulty",
"type": "uint256"
},
{
"internalType": "address",
"name": "flow_",
"type": "address"
},
{
"internalType": "address",
"name": "reward_",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initialized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lastMinedEpoch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "contextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "startPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineLength",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "shardId",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "shardMask",
"type": "uint64"
}
],
"internalType": "struct RecallRange",
"name": "range",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sealOffset",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sealedContextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32[128]",
"name": "sealedData",
"type": "bytes32[128]"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"internalType": "struct MineLib.PoraAnswer",
"name": "answer",
"type": "tuple"
}
],
"name": "pora",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poraTarget",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "contextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "startPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineLength",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "shardId",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "shardMask",
"type": "uint64"
}
],
"internalType": "struct RecallRange",
"name": "range",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sealOffset",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sealedContextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32[128]",
"name": "sealedData",
"type": "bytes32[128]"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"internalType": "struct MineLib.PoraAnswer",
"name": "answer",
"type": "tuple"
},
{
"internalType": "bytes32[128]",
"name": "unsealedData",
"type": "bytes32[128]"
}
],
"name": "recoverMerkleRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "uint64",
"name": "seed",
"type": "uint64"
}
],
"name": "requestMinerId",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "reward",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "sealDataEnabled",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "difficultyAdjustRatio_",
"type": "uint256"
}
],
"name": "setDifficultyAdjustRatio",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
}
],
"name": "setMiner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_targetQuality",
"type": "uint256"
}
],
"name": "setQuality",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "targetMineBlocks_",
"type": "uint256"
}
],
"name": "setTargetMineBlocks",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "targetSubmissions_",
"type": "uint256"
}
],
"name": "setTargetSubmissions",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "contextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "startPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineLength",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "shardId",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "shardMask",
"type": "uint64"
}
],
"internalType": "struct RecallRange",
"name": "range",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sealOffset",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sealedContextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32[128]",
"name": "sealedData",
"type": "bytes32[128]"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"internalType": "struct MineLib.PoraAnswer",
"name": "answer",
"type": "tuple"
}
],
"name": "submit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "targetMineBlocks",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "targetSubmissions",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "targetSubmissionsNextEpoch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
}
],
"name": "transferBeneficial",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "contextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "nonce",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "minerId",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "startPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "mineLength",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "shardId",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "shardMask",
"type": "uint64"
}
],
"internalType": "struct RecallRange",
"name": "range",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "recallPosition",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sealOffset",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sealedContextDigest",
"type": "bytes32"
},
{
"internalType": "bytes32[128]",
"name": "sealedData",
"type": "bytes32[128]"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"internalType": "struct MineLib.PoraAnswer",
"name": "answer",
"type": "tuple"
}
],
"name": "unseal",
"outputs": [
{
"internalType": "bytes32[128]",
"name": "unsealedData",
"type": "bytes32[128]"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x60e06040526064600355600a600455600a6005556014600655600060075560006008553480156200002f57600080fd5b5060405162002c0438038062002c048339810160408190526200005291620000d9565b60048117620000613362000080565b6001811615608052600281161560a052600416151560c05250620000f3565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600060208284031215620000ec57600080fd5b5051919050565b60805160a05160c051612ac56200013f6000396000818161033d01528181610d09015261107401526000818161036d0152610acb0152600081816103b30152610a8e0152612ac56000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80637bba7d611161010f578063b0628ee0116100a2578063dddc61a811610071578063dddc61a814610458578063e1498cf914610461578063f2fde38b14610474578063ffbc9bd01461048757600080fd5b8063b0628ee0146103fb578063b4988fd01461040e578063b51e039714610421578063b776a5121461044f57600080fd5b8063a8279182116100de578063a8279182146103a5578063adaa7a0f146103ae578063ae722e82146103d5578063aed75224146103e857600080fd5b80637bba7d61146103385780637eca56881461035f57806382975fe7146103685780638da5cb5b1461038f57600080fd5b806339cd53ee116101875780635bdca855116101565780635bdca855146102f75780636e9bb60b1461030a578063704d3c961461031d578063715018a61461033057600080fd5b806339cd53ee146102925780633baebb75146102bb57806348f61441146102ce57806359e7b5be146102d757600080fd5b8063228cb733116101c3578063228cb7331461023457806331223ba71461025f578063331f3b9c14610276578063343aad821461027f57600080fd5b8063047c13f5146101ea578063158ef93e146101ff5780631600c62414610221575b600080fd5b6101fd6101f83660046123f2565b61048f565b005b60005461020c9060ff1681565b60405190151581526020015b60405180910390f35b6101fd61022f366004612425565b6105ab565b600254610247906001600160a01b031681565b6040516001600160a01b039091168152602001610218565b61026860075481565b604051908152602001610218565b61026860035481565b600154610247906001600160a01b031681565b6102476102a0366004612425565b600a602052600090815260409020546001600160a01b031681565b6101fd6102c93660046126bb565b6105b8565b61026860095481565b6102ea6102e5366004612753565b61084f565b604051610218919061278f565b6101fd610305366004612425565b610866565b6102686103183660046127c1565b610886565b6101fd61032b366004612425565b610899565b6101fd6108a6565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b61026860055481565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b60005461010090046001600160a01b0316610247565b61026860085481565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b6101fd6103e3366004612753565b6108ba565b6102686103f6366004612753565b610d35565b6101fd610409366004612807565b610f38565b6101fd61041c366004612831565b610ff8565b6101fd61042f366004612425565b6000908152600a6020526040902080546001600160a01b03191633179055565b61026860045481565b61026860065481565b6101fd61046f366004612425565b600955565b6101fd61048236600461286d565b6110ce565b61020c611144565b600061049c60014361289e565b60408051914060208301526bffffffffffffffffffffffff193360601b16908201526001600160c01b031960c084901b166054820152605c0160408051601f1981840301815291815281516020928301206000818152600a9093529120549091506001600160a01b0316156105515760405162461bcd60e51b8152602060048201526016602482015275135a5b995c9259081a185cc81c9959da5cdd195c995960521b60448201526064015b60405180910390fd5b6000818152600a602052604080822080546001600160a01b0319166001600160a01b0387169081179091559051909183917fbfeb006f16aca8eb3d9953cf44db6b11b6f3041a313875dfa18f2e9d71bd309e9190a3505050565b6105b36111df565b600355565b815160a08201511461060c5760405162461bcd60e51b815260206004820152601a60248201527f496e636f6e73697374656e74206d696e696e67206469676573740000000000006044820152606401610548565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708160a001510361067f5760405162461bcd60e51b815260206004820152601960248201527f456d707479206469676573742063616e206e6f74206d696e65000000000000006044820152606401610548565b600454600854106106d25760405162461bcd60e51b815260206004820152601c60248201527f45706f63682068617320656e6f7567682073
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80637bba7d611161010f578063b0628ee0116100a2578063dddc61a811610071578063dddc61a814610458578063e1498cf914610461578063f2fde38b14610474578063ffbc9bd01461048757600080fd5b8063b0628ee0146103fb578063b4988fd01461040e578063b51e039714610421578063b776a5121461044f57600080fd5b8063a8279182116100de578063a8279182146103a5578063adaa7a0f146103ae578063ae722e82146103d5578063aed75224146103e857600080fd5b80637bba7d61146103385780637eca56881461035f57806382975fe7146103685780638da5cb5b1461038f57600080fd5b806339cd53ee116101875780635bdca855116101565780635bdca855146102f75780636e9bb60b1461030a578063704d3c961461031d578063715018a61461033057600080fd5b806339cd53ee146102925780633baebb75146102bb57806348f61441146102ce57806359e7b5be146102d757600080fd5b8063228cb733116101c3578063228cb7331461023457806331223ba71461025f578063331f3b9c14610276578063343aad821461027f57600080fd5b8063047c13f5146101ea578063158ef93e146101ff5780631600c62414610221575b600080fd5b6101fd6101f83660046123f2565b61048f565b005b60005461020c9060ff1681565b60405190151581526020015b60405180910390f35b6101fd61022f366004612425565b6105ab565b600254610247906001600160a01b031681565b6040516001600160a01b039091168152602001610218565b61026860075481565b604051908152602001610218565b61026860035481565b600154610247906001600160a01b031681565b6102476102a0366004612425565b600a602052600090815260409020546001600160a01b031681565b6101fd6102c93660046126bb565b6105b8565b61026860095481565b6102ea6102e5366004612753565b61084f565b604051610218919061278f565b6101fd610305366004612425565b610866565b6102686103183660046127c1565b610886565b6101fd61032b366004612425565b610899565b6101fd6108a6565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b61026860055481565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b60005461010090046001600160a01b0316610247565b61026860085481565b61020c7f000000000000000000000000000000000000000000000000000000000000000081565b6101fd6103e3366004612753565b6108ba565b6102686103f6366004612753565b610d35565b6101fd610409366004612807565b610f38565b6101fd61041c366004612831565b610ff8565b6101fd61042f366004612425565b6000908152600a6020526040902080546001600160a01b03191633179055565b61026860045481565b61026860065481565b6101fd61046f366004612425565b600955565b6101fd61048236600461286d565b6110ce565b61020c611144565b600061049c60014361289e565b60408051914060208301526bffffffffffffffffffffffff193360601b16908201526001600160c01b031960c084901b166054820152605c0160408051601f1981840301815291815281516020928301206000818152600a9093529120549091506001600160a01b0316156105515760405162461bcd60e51b8152602060048201526016602482015275135a5b995c9259081a185cc81c9959da5cdd195c995960521b60448201526064015b60405180910390fd5b6000818152600a602052604080822080546001600160a01b0319166001600160a01b0387169081179091559051909183917fbfeb006f16aca8eb3d9953cf44db6b11b6f3041a313875dfa18f2e9d71bd309e9190a3505050565b6105b36111df565b600355565b815160a08201511461060c5760405162461bcd60e51b815260206004820152601a60248201527f496e636f6e73697374656e74206d696e696e67206469676573740000000000006044820152606401610548565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708160a001510361067f5760405162461bcd60e51b815260206004820152601960248201527f456d707479206469676573742063616e206e6f74206d696e65000000000000006044820152606401610548565b600454600854106106d25760405162461bcd60e51b815260206004820152601c60248201527f45706f63682068617320656e6f756768207375626d697373696f6e73000000006044820152606401610548565b60006101006106e3610400826128b1565b6106ed91906128e6565b6101006106fc610400826128b1565b61070691906128e6565b836060015161071591906128e6565b61071f91906128b1565b6060840151909150610731908261123f565b60015460c0840151604051630fab20e160e31b815260048101919091526000916001600160a01b031690637d590708906024016040805180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190612911565b905060006101006107b861040060046128b1565b6107c291906128e6565b85608001516107d1919061296b565b90508082600001516001600160801b03161080156107fc57508082602001516001
"linkReferences": {},
"deployedLinkReferences": {}
}