The map below might be useful to get quick bearings
Note: To make the map reasonably orderly, only the most significant relationships are displayed
To install the packages:
yarn installTo generate the types and compile the contracts with the new ABI:
yarn hardhat compileTo get local rpc accounts:
yarn hardhat accountsTo get the configured safe account:
yarn hardhat safeRun ganache server to run a local RPC:
yarn hardhat node --no-deploySetup environment variables:
cp .env.example .env| KEY | VALUE | 
|---|---|
| GNOSIS_SAFE_ADDRESS | Governance/fees address (can also be a normal address) | 
| MNEMONIC | Mnemonic of the wallet to be used for deployments | 
| SAFE_SERVICE_URL | Gnosis safe service url (to submit tx proposals) | 
| UNICROW_FEE | Unicrow fee (in bips) | 
| ETHERSCAN_API_KEY | Only used for contract verification | 
| ARBISCAN_API_KEY | Only used for contract verification | 
Deploy the Unicrow contracts (directly) on your local node:
yarn deploy:localDeploy the Unicrow contracts on Arbitrum One (via the Gnosis Safe):
yarn deploy:arbitrum:viasafeDeploy the Unicrow contracts (directly) on Arbitrum Sepolia testnet:
yarn deploy:arbitrumSepoliaDeploy the Unicrow contracts on Base (via the Gnosis Safe):
yarn deploy:base:viasafeDeploy the Unicrow contracts on Base Sepolia testnet (via the Gnosis Safe):
yarn deploy:baseSepolia:viasafeIt is recommended running the tests (see below) to test interactions with the contracts, but it is possible to do it using the console too by running a console instance first and then attaching an address.
Open the console:
yarn hardhat console --network developmentInitiate a contract:
let unicrow = ethers.getContractFactory("Unicrow") // Replace "Unicrow" for a name of any other contract
unicrow = await unicrow.attach("address_of_the_contract_here"); // address you got during the deploymentCall the contract function:
await unicrow.pay({ paramters }) Run the tests locally:
yarn hardhat test --network localhost