2024-04-28 20:27:25 -05:00
|
|
|
{
|
|
|
|
"_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"
|
|
|
|
},
|
2024-05-01 22:24:53 -05:00
|
|
|
{
|
|
|
|
"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"
|
2024-05-01 22:24:53 -05:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"name": "BatchItemAdded",
|
|
|
|
"type": "event"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"anonymous": false,
|
|
|
|
"inputs": [
|
|
|
|
{
|
|
|
|
"indexed": false,
|
|
|
|
"internalType": "address",
|
|
|
|
"name": "batchWorker",
|
|
|
|
"type": "address"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"name": "BatchWorkerAssigned",
|
|
|
|
"type": "event"
|
|
|
|
},
|
2024-04-28 20:27:25 -05:00
|
|
|
{
|
|
|
|
"inputs": [
|
|
|
|
{
|
|
|
|
"internalType": "address",
|
2024-05-02 19:08:53 -05:00
|
|
|
"name": "worker",
|
2024-04-28 20:27:25 -05:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 20:27:25 -05:00
|
|
|
"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"
|
|
|
|
},
|
2024-05-01 22:24:53 -05:00
|
|
|
{
|
|
|
|
"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"
|
|
|
|
},
|
2024-04-28 20:27:25 -05:00
|
|
|
{
|
|
|
|
"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"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"internalType": "uint256",
|
|
|
|
"name": "batchSize",
|
|
|
|
"type": "uint256"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"internalType": "uint256",
|
|
|
|
"name": "poolDuration",
|
|
|
|
"type": "uint256"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"name": "submitBatch",
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"internalType": "uint256",
|
|
|
|
"name": "poolIndex",
|
|
|
|
"type": "uint256"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"stateMutability": "nonpayable",
|
|
|
|
"type": "function"
|
|
|
|
}
|
|
|
|
],
|
2024-05-02 19:08:53 -05:00
|
|
|
"bytecode": "0x60a06040523480156200001157600080fd5b50604051620020b4380380620020b48339818101604052810190620000379190620000f4565b80808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050505062000126565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a8826200007b565b9050919050565b6000620000bc826200009b565b9050919050565b620000ce81620000af565b8114620000da57600080fd5b50565b600081519050620000ee81620000c3565b92915050565b6000602082840312156200010d576200010c62000076565b5b60006200011d84828501620000dd565b91505092915050565b608051611f5d620001576000396000818161021c01528181610860015281816109470152610a890152611f5d6000f3fe60806040526004361061007b5760003560e01c8063c4a9e1161161004e578063c4a9e11614610154578063d5a44f861461017f578063da553ec2146101bf578063f85c5a8a146101fc5761007b565b8063216ed6ad1461008057806324364a6b146100bd5780636bfb0d01146100e8578063bfb231d214610113575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a29190611153565b610218565b6040516100b491906111b5565b60405180910390f35b3480156100c957600080fd5b506100d2610561565b6040516100df91906111df565b60405180910390f35b3480156100f457600080fd5b506100fd610587565b60405161010a91906111b5565b60405180910390f35b34801561011f57600080fd5b5061013a600480360381019061013591906111fa565b61058d565b60405161014b9594939291906112b7565b60405180910390f35b34801561016057600080fd5b5061016961068b565b60405161017691906111b5565b60405180910390f35b34801561018b57600080fd5b506101a660048036038101906101a191906111fa565b610691565b6040516101b6949392919061132c565b60405180910390f35b3480156101cb57600080fd5b506101e660048036038101906101e191906113d6565b6106ee565b6040516101f391906111b5565b60405180910390f35b6102166004803603810190610211919061144a565b610db8565b005b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029f90611530565b60405180910390fd5b600083116102eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e29061159c565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811480156103a057508473ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561040757600260008154809291906103b8906115eb565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104ab565b60008082815260200190815260200160002060030160009054906101000a900460ff16156104915760026000815480929190610442906115eb565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104aa565b6000808281526020019081526020016000206001015491505b5b60008060008381526020019081526020016000209050858160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816001018190555083426105199190611633565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e98260405161055091906111b5565b60405180910390a150509392505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60036020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600201549080600301549080600401805461060890611696565b80601f016020809104026020016040519081016040528092919081815260200182805461063490611696565b80156106815780601f1061065657610100808354040283529160200191610681565b820191906000526020600020905b81548152906001019060200180831161066457829003601f168201915b5050505050905085565b60025481565b6000602052806000526040600020
|
|
|
|
"deployedBytecode": "0x60806040526004361061007b5760003560e01c8063c4a9e1161161004e578063c4a9e11614610154578063d5a44f861461017f578063da553ec2146101bf578063f85c5a8a146101fc5761007b565b8063216ed6ad1461008057806324364a6b146100bd5780636bfb0d01146100e8578063bfb231d214610113575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a29190611153565b610218565b6040516100b491906111b5565b60405180910390f35b3480156100c957600080fd5b506100d2610561565b6040516100df91906111df565b60405180910390f35b3480156100f457600080fd5b506100fd610587565b60405161010a91906111b5565b60405180910390f35b34801561011f57600080fd5b5061013a600480360381019061013591906111fa565b61058d565b60405161014b9594939291906112b7565b60405180910390f35b34801561016057600080fd5b5061016961068b565b60405161017691906111b5565b60405180910390f35b34801561018b57600080fd5b506101a660048036038101906101a191906111fa565b610691565b6040516101b6949392919061132c565b60405180910390f35b3480156101cb57600080fd5b506101e660048036038101906101e191906113d6565b6106ee565b6040516101f391906111b5565b60405180910390f35b6102166004803603810190610211919061144a565b610db8565b005b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029f90611530565b60405180910390fd5b600083116102eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e29061159c565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811480156103a057508473ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561040757600260008154809291906103b8906115eb565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104ab565b60008082815260200190815260200160002060030160009054906101000a900460ff16156104915760026000815480929190610442906115eb565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104aa565b6000808281526020019081526020016000206001015491505b5b60008060008381526020019081526020016000209050858160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816001018190555083426105199190611633565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e98260405161055091906111b5565b60405180910390a150509392505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60036020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600201549080600301549080600401805461060890611696565b80601f016020809104026020016040519081016040528092919081815260200182805461063490611696565b80156106815780601f1061065657610100808354040283529160200191610681565b820191906000526020600020905b81548152906001019060200180831161066457829003601f168201915b5050505050905085565b60025481565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030160009054906101000a900460ff16905084565b6000600454831115610735576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072c90611713565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461081c57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081b576040517f08c379a000000000000000000000
|
2024-04-28 20:27:25 -05:00
|
|
|
"linkReferences": {},
|
|
|
|
"deployedLinkReferences": {}
|
|
|
|
}
|