Verax is mainly composed of a set of smart contracts that allows anyone to read and write attestations of any type and any subject.
Using Foundryup
Foundryup is the Foundry toolchain installer. Open your terminal and run the following command:
curl -L https://foundry.paradigm.xyz | bash
This will install Foundryup, then simply follow the instructions
on-screen, which will make the foundryup command available in your CLI.
Running foundryup by itself will install the latest (nightly) precompiled binaries: forge, cast, anvil and chisel. See foundryup --help for more options, like installing from a specific version or commit.
ℹ️ Note
If you're on Windows, you will need to install and use Git BASH or WSL, as your terminal, since Foundryup currently does not support Powershell or Cmd.
For more details on installation, see the installation guide in the book.
If you're experiencing any issues while installing, check out the FAQ.
We can build the project with forge build:
forge build
And run the tests with forge test:
forge test
And get the coverage with fotge coverage:
forge coverage
- Copy the
.env.example
file to a.env
file - Fill it with your Infura key
- Add your private key
- To verify the contracts on the dedicated explorer, also add your Etherscan/Lineascan/Arbiscan API key
- Deploy all contracts via the
pnpm run deploy NETWORK_NAME
command (replacingNETWORK_NAME
with the name of the targeted network) - Note down the summarized addresses (proxies), and the total logs can be of interest too
- Gather the first list of issuers addresses
- Set the issuers via the PortalRegistry’s
setIssuers
method - Deploy an instance of DefaultPortal via the PortalRegistry’s
deployDefaultPortal
method and note down its address - Verify this contract via
npx hardhat verify --network NETWORK_NAME ADDRESS
(replacingNETWORK_NAME
with the name of the targeted network andADDRESS
with the address of the freshly deployedDefaultPortal
) - Update the network files via
pnpm run reimport NETWORK_NAME
(replacingNETWORK_NAME
with the name of the targeted network)
Run pnpm run check:implementations
to check if the local versions of the registries follow the upgradeability rules.
Run pnpm run check:upgradeability NETWORK_NAME
(replacing NETWORK_NAME
with the name of the targeted network) to
check if the already deployed registries are upgradable to the new local versions.
- Check that your
.env
file contains the address of all the proxies for the targeted network - Upgrade only the implementations that changed since the last upgrade via the
pnpm run upgrade NETWORK_NAME
command -
Optional: Upgrade all the implementations by forcing their re-deployment via the
pnpm run upgrade:force NETWORK_NAME
command
Run pnpm run reimport NETWORK_NAME
(replacing NETWORK_NAME
with the name of the targeted network) to re-generate the
network files describing the deployed contracts.
Change the arguments you want to use fpr the verify action in contracts/script/arguments.ts
, then run:
npx hardhat verify --network NETWORK_NAME CONTRACT_ADDRESS --constructor-args contracts/script/arguments.ts
Issuers may have Schemas associated with them. When removing issuers, you will need to reassign schema ownership by calling the following methods :
- updateSchemaIssuer
- bulkUpdateSchemasIssuers