Repository holding the contracts made by Gnosis Labs team.
Contract Name | Description | Mainnet Address | TheGraph |
---|---|---|---|
OmenThumbnailMapping | Manages IPFS hashes for market thumbnails on Omen 2.0 | 0xe0cf08311F03850497B0ed6A2cf067f1750C3eFc | omen-thumbnailmapping |
OmenAgentResultMapping | Maps prediction results to markets on Omen 2.0 | 0x99c43743A2dbd406160CC43cf08113b17178789c | TBA |
SeerAgentResultMapping | Maps prediction results to markets on Seer | 0x1aafdfBD38EE92A4a74A44A1614E00894205074e | TBA |
Agent NFT | Agent NFTs that control mechs for NFT game | 0x0D7C0Bd4169D090038c6F41CFd066958fe7619D0 | |
Agent Registry contract | Simple contract storing active agent addresses | 0xe8ae78b19c997b6da8189b1a644d4076f8bc880e | |
Agent communication contract | Simple contract storing message queue for each agent | 0x219083Fc5315fdc145eE5C0eb22CbE12d6115c53 | |
Simple Treasury contract | Contract for storing the NFT agent game treasury | 0x624ad0db52e6b18afb4d36b8e79d0c2a74f3fc8a | |
NoSingleSignedTransactionGuard | Safe Guard that only allows transactions with at least 2 signers. | 0x43eff50Dc1Db7c084d2488792C7df28C0c3558D5 | none |
DebuggingContract | Add whatever function you need here to test out | 0x5Aa82E068aE6a6a1C26c42E5a59520a74Cdb8998 | none |
The repository uses Foundry.
See installation instructions on https://book.getfoundry.sh/getting-started/installation.
forge build
forge test
forge fmt
forge snapshot
anvil
Start Anvil with
anvil
and run
forge create --rpc-url 127.0.0.1:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 OmenThumbnailMapping
forge create --gas-limit 10000000 --rpc-url https://rpc.chiadochain.net --private-key <your_private_key> OmenThumbnailMapping
ETHERSCAN_API_KEY=<your_api_key> forge create --verify --verifier-url https://api.gnosisscan.io/api --rpc-url https://gnosis-rpc.publicnode.com --private-key <your_private_key> OmenThumbnailMapping
forge create AgentResultMapping
--constructor-args "Omen"
--private-key <private_key> \
--rpc-url <tenderly_rpc_url>
--etherscan-api-key
--verify
--verifier-url <tenderly_roc_url>/verify/etherscan
cast <subcommand>
forge --help
anvil --help
cast --help
Graphs uses The Graph.
See installation instructions on https://thegraph.com/docs/en/developing/creating-a-subgraph/#install-the-graph-cli.
Then open directory of one of the graphs and run npm install
.
Before working with graphs, you need to run forge build
in the root directory.
omen-thumbnailmapping
- seegraphs/omen-thumbnailmapping/package.json
The sequence of commands is codegen -> build -> test -> deploy
.
(On MacOS Sonoma, running the tests in the docker mode is required: LimeChain/matchstick#421)
We deploy the subgraph on graphs/envio-subgraphs
to Envio.
One can run
Make sure Docker is running locally
pnpm run dev
and to stop
pnpm envio stop
The subgraph is already connected to Envio. If changes need to be made, simply commit and push to the envio branch (use Envio API Key). Note that every time a new deployment is done, the indexer URL changes, thus changing this in PMAT is necessary.