-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
404 add methods to pmat for storing prediction into ipfs and adding t…
…hat to contract mapping (#446) * Small log | PMAT integration for agent result mapping | test * Subgraph integration for result mapping * WIP * Added IPFS upload to DeployableTraderAgent * Added test for ipfs upload/unpin * Removed test hardcoding * Local test deploy working * Small fixes before PR review * Fixing CI * Added txHashes to contract prediction being stored on chain * Fixed isort * Missing secrets * Added safety margin * Fixing test * Adding new test * Making tests pass * local_web3 session scoped * Tests finally passing locally * Fixing unit tests * Increasing rtol on market_moving bet test * Fixed isort * Fixed mypy * Incrased timeout of test * Making tests pass * Reactivating tests * Update tests_integration/tools/ipfs/test_ipfs_handler.py Co-authored-by: Evan Griffiths <[email protected]> * Implemented PR comments * Extracted local_chain test to other PR * Fixed isort --------- Co-authored-by: Evan Griffiths <[email protected]>
- Loading branch information
1 parent
1ce2148
commit 3a0883a
Showing
18 changed files
with
594 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
MANIFOLD_API_KEY= | ||
BET_FROM_PRIVATE_KEY= | ||
OPENAI_API_KEY= | ||
GRAPH_API_KEY= | ||
GRAPH_API_KEY= | ||
PINATA_API_KEY= | ||
PINATA_API_SECRET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
171 changes: 171 additions & 0 deletions
171
prediction_market_agent_tooling/abis/omen_agentresultmapping.abi.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
[ | ||
{ | ||
"type": "constructor", | ||
"inputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "addPrediction", | ||
"inputs": [ | ||
{ | ||
"name": "marketAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "prediction", | ||
"type": "tuple", | ||
"internalType": "struct Prediction", | ||
"components": [ | ||
{ | ||
"name": "publisherAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "ipfsHash", | ||
"type": "bytes32", | ||
"internalType": "bytes32" | ||
}, | ||
{ | ||
"name": "txHashes", | ||
"type": "bytes32[]", | ||
"internalType": "bytes32[]" | ||
}, | ||
{ | ||
"name": "estimatedProbabilityBps", | ||
"type": "uint16", | ||
"internalType": "uint16" | ||
} | ||
] | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "getPredictionByIndex", | ||
"inputs": [ | ||
{ | ||
"name": "marketAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "index", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "tuple", | ||
"internalType": "struct Prediction", | ||
"components": [ | ||
{ | ||
"name": "publisherAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "ipfsHash", | ||
"type": "bytes32", | ||
"internalType": "bytes32" | ||
}, | ||
{ | ||
"name": "txHashes", | ||
"type": "bytes32[]", | ||
"internalType": "bytes32[]" | ||
}, | ||
{ | ||
"name": "estimatedProbabilityBps", | ||
"type": "uint16", | ||
"internalType": "uint16" | ||
} | ||
] | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "getPredictions", | ||
"inputs": [ | ||
{ | ||
"name": "marketAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "tuple[]", | ||
"internalType": "struct Prediction[]", | ||
"components": [ | ||
{ | ||
"name": "publisherAddress", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "ipfsHash", | ||
"type": "bytes32", | ||
"internalType": "bytes32" | ||
}, | ||
{ | ||
"name": "txHashes", | ||
"type": "bytes32[]", | ||
"internalType": "bytes32[]" | ||
}, | ||
{ | ||
"name": "estimatedProbabilityBps", | ||
"type": "uint16", | ||
"internalType": "uint16" | ||
} | ||
] | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "PredictionAdded", | ||
"inputs": [ | ||
{ | ||
"name": "marketAddress", | ||
"type": "address", | ||
"indexed": true, | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "estimatedProbabilityBps", | ||
"type": "uint16", | ||
"indexed": false, | ||
"internalType": "uint16" | ||
}, | ||
{ | ||
"name": "publisherAddress", | ||
"type": "address", | ||
"indexed": true, | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "txHashes", | ||
"type": "bytes32[]", | ||
"indexed": false, | ||
"internalType": "bytes32[]" | ||
}, | ||
{ | ||
"name": "ipfsHash", | ||
"type": "bytes32", | ||
"indexed": false, | ||
"internalType": "bytes32" | ||
} | ||
], | ||
"anonymous": false | ||
} | ||
] |
Oops, something went wrong.