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

738 lines
59 KiB
JSON
Raw Normal View History

2024-07-22 09:32:51 +00:00
{
"_format": "hh-sol-artifact-1",
"contractName": "PoraMine",
"sourceName": "contracts/miner/Mine.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": [],
"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": "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"
}
],
"bytecode": "0x60e06040526064600355600a600455600a6005556014600655600060075560006008553480156200002f57600080fd5b5060405162002aba38038062002aba8339810160408190526200005291620000d4565b6200005d336200007b565b6001811615608052600281161560a052600416151560c052620000ee565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600060208284031215620000e757600080fd5b5051919050565b60805160a05160c0516129806200013a600039600081816102ce01528181610c2f0152610f9a0152600081816102fe01526109f101526000818161034401526109b401526129806000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637bba7d61116100f9578063aed7522411610097578063b776a51211610071578063b776a512146103b2578063dddc61a8146103bb578063f2fde38b146103c4578063ffbc9bd0146103d757600080fd5b8063aed7522414610379578063b0628ee01461038c578063b4988fd01461039f57600080fd5b80638da5cb5b116100d35780638da5cb5b14610320578063a827918214610336578063adaa7a0f1461033f578063ae722e821461036657600080fd5b80637bba7d61146102c95780637eca5688146102f057806382975fe7146102f957600080fd5b8063343aad821161016657806348f614411161014057806348f61441146102925780635bdca8551461029b578063704d3c96146102ae578063715018a6146102c157600080fd5b8063343aad821461024357806339cd53ee146102565780633baebb751461027f57600080fd5b8063047c13f5146101ae578063158ef93e146101c35780631600c624146101e5578063228cb733146101f857806331223ba714610223578063331f3b9c1461023a575b600080fd5b6101c16101bc36600461231c565b6103df565b005b6000546101d09060ff1681565b60405190151581526020015b60405180910390f35b6101c16101f336600461234f565b6104fb565b60025461020b906001600160a01b031681565b6040516001600160a01b0390911681526020016101dc565b61022c60075481565b6040519081526020016101dc565b61022c60035481565b60015461020b906001600160a01b031681565b61020b61026436600461234f565b600a602052600090815260409020546001600160a01b031681565b6101c161028d3660046125e5565b610508565b61022c60095481565b6101c16102a936600461234f565b61079f565b6101c16102bc36600461234f565b6107bf565b6101c16107cc565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61022c60055481565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60005461010090046001600160a01b031661020b565b61022c60085481565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b6101c161037436600461267d565b6107e0565b61022c61038736600461267d565b610c5b565b6101c161039a3660046126b9565b610e5e565b6101c16103ad3660046126e3565b610f1e565b61022c60045481565b61022c60065481565b6101c16103d236600461271f565b610ff4565b6101d061106a565b60006103ec600143612750565b60408051914060208301526bffffffffffffffffffffffff193360601b16908201526001600160c01b031960c084901b166054820152605c0160408051601f1981840301815291815281516020928301206000818152600a9093529120549091506001600160a01b0316156104a15760405162461bcd60e51b8152602060048201526016602482015275135a5b995c9259081a185cc81c9959da5cdd195c995960521b60448201526064015b60405180910390fd5b6000818152600a602052604080822080546001600160a01b0319166001600160a01b0387169081179091559051909183917fbfeb006f16aca8eb3d9953cf44db6b11b6f3041a313875dfa18f2e9d71bd309e9190a3505050565b610503611105565b600355565b815160a08201511461055c5760405162461bcd60e51b815260206004820152601a60248201527f496e636f6e73697374656e74206d696e696e67206469676573740000000000006044820152606401610498565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708160a00151036105cf5760405162461bcd60e51b815260206004820152601960248201527f456d707479206469676573742063616e206e6f74206d696e65000000000000006044820152606401610498565b600454600854106106225760405162461bcd60e51b815260206004820152601c60248201527f45706f63682068617320656e6f756768207375626d697373696f6e73000000006044820152606401610498565b600061010061063361040082612763565b61063d9190612798565b61010061064c61040082612763565b6106569190612798565b83606001516106659190612798565b61066f9190612763565b60608401519091506106819082611165565b60015460c0840151604051630fab20e160e31b815260048101919091526000916001600160a01b031690637d590708906024016040805180830381
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637bba7d61116100f9578063aed7522411610097578063b776a51211610071578063b776a512146103b2578063dddc61a8146103bb578063f2fde38b146103c4578063ffbc9bd0146103d757600080fd5b8063aed7522414610379578063b0628ee01461038c578063b4988fd01461039f57600080fd5b80638da5cb5b116100d35780638da5cb5b14610320578063a827918214610336578063adaa7a0f1461033f578063ae722e821461036657600080fd5b80637bba7d61146102c95780637eca5688146102f057806382975fe7146102f957600080fd5b8063343aad821161016657806348f614411161014057806348f61441146102925780635bdca8551461029b578063704d3c96146102ae578063715018a6146102c157600080fd5b8063343aad821461024357806339cd53ee146102565780633baebb751461027f57600080fd5b8063047c13f5146101ae578063158ef93e146101c35780631600c624146101e5578063228cb733146101f857806331223ba714610223578063331f3b9c1461023a575b600080fd5b6101c16101bc36600461231c565b6103df565b005b6000546101d09060ff1681565b60405190151581526020015b60405180910390f35b6101c16101f336600461234f565b6104fb565b60025461020b906001600160a01b031681565b6040516001600160a01b0390911681526020016101dc565b61022c60075481565b6040519081526020016101dc565b61022c60035481565b60015461020b906001600160a01b031681565b61020b61026436600461234f565b600a602052600090815260409020546001600160a01b031681565b6101c161028d3660046125e5565b610508565b61022c60095481565b6101c16102a936600461234f565b61079f565b6101c16102bc36600461234f565b6107bf565b6101c16107cc565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61022c60055481565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60005461010090046001600160a01b031661020b565b61022c60085481565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b6101c161037436600461267d565b6107e0565b61022c61038736600461267d565b610c5b565b6101c161039a3660046126b9565b610e5e565b6101c16103ad3660046126e3565b610f1e565b61022c60045481565b61022c60065481565b6101c16103d236600461271f565b610ff4565b6101d061106a565b60006103ec600143612750565b60408051914060208301526bffffffffffffffffffffffff193360601b16908201526001600160c01b031960c084901b166054820152605c0160408051601f1981840301815291815281516020928301206000818152600a9093529120549091506001600160a01b0316156104a15760405162461bcd60e51b8152602060048201526016602482015275135a5b995c9259081a185cc81c9959da5cdd195c995960521b60448201526064015b60405180910390fd5b6000818152600a602052604080822080546001600160a01b0319166001600160a01b0387169081179091559051909183917fbfeb006f16aca8eb3d9953cf44db6b11b6f3041a313875dfa18f2e9d71bd309e9190a3505050565b610503611105565b600355565b815160a08201511461055c5760405162461bcd60e51b815260206004820152601a60248201527f496e636f6e73697374656e74206d696e696e67206469676573740000000000006044820152606401610498565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708160a00151036105cf5760405162461bcd60e51b815260206004820152601960248201527f456d707479206469676573742063616e206e6f74206d696e65000000000000006044820152606401610498565b600454600854106106225760405162461bcd60e51b815260206004820152601c60248201527f45706f63682068617320656e6f756768207375626d697373696f6e73000000006044820152606401610498565b600061010061063361040082612763565b61063d9190612798565b61010061064c61040082612763565b6106569190612798565b83606001516106659190612798565b61066f9190612763565b60608401519091506106819082611165565b60015460c0840151604051630fab20e160e31b815260048101919091526000916001600160a01b031690637d590708906024016040805180830381865afa1580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906127c3565b905060006101006107086104006004612763565b6107129190612798565b8560800151610721919061281d565b90508082600001516001600160801b031610801561074c57508082602001516001600160801b031610155b6107985760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964207365616c656420636f6e74657874206469676573740000006044820152606401610498565b5050505050565b6107a7611105565b60058190556007546000036107bc5760048190555b50565b6107c7611105565b600655565b6107d4611105565b6107de60006113a9565b565b604081015161082a5760405162461bcd60e5
"linkReferences": {},
"deployedLinkReferences": {}
}