- Remove duplicate `/marketplace/gpu/{gpu_id}` endpoint from marketplace_gpu.py
- Remove marketplace_gpu router inclusion from main.py (already included elsewhere)
- Fix staking service staker_count logic to check existing stakes before increment/decrement
- Add minimum stake amount validation (100 AITBC)
- Add proper error handling for stake not found cases
- Fix staking pool update to commit and refresh after modifications
- Update CLI send_transaction to use chain
1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"id":"c3c3dff059b2d1b75090cf2368c4753b","_format":"hh-sol-build-info-1","solcVersion":"0.8.19","solcLongVersion":"0.8.19+commit.7dd6d404","input":{"language":"Solidity","sources":{"contracts/MockVerifier.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title MockVerifier\n * @dev Mock verifier for testing purposes\n */\ncontract MockVerifier {\n function verifyPerformance(\n uint256 _agentWallet,\n uint256 _responseTime,\n uint256 _accuracy,\n uint256 _availability,\n uint256 _computePower,\n bytes memory _zkProof\n ) external pure returns (bool) {\n // Always return true for testing\n return true;\n }\n}\n"}},"settings":{"optimizer":{"enabled":true,"runs":200},"viaIR":true,"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}}}},"output":{"errors":[{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:10:9:\n |\n10 | uint256 _agentWallet,\n | ^^^^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":215,"file":"contracts/MockVerifier.sol","start":195},"type":"Warning"},{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:11:9:\n |\n11 | uint256 _responseTime,\n | ^^^^^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":246,"file":"contracts/MockVerifier.sol","start":225},"type":"Warning"},{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:12:9:\n |\n12 | uint256 _accuracy,\n | ^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":273,"file":"contracts/MockVerifier.sol","start":256},"type":"Warning"},{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:13:9:\n |\n13 | uint256 _availability,\n | ^^^^^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":304,"file":"contracts/MockVerifier.sol","start":283},"type":"Warning"},{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:14:9:\n |\n14 | uint256 _computePower,\n | ^^^^^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":335,"file":"contracts/MockVerifier.sol","start":314},"type":"Warning"},{"component":"general","errorCode":"5667","formattedMessage":"Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.\n --> contracts/MockVerifier.sol:15:9:\n |\n15 | bytes memory _zkProof\n | ^^^^^^^^^^^^^^^^^^^^^\n\n","message":"Unused function parameter. Remove or comment out the variable name to silence this warning.","severity":"warning","sourceLocation":{"end":366,"file":"contracts/MockVerifier.sol","start":345},"type":"Warning"}],"sources":{"contracts/MockVerifier.sol":{"ast":{"absolutePath":"contracts/MockVerifier.sol","exportedSymbols":{"MockVerifier":[23]},"id":24,"license":"MIT","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".0"],"nodeType":"PragmaDirective","src":"32:23:0"},{"abstract":false,"baseContracts":[],"canonicalName":"MockVerifier","contractDependencies":[],"contractKind":"contract","documentation":{"id":2,"nodeType":"StructuredDocumentation","src":"57:73:0","text":" @title MockVerifier\n @dev Mock verifier for testing purposes"},"fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"MockVerifier","nameLocation":"140:12:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"402:70:0","statements":[{"expression":{"hexValue":"74727565","id":19,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"461:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":18,"id":20,"nodeType":"Return","src":"454:11:0"}]},"functionSelector":"d85a43a4","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"verifyPerformance","nameLocation":"168:17:0","nodeType":"FunctionDefinition","parameters":{"id":15,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"_agentWallet","nameLocation":"203:12:0","nodeType":"VariableDeclaration","scope":22,"src":"195:20:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"195:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"_responseTime","nameLocation":"233:13:0","nodeType":"VariableDeclaration","scope":22,"src":"225:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"225:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":8,"mutability":"mutable","name":"_accuracy","nameLocation":"264:9:0","nodeType":"VariableDeclaration","scope":22,"src":"256:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7,"name":"uint256","nodeType":"ElementaryTypeName","src":"256:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":10,"mutability":"mutable","name":"_availability","nameLocation":"291:13:0","nodeType":"VariableDeclaration","scope":22,"src":"283:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"283:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":12,"mutability":"mutable","name":"_computePower","nameLocation":"322:13:0","nodeType":"VariableDeclaration","scope":22,"src":"314:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":11,"name":"uint256","nodeType":"ElementaryTypeName","src":"314:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":14,"mutability":"mutable","name":"_zkProof","nameLocation":"358:8:0","nodeType":"VariableDeclaration","scope":22,"src":"345:21:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":13,"name":"bytes","nodeType":"ElementaryTypeName","src":"345:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"src":"185:187:0"},"returnParameters":{"id":18,"nodeType":"ParameterList","parameters":[{"constant":false,"id":17,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"396:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":16,"name":"bool","nodeType":"ElementaryTypeName","src":"396:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"395:6:0"},"scope":23,"src":"159:313:0","stateMutability":"pure","virtual":false,"visibility":"external"}],"scope":24,"src":"131:343:0","usedErrors":[]}],"src":"32:443:0"},"id":0}},"contracts":{"contracts/MockVerifier.sol":{"MockVerifier":{"abi":[{"inputs":[{"internalType":"uint256","name":"_agentWallet","type":"uint256"},{"internalType":"uint256","name":"_responseTime","type":"uint256"},{"internalType":"uint256","name":"_accuracy","type":"uint256"},{"internalType":"uint256","name":"_availability","type":"uint256"},{"internalType":"uint256","name":"_computePower","type":"uint256"},{"internalType":"bytes","name":"_zkProof","type":"bytes"}],"name":"verifyPerformance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}],"evm":{"bytecode":{"functionDebugData":{},"generatedSources":[],"linkReferences":{},"object":"608080604052346100155760f3908161001b8239f35b600080fdfe60806004361015600e57600080fd5b600090813560e01c63d85a43a414602457600080fd5b3460b95760c036600319011260b95760a4359067ffffffffffffffff9081831160a1573660238401121560a15782600401359180831160a557601f8301601f19908116603f011682019081118282101760a557604052818152366024838501011160a1578160246020940184830137010152602060405160018152f35b8380fd5b634e487b7160e01b85526041600452602485fd5b5080fdfea26469706673582212202d0285659b917d0cb3b11d7dd471dcc5920c2bea8fb87026c07d7a286b742ccb64736f6c63430008130033","opcodes":"PUSH1 0x80 DUP1 PUSH1 0x40 MSTORE CALLVALUE PUSH2 0x15 JUMPI PUSH1 0xF3 SWAP1 DUP2 PUSH2 0x1B DUP3 CODECOPY RETURN JUMPDEST PUSH1 0x0 DUP1 REVERT INVALID PUSH1 0x80 PUSH1 0x4 CALLDATASIZE LT ISZERO PUSH1 0xE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP1 DUP2 CALLDATALOAD PUSH1 0xE0 SHR PUSH4 0xD85A43A4 EQ PUSH1 0x24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE PUSH1 0xB9 JUMPI PUSH1 0xC0 CALLDATASIZE PUSH1 0x3 NOT ADD SLT PUSH1 0xB9 JUMPI PUSH1 0xA4 CALLDATALOAD SWAP1 PUSH8 0xFFFFFFFFFFFFFFFF SWAP1 DUP2 DUP4 GT PUSH1 0xA1 JUMPI CALLDATASIZE PUSH1 0x23 DUP5 ADD SLT ISZERO PUSH1 0xA1 JUMPI DUP3 PUSH1 0x4 ADD CALLDATALOAD SWAP2 DUP1 DUP4 GT PUSH1 0xA5 JUMPI PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT SWAP1 DUP2 AND PUSH1 0x3F ADD AND DUP3 ADD SWAP1 DUP2 GT DUP3 DUP3 LT OR PUSH1 0xA5 JUMPI PUSH1 0x40 MSTORE DUP2 DUP2 MSTORE CALLDATASIZE PUSH1 0x24 DUP4 DUP6 ADD ADD GT PUSH1 0xA1 JUMPI DUP2 PUSH1 0x24 PUSH1 0x20 SWAP5 ADD DUP5 DUP4 ADD CALLDATACOPY ADD ADD MSTORE PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x1 DUP2 MSTORE RETURN JUMPDEST DUP4 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL DUP6 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 REVERT JUMPDEST POP DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2D MUL DUP6 PUSH6 0x9B917D0CB3B1 SAR PUSH30 0xD471DCC5920C2BEA8FB87026C07D7A286B742CCB64736F6C634300081300 CALLER ","sourceMap":"131:343:0:-:0;;;;;;;;;;;;;;;;;"},"deployedBytecode":{"functionDebugData":{},"generatedSources":[],"immutableReferences":{},"linkReferences":{},"object":"60806004361015600e57600080fd5b600090813560e01c63d85a43a414602457600080fd5b3460b95760c036600319011260b95760a4359067ffffffffffffffff9081831160a1573660238401121560a15782600401359180831160a557601f8301601f19908116603f011682019081118282101760a557604052818152366024838501011160a1578160246020940184830137010152602060405160018152f35b8380fd5b634e487b7160e01b85526041600452602485fd5b5080fdfea26469706673582212202d0285659b917d0cb3b11d7dd471dcc5920c2bea8fb87026c07d7a286b742ccb64736f6c63430008130033","opcodes":"PUSH1 0x80 PUSH1 0x4 CALLDATASIZE LT ISZERO PUSH1 0xE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP1 DUP2 CALLDATALOAD PUSH1 0xE0 SHR PUSH4 0xD85A43A4 EQ PUSH1 0x24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE PUSH1 0xB9 JUMPI PUSH1 0xC0 CALLDATASIZE PUSH1 0x3 NOT ADD SLT PUSH1 0xB9 JUMPI PUSH1 0xA4 CALLDATALOAD SWAP1 PUSH8 0xFFFFFFFFFFFFFFFF SWAP1 DUP2 DUP4 GT PUSH1 0xA1 JUMPI CALLDATASIZE PUSH1 0x23 DUP5 ADD SLT ISZERO PUSH1 0xA1 JUMPI DUP3 PUSH1 0x4 ADD CALLDATALOAD SWAP2 DUP1 DUP4 GT PUSH1 0xA5 JUMPI PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT SWAP1 DUP2 AND PUSH1 0x3F ADD AND DUP3 ADD SWAP1 DUP2 GT DUP3 DUP3 LT OR PUSH1 0xA5 JUMPI PUSH1 0x40 MSTORE DUP2 DUP2 MSTORE CALLDATASIZE PUSH1 0x24 DUP4 DUP6 ADD ADD GT PUSH1 0xA1 JUMPI DUP2 PUSH1 0x24 PUSH1 0x20 SWAP5 ADD DUP5 DUP4 ADD CALLDATACOPY ADD ADD MSTORE PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x1 DUP2 MSTORE RETURN JUMPDEST DUP4 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL DUP6 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 REVERT JUMPDEST POP DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2D MUL DUP6 PUSH6 0x9B917D0CB3B1 SAR PUSH30 0xD471DCC5920C2BEA8FB87026C07D7A286B742CCB64736F6C634300081300 CALLER ","sourceMap":"131:343:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;131:343:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;131:343:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;131:343:0;;;;;;;;;;;"},"methodIdentifiers":{"verifyPerformance(uint256,uint256,uint256,uint256,uint256,bytes)":"d85a43a4"}},"metadata":"{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_agentWallet\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_responseTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_accuracy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_availability\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_computePower\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_zkProof\",\"type\":\"bytes\"}],\"name\":\"verifyPerformance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Mock verifier for testing purposes\",\"kind\":\"dev\",\"methods\":{},\"title\":\"MockVerifier\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/MockVerifier.sol\":\"MockVerifier\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/MockVerifier.sol\":{\"keccak256\":\"0xeea3e21611e89d24b245934a58a01613bff05dfa71d5f57c67deedb3a331f2de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://496e2b39cc78edfa152ea87345f520b6cd403dc98fecc567f9a79aef85018574\",\"dweb:/ipfs/QmXiBhXGxoeHMehZSJ6bYLqts9d5k9U3MqNeDqzQbA17v7\"]}},\"version\":1}"}}}}} |