dgf-prototype/backend/contractArtifacts/Onboarding.json

468 lines
62 KiB
JSON
Raw Normal View History

2024-03-18 14:03:53 -05:00
{
"_format": "hh-sol-artifact-1",
"contractName": "Onboarding",
"sourceName": "contracts/Onboarding.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract DAO",
"name": "dao_",
"type": "address"
},
{
"internalType": "contract Proposals",
"name": "proposals_",
"type": "address"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "uint256",
"name": "price_",
"type": "uint256"
}
],
"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": "uint256",
"name": "priceProposalIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "PriceChangeAccepted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceProposalIndex",
"type": "uint256"
}
],
"name": "PriceChangeProposed",
"type": "event"
},
2024-03-18 14:03:53 -05:00
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"name": "WorkApprovalSubmitted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
}
],
"name": "WorkAssigned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
}
],
"name": "WorkEvidenceSubmitted",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
2024-05-02 19:08:53 -05:00
"name": "worker",
2024-03-18 14:03:53 -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": [
2024-03-18 14:03:53 -05:00
{
"internalType": "uint256",
2024-05-02 19:08:53 -05:00
"name": "refund",
2024-03-18 14:03:53 -05:00
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "onProposalAccepted",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
2024-03-18 14:03:53 -05:00
{
"inputs": [
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "onValidate",
"outputs": [],
2024-03-18 14:03:53 -05:00
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "price",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceProposalCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "priceProposals",
"outputs": [
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newPrice",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256[3]",
"name": "durations",
"type": "uint256[3]"
}
],
"name": "proposeNewPrice",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
2024-03-18 14:03:53 -05:00
{
"inputs": [],
"name": "requestCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
2024-03-19 22:22:36 -05:00
"inputs": [
{
"internalType": "string",
"name": "requestPostId",
2024-03-19 22:22:36 -05:00
"type": "string"
}
],
2024-03-18 14:03:53 -05:00
"name": "requestWork",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "requests",
"outputs": [
{
"internalType": "address",
"name": "customer",
"type": "address"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "enum Work.WorkStatus",
2024-03-18 14:03:53 -05:00
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
},
2024-03-19 22:22:36 -05:00
{
"internalType": "string",
"name": "requestPostId",
2024-03-19 22:22:36 -05:00
"type": "string"
},
{
"internalType": "string",
"name": "evidencePostId",
2024-03-19 22:22:36 -05:00
"type": "string"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"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": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"name": "submitWorkApproval",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
2024-03-19 22:22:36 -05:00
},
{
"internalType": "string",
"name": "evidencePostId",
2024-03-19 22:22:36 -05:00
"type": "string"
2024-04-16 16:50:09 -05:00
},
{
"components": [
{
"internalType": "int256",
"name": "weightPPM",
2024-04-16 16:50:09 -05:00
"type": "int256"
},
{
"internalType": "string",
"name": "targetPostId",
"type": "string"
2024-04-16 16:50:09 -05:00
}
],
"internalType": "struct Citation[]",
"name": "citations",
"type": "tuple[]"
2024-03-18 14:03:53 -05:00
}
],
"name": "submitWorkEvidence",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
2024-05-02 19:08:53 -05:00
"bytecode": "0x60a06040523480156200001157600080fd5b506040516200354f3803806200354f8339818101604052810190620000379190620001c4565b82828282808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050508060048190555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505062000220565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000f882620000cb565b9050919050565b60006200010c82620000eb565b9050919050565b6200011e81620000ff565b81146200012a57600080fd5b50565b6000815190506200013e8162000113565b92915050565b60006200015182620000eb565b9050919050565b620001638162000144565b81146200016f57600080fd5b50565b600081519050620001838162000158565b92915050565b6000819050919050565b6200019e8162000189565b8114620001aa57600080fd5b50565b600081519050620001be8162000193565b92915050565b600080600060608486031215620001e057620001df620000c6565b5b6000620001f0868287016200012d565b9350506020620002038682870162000172565b92505060406200021686828701620001ad565b9150509250925092565b6080516132e962000266600039600081816104aa01528181610bbe01528181610c8e01528181610dab01528181610fbc015281816111d2015261126401526132e96000f3fe6080604052600436106100dd5760003560e01c8063a035b1fe1161007f578063cf37625611610059578063cf376256146102aa578063d0fae95f146102e8578063d5a44f8614610311578063d76b679414610351576100dd565b8063a035b1fe1461022b578063b4e6a1d514610256578063c4a9e1161461027f576100dd565b8063815a0572116100bb578063815a05721461016657806381d12c58146101a3578063854b6a4f146101e657806399ad6c561461020f576100dd565b80630d0271d6146100e2578063216ed6ad146100fe5780635badbe4c1461013b575b600080fd5b6100fc60048036038101906100f79190611878565b61037c565b005b34801561010a57600080fd5b5061012560048036038101906101209190611959565b6104a6565b60405161013291906119bb565b60405180910390f35b34801561014757600080fd5b506101506107ef565b60405161015d91906119bb565b60405180910390f35b34801561017257600080fd5b5061018d60048036038101906101889190611a2c565b6107f5565b60405161019a91906119bb565b60405180910390f35b3480156101af57600080fd5b506101ca60048036038101906101c59190611aa0565b610874565b6040516101dd9796959493929190611bfe565b60405180910390f35b3480156101f257600080fd5b5061020d60048036038101906102089190611ca7565b610a00565b005b61022960048036038101906102249190611d09565b610e6b565b005b34801561023757600080fd5b50610240610fb4565b60405161024d91906119bb565b60405180910390f35b34801561026257600080fd5b5061027d60048036038101906102789190611d7d565b610fba565b005b34801561028b57600080fd5b5061029461135c565b6040516102a191906119bb565b60405180910390f35b3480156102b657600080fd5b506102d160048036038101906102cc9190611aa0565b611362565b6040516102df929190611e17565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190611e96565b611386565b005b34801561031d57600080fd5b5061033860048036038101906103339190611aa0565b6115be565b6040516103489493929190611f2b565b60405180910390f35b34801561035d57600080fd5b5061036661161b565b60405161037391906119bb565b60405180910390f35b6004543410156103c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b890611fbc565b60405180910390fd5b6000600860008154809291906103d69061200b565b9190505590506000600760008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348160010181905550610447611621565b81600301819055508383826004019182610462929190612299565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b4828260030154604051610498929190611e17565b60405180910390a150505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052d906123db565b60405180910390fd5b60008311610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057090612447565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffff
"deployedBytecode": "0x6080604052600436106100dd5760003560e01c8063a035b1fe1161007f578063cf37625611610059578063cf376256146102aa578063d0fae95f146102e8578063d5a44f8614610311578063d76b679414610351576100dd565b8063a035b1fe1461022b578063b4e6a1d514610256578063c4a9e1161461027f576100dd565b8063815a0572116100bb578063815a05721461016657806381d12c58146101a3578063854b6a4f146101e657806399ad6c561461020f576100dd565b80630d0271d6146100e2578063216ed6ad146100fe5780635badbe4c1461013b575b600080fd5b6100fc60048036038101906100f79190611878565b61037c565b005b34801561010a57600080fd5b5061012560048036038101906101209190611959565b6104a6565b60405161013291906119bb565b60405180910390f35b34801561014757600080fd5b506101506107ef565b60405161015d91906119bb565b60405180910390f35b34801561017257600080fd5b5061018d60048036038101906101889190611a2c565b6107f5565b60405161019a91906119bb565b60405180910390f35b3480156101af57600080fd5b506101ca60048036038101906101c59190611aa0565b610874565b6040516101dd9796959493929190611bfe565b60405180910390f35b3480156101f257600080fd5b5061020d60048036038101906102089190611ca7565b610a00565b005b61022960048036038101906102249190611d09565b610e6b565b005b34801561023757600080fd5b50610240610fb4565b60405161024d91906119bb565b60405180910390f35b34801561026257600080fd5b5061027d60048036038101906102789190611d7d565b610fba565b005b34801561028b57600080fd5b5061029461135c565b6040516102a191906119bb565b60405180910390f35b3480156102b657600080fd5b506102d160048036038101906102cc9190611aa0565b611362565b6040516102df929190611e17565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190611e96565b611386565b005b34801561031d57600080fd5b5061033860048036038101906103339190611aa0565b6115be565b6040516103489493929190611f2b565b60405180910390f35b34801561035d57600080fd5b5061036661161b565b60405161037391906119bb565b60405180910390f35b6004543410156103c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b890611fbc565b60405180910390fd5b6000600860008154809291906103d69061200b565b9190505590506000600760008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348160010181905550610447611621565b81600301819055508383826004019182610462929190612299565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b4828260030154604051610498929190611e17565b60405180910390a150505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052d906123db565b60405180910390fd5b60008311610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057090612447565b60405180910390fd5b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114801561062e57508473ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561069557600260008154809291906106469061200b565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610739565b60008082815260200190815260200160002060030160009054906101000a900460ff161561071f57600260008154809291906106d09061200b565b91905055905080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610738565b6000808281526020019081526020016000206001015491505b5b60008060008381526020019081526020016000209050858160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084816001018190555083426107a79190612467565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e9826040516107de91906119bb565b60405180910390a150509392505050565b600854
2024-03-18 14:03:53 -05:00
"linkReferences": {},
"deployedLinkReferences": {}
}