We recommend that you connect to the existing contracts on CalibrationNet. Nevertheless, this document provides instructions for deploying a new root contract.
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install nodejs
- Install Foundry [Linux] (details)
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Get the Solidity actors and install dependencies
git clone --recurse-submodules https://github.com/consensus-shipyard/ipc-solidity-actors
cd ipc-solidity-actors
npm install
-
Connect Metamask to the parent network (for calibrationnet, use
https://api.calibration.node.glif.io/rpc/v1
as the RPC and314159
as the chain id) -
Create a new account (or use an existing one)
-
Export the corresponding private key according to these steps
Once inside the repo, you'll need to populate the .env.template
file with the private key of the address you provided with funds in the previous step, and the endpoint of the target network on which you want to deploy
export PRIVATE_KEY=<your_private_key>
export RPC_URL=https://api.calibration.node.glif.io/rpc/v1
In your currently open terminal, you'll need to load these variables into your environment so you can deploy the contracts.
source .env.template
make deploy-ipc NETWORK=calibrationnet
If the deployment is successful, you should receive an output similar to this one:
$ ./ops/deploy.sh localnet
[*] Deploying libraries
[*] Output libraries available in /home/workspace/pl/ipc-solidity-actors/scripts/libraries.out
[*] Populating deploy-gateway script
[*] Gateway script in /home/workspace/pl/ipc-solidity-actors/scripts/deploy-gateway.ts
[*] Gateway deployed:
{ Gateway: '<GATEWAY_ADDRESS>' }
[*] Output gateway address in /home/workspace/pl/ipc-solidity-actors/scripts/gateway.out
[*] Populating deploy-registry script
[*] Registry script in /home/workspace/pl/ipc-solidity-actors/scripts/deploy-registry.ts
No need to generate any newer typings.
Nothing to compile
No need to generate any newer typings.
Deploying contracts with account: <ACCOUNT> and balance: <BALANCE>
registry contract deployed to: <REGISTRY_ADDRESS>
[*] IPC actors successfully deployed
Keep the addresses of the gateway and the registry contracts deployed, as you will need them to configure the IPC agent.
💡If instead of deploying IPC Solidity in Calibration, you want to test them in a local network, the only thing that you need to do is to configure the
RPC_URL
of your.env
to point to the corresponding network's RPC endpoint, andmake deploy-ipc NETWORK=localnet
. You can also useNETWORK=auto
to let the deployment scripts figure out the chain ID and all the information required to deploy IPC over the network thatRPC_URL
is pointing to.