Skip to content

gnosis/labs-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gnosis Labs Contracts

Repository holding the contracts made by Gnosis Labs team.

Implemented contracts

| 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 | 0xbe1F6944496923683ca849fc0cC93fD10523cB83 | omen-agentresultmapping |

Set up contracts development

The repository uses Foundry.

Installation

See installation instructions on https://book.getfoundry.sh/getting-started/installation.

Build

forge build

Test

forge test

Format

forge fmt

Gas Snapshots

forge snapshot

Anvil

anvil

Deploy

On Anvil

Start Anvil with

anvil

and run

forge create --rpc-url 127.0.0.1:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 OmenThumbnailMapping

On TestNet

forge create --gas-limit 10000000 --rpc-url https://rpc.chiadochain.net  --private-key <your_private_key> OmenThumbnailMapping

On MainNet

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

(Optional) Deploy on a Tenderly testnet

forge create OmenAgentResultMapping
--private-key <private_key> \ --rpc-url <tenderly_rpc_url>
--etherscan-api-key
--verify
--verifier-url <tenderly_roc_url>/verify/etherscan

Cast

cast <subcommand>

Help

forge --help
anvil --help
cast --help

Set up graph development

Graphs uses The Graph.

Installation

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.

Build, test, deploy

Before working with graphs, you need to run forge build in the root directory.

  • omen-thumbnailmapping - see graphs/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)

About

Contracts made by Gnosis Labs team.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published