Solidity contracts for building cross-rollup smart contract systems. Read more at the documentation portal.
Simple examples of smart contract systems built with this library can be found at omni-network/examples.
contracts/
: Omni solidity library implementationsrc/
: typescript & react utilities for interacting with Omni contracts
You'll need to import these contracts to your own repo to use them. You can use any of the following methods:
Install
yarn add @omni-network/contracts
pnpm add @omni-network/contract
npm install @omni-network/contracts
Import (solidity)
import {OmniScient} from "@omni-network/contracts/contracts/OmniScient.sol";
import {OmniCodec} from "@omni-network/contracts/contracts/OmniCodec.sol";
import {IOmni} from "@omni-network/contracts/contracts/interfaces/IOmni.sol";
import {IOmniPortal} from "@omni-network/contracts/contracts/interfaces/IOmniPortal.sol";
Import (js)
import {omniABI, omniPortalABI} from "@omni-network/contracts"
Install
forge install github.com/omni-network/omni-std
Import (solidity)
import {OmniScient} from "lib/omni-std/contracts/OmniScient.sol";
import {OmniCodec} from "lib/omni-std/contracts/OmniCodec.sol";
import {IOmni} from "lib/omni-std/contracts/interfaces/IOmni.sol";
import {IOmniPortal} from "lib/omni-std/contracts/interfaces/IOmniPortal.sol";
Or, use remappings
# foundry.toml
remappings = [
"omni-std/=lib/omni-std/contracts",
]
Update imports
import {OmniScient} from "omni-std/OmniScient.sol";
import {OmniCodec} from "omni-std/OmniCodec.sol";
import {IOmni} from "omni-std/interfaces/IOmni.sol";
import {IOmniPortal} from "omni-std/contracts/interfaces/IOmniPortal.sol";