dgf-prototype/backend/contractArtifacts/Rollup.json

267 lines
41 KiB
JSON
Raw Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "Rollup",
"sourceName": "contracts/Rollup.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract DAO",
"name": "dao",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
}
],
"name": "AvailabilityStaked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
2024-05-02 19:08:53 -05:00
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
}
],
"name": "BatchItemAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "batchWorker",
"type": "address"
}
],
"name": "BatchWorkerAssigned",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
2024-05-02 19:08:53 -05:00
"name": "worker",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "acceptAvailability",
2024-05-02 19:08:53 -05:00
"outputs": [
{
"internalType": "uint256",
"name": "refund",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "author",
"type": "address"
},
{
"internalType": "uint256",
"name": "stakeAmount",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
}
],
"name": "addItem",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "batchWorker",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "itemCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "items",
"outputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "worker",
"type": "address"
},
{
"internalType": "uint256",
"name": "stakeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "stakeCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "stakes",
"outputs": [
{
"internalType": "address",
"name": "worker",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "assigned",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "batchPostId",
"type": "string"
},
{
2024-05-03 20:43:58 -05:00
"internalType": "string[]",
"name": "batchItems",
"type": "string[]"
},
{
"internalType": "uint256",
"name": "poolDuration",
"type": "uint256"
}
],
"name": "submitBatch",
"outputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
2024-05-03 20:43:58 -05:00
"bytecode": "0x60a06040523480156200001157600080fd5b5060405162002407380380620024078339818101604052810190620000379190620000f4565b80808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050505062000126565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a8826200007b565b9050919050565b6000620000bc826200009b565b9050919050565b620000ce81620000af565b8114620000da57600080fd5b50565b600081519050620000ee81620000c3565b92915050565b6000602082840312156200010d576200010c62000076565b5b60006200011d84828501620000dd565b91505092915050565b6080516122b0620001576000396000818161021c015281816107c0015281816108aa01526109ec01526122b06000f3fe60806040526004361061007b5760003560e01c8063bfb231d21161004e578063bfb231d214610150578063c4a9e11614610191578063d5a44f86146101bc578063f85c5a8a146101fc5761007b565b8063216ed6ad1461008057806324364a6b146100bd5780632c6a2e83146100e85780636bfb0d0114610125575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a2919061122a565b610218565b6040516100b4919061128c565b60405180910390f35b3480156100c957600080fd5b506100d2610561565b6040516100df91906112b6565b60405180910390f35b3480156100f457600080fd5b5061010f600480360381019061010a919061138c565b610587565b60405161011c919061128c565b60405180910390f35b34801561013157600080fd5b5061013a610d28565b604051610147919061128c565b60405180910390f35b34801561015c57600080fd5b5061017760048036038101906101729190611421565b610d2e565b6040516101889594939291906114de565b60405180910390f35b34801561019d57600080fd5b506101a6610e2c565b6040516101b3919061128c565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190611421565b610e32565b6040516101f39493929190611553565b60405180910390f35b61021660048036038101906102119190611598565b610e8f565b005b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029f9061167e565b60405180910390fd5b600083116102eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e2906116ea565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811480156103a057508473ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561040757600260008154809291906103b890611739565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104ab565b60008082815260200190815260200160002060030160009054906101000a900460ff1615610491576002600081548092919061044290611739565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104aa565b6000808281526020019081526020016000206001015491505b5b60008060008381526020019081526020016000209050858160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816001018190555083426105199190611781565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e982604051610550919061128c565b60405180910390a150509392505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066f57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461066e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066590611827565b60405180910390fd5b5b6004548484905011156106b7576040517f08c379a0000000000000000000000000000000000000000000000000000000
"deployedBytecode": "0x60806040526004361061007b5760003560e01c8063bfb231d21161004e578063bfb231d214610150578063c4a9e11614610191578063d5a44f86146101bc578063f85c5a8a146101fc5761007b565b8063216ed6ad1461008057806324364a6b146100bd5780632c6a2e83146100e85780636bfb0d0114610125575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a2919061122a565b610218565b6040516100b4919061128c565b60405180910390f35b3480156100c957600080fd5b506100d2610561565b6040516100df91906112b6565b60405180910390f35b3480156100f457600080fd5b5061010f600480360381019061010a919061138c565b610587565b60405161011c919061128c565b60405180910390f35b34801561013157600080fd5b5061013a610d28565b604051610147919061128c565b60405180910390f35b34801561015c57600080fd5b5061017760048036038101906101729190611421565b610d2e565b6040516101889594939291906114de565b60405180910390f35b34801561019d57600080fd5b506101a6610e2c565b6040516101b3919061128c565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190611421565b610e32565b6040516101f39493929190611553565b60405180910390f35b61021660048036038101906102119190611598565b610e8f565b005b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029f9061167e565b60405180910390fd5b600083116102eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e2906116ea565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811480156103a057508473ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561040757600260008154809291906103b890611739565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104ab565b60008082815260200190815260200160002060030160009054906101000a900460ff1615610491576002600081548092919061044290611739565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104aa565b6000808281526020019081526020016000206001015491505b5b60008060008381526020019081526020016000209050858160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816001018190555083426105199190611781565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e982604051610550919061128c565b60405180910390a150509392505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066f57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461066e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066590611827565b60405180910390fd5b5b6004548484905011156106b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ae90611893565b60405180910390fd5b60005b8484905081101561077857600360008281526020019081526020016000206004016040516106e891906119b6565b6040518091039020858583818110610703576107026119cd565b5b90506020028101906107159190611a0b565b604051610723929190611aa2565b60405180910390201461076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290611b07565b60405180910390fd5b80806001019150506106ba565b50600080600090505b858590508110156107bd576003600082815260200190815260200160002060030154826107ae9190611781565b91508080600101915050610781565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffff
"linkReferences": {},
"deployedLinkReferences": {}
}