Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 add methods to pmat for storing prediction into ipfs and adding that to contract mapping #446

Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fb32a29
Small log | PMAT integration for agent result mapping | test
gabrielfior Sep 18, 2024
a56d3da
Subgraph integration for result mapping
gabrielfior Sep 20, 2024
52142ae
WIP
gabrielfior Sep 23, 2024
d8b913f
Merge remote-tracking branch 'origin/main' into 404-add-methods-to-pm…
gabrielfior Sep 29, 2024
f00e37b
Added IPFS upload to DeployableTraderAgent
gabrielfior Sep 29, 2024
aba7c4d
Added test for ipfs upload/unpin
gabrielfior Sep 29, 2024
745e911
Removed test hardcoding
gabrielfior Sep 29, 2024
7a8053b
Local test deploy working
gabrielfior Sep 29, 2024
6c2b66a
Small fixes before PR review
gabrielfior Sep 29, 2024
031bad7
Fixing CI
gabrielfior Sep 29, 2024
6e5a510
Merge remote-tracking branch 'origin/404-add-methods-to-pmat-for-stor…
gabrielfior Sep 30, 2024
80fe85f
Added txHashes to contract prediction being stored on chain
gabrielfior Sep 30, 2024
64a2e38
Merge remote-tracking branch 'refs/remotes/origin/main' into 404-add-…
gabrielfior Sep 30, 2024
17c92f0
Fixed isort
gabrielfior Sep 30, 2024
5a35b9a
Missing secrets
gabrielfior Sep 30, 2024
a8b57a6
Added safety margin
gabrielfior Sep 30, 2024
700864c
Fixing test
gabrielfior Sep 30, 2024
b865db1
Adding new test
gabrielfior Sep 30, 2024
ab1c713
Making tests pass
gabrielfior Sep 30, 2024
5d29c74
local_web3 session scoped
gabrielfior Sep 30, 2024
253f709
Tests finally passing locally
gabrielfior Sep 30, 2024
b26b60d
Fixing unit tests
gabrielfior Sep 30, 2024
b4b022c
Increasing rtol on market_moving bet test
gabrielfior Sep 30, 2024
051399e
Merge remote-tracking branch 'refs/remotes/origin/main' into 404-add-…
gabrielfior Oct 1, 2024
e24c8dd
Fixed isort
gabrielfior Oct 1, 2024
d4fb881
Fixed mypy
gabrielfior Oct 1, 2024
188d5d4
Incrased timeout of test
gabrielfior Oct 1, 2024
8090503
Making tests pass
gabrielfior Oct 1, 2024
01bd17b
Reactivating tests
gabrielfior Oct 1, 2024
3ad038f
Merge remote-tracking branch 'refs/remotes/origin/main' into 404-add-…
gabrielfior Oct 2, 2024
46b128b
Update tests_integration/tools/ipfs/test_ipfs_handler.py
gabrielfior Oct 2, 2024
9c62177
Implemented PR comments
gabrielfior Oct 2, 2024
da6aec0
Extracted local_chain test to other PR
gabrielfior Oct 2, 2024
43b540d
Fixed isort
gabrielfior Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
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=
2 changes: 2 additions & 0 deletions .github/workflows/python_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ env:
GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }}
GRAPH_API_KEY: ${{ secrets.GRAPH_API_KEY }}
METACULUS_API_KEY: ${{ secrets.METACULUS_API_KEY }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_API_SECRET: ${{ secrets.PINATA_API_SECRET }}

jobs:
mypy:
Expand Down
67 changes: 46 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

171 changes: 171 additions & 0 deletions prediction_market_agent_tooling/abis/omen_agentresultmapping.abi.json
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
}
]
Loading
Loading