dgf-prototype/backend/contractArtifacts/Onboarding.json

496 lines
65 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"
},
{
"inputs": [
{
"internalType": "address",
"name": "dao",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "InvalidSender",
"type": "error"
},
2024-03-18 14:03:53 -05:00
{
"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",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "acceptAvailability",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "extendAvailability",
"outputs": [],
"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"
}
],
"bytecode": "0x60a06040523480156200001157600080fd5b5060405162003787380380620037878339818101604052810190620000379190620001c4565b82828282808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050508060038190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505062000220565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000f882620000cb565b9050919050565b60006200010c82620000eb565b9050919050565b6200011e81620000ff565b81146200012a57600080fd5b50565b6000815190506200013e8162000113565b92915050565b60006200015182620000eb565b9050919050565b620001638162000144565b81146200016f57600080fd5b50565b600081519050620001838162000158565b92915050565b6000819050919050565b6200019e8162000189565b8114620001aa57600080fd5b50565b600081519050620001be8162000193565b92915050565b600080600060608486031215620001e057620001df620000c6565b5b6000620001f0868287016200012d565b9350506020620002038682870162000172565b92505060406200021686828701620001ad565b9150509250925092565b60805161351362000274600039600081816104c801528181610556015281816105a901528181610ae701528181610bb701528181610cd401528181610ee5015281816110fb015261118d01526135136000f3fe6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102ca578063d0fae95f14610308578063d5a44f8614610331578063d76b679414610371576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c0014610276578063c4a9e1161461029f576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b61010760048036038101906101029190611915565b61039c565b005b34801561011557600080fd5b50610130600480360381019061012b91906119f6565b6104c6565b005b34801561013e57600080fd5b50610147610718565b6040516101549190611a58565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f9190611ac9565b61071e565b6040516101919190611a58565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611b3d565b61079d565b6040516101d49796959493929190611c9b565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611d44565b610929565b005b610220600480360381019061021b9190611da6565b610d94565b005b34801561022e57600080fd5b50610237610edd565b6040516102449190611a58565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611e1a565b610ee3565b005b34801561028257600080fd5b5061029d60048036038101906102989190611eb4565b611285565b005b3480156102ab57600080fd5b506102b46113f9565b6040516102c19190611a58565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec9190611b3d565b6113ff565b6040516102ff929190611ef4565b60405180910390f35b34801561031457600080fd5b5061032f600480360381019061032a9190611f73565b611423565b005b34801561033d57600080fd5b5061035860048036038101906103539190611b3d565b61165b565b6040516103689493929190612008565b60405180910390f35b34801561037d57600080fd5b506103866116b8565b6040516103939190611a58565b60405180910390f35b6003543410156103e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d890612099565b60405180910390fd5b6000600760008154809291906103f6906120e8565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503481600101819055506104676116be565b81600301819055508383826004019182610482929190612376565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b48282600301546040516104b8929190611ef4565b60405180910390a150505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b906124b8565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffff
"deployedBytecode": "0x6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102ca578063d0fae95f14610308578063d5a44f8614610331578063d76b679414610371576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c0014610276578063c4a9e1161461029f576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b61010760048036038101906101029190611915565b61039c565b005b34801561011557600080fd5b50610130600480360381019061012b91906119f6565b6104c6565b005b34801561013e57600080fd5b50610147610718565b6040516101549190611a58565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f9190611ac9565b61071e565b6040516101919190611a58565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611b3d565b61079d565b6040516101d49796959493929190611c9b565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611d44565b610929565b005b610220600480360381019061021b9190611da6565b610d94565b005b34801561022e57600080fd5b50610237610edd565b6040516102449190611a58565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611e1a565b610ee3565b005b34801561028257600080fd5b5061029d60048036038101906102989190611eb4565b611285565b005b3480156102ab57600080fd5b506102b46113f9565b6040516102c19190611a58565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec9190611b3d565b6113ff565b6040516102ff929190611ef4565b60405180910390f35b34801561031457600080fd5b5061032f600480360381019061032a9190611f73565b611423565b005b34801561033d57600080fd5b5061035860048036038101906103539190611b3d565b61165b565b6040516103689493929190612008565b60405180910390f35b34801561037d57600080fd5b506103866116b8565b6040516103939190611a58565b60405180910390f35b6003543410156103e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d890612099565b60405180910390fd5b6000600760008154809291906103f6906120e8565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503481600101819055506104676116be565b81600301819055508383826004019182610482929190612376565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b48282600301546040516104b8929190611ef4565b60405180910390a150505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b906124b8565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610606577f0000000000000000000000000000000000000000000000000000000000000000336040517fe1130dba0000000000000000000000000000000000000000000000000000000081526004016105fd9291906124d8565b60405180910390fd5b60008211610649576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106409061254d565b60405180910390fd5b60006001600081548092919061065e906120e8565b91905055905060008060008381526020019081526020016000209050848160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083816001018190555082426106d2919061256d565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e9826040516107099190611a58565b60405180910390a15050505050565b60075481565b60008083838101906107309190611b3d565b9050600060046000838152602001908152602001600020905080600001546003819055507f6a3843c02c26620842ae8496fd3afcb44b27463b3808e2ccdae4bcee5a2e3f2082600354604051610787929190611ef4565b60405180910390a1600092505050949350505050565b60066020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900460ff16908060
2024-03-18 14:03:53 -05:00
"linkReferences": {},
"deployedLinkReferences": {}
}