Roles CLI
Prerequisite
node
version must be >= 16;
Installation
Create a folder name CLI with mkdir CLI | cd CLI
Install eth-sdk
,zodiac-roles-sdk
and untangled-vault-cli
:
npm i --save @gnosis-guild/eth-sdk @gnosis-guild/eth-sdk-client zodiac-roles-sdk untangled-vault-cli
Configuration
The next step is to create a config file that lists all the contracts you want to permit calling.
Create a folder named eth-sdk
in your project root (where your package.json is located). Inside this folder, create a config.js
file with the following content structure:
const { defineConfig } = require("@gnosis-guild/eth-sdk");
module.exports = defineConfig({
contracts: {
sepolia: {
vault: "0x05C8D188292020504F360a97c6b0676396aAC641",
vaultFactory: "0xdF390B7D8EE3Fcc00E6BA098Aa66a848e83a338b",
untangledSecuritizationManager:
"0xe3f840Fa081f7b1c81a5F5958bab1786FE6d7c36",
mapplePool: "0x15f260e366545188f992400D4500EF44C660c3a7",
role: "0x56B8e347E800CC2a6C89317aEfa4948f6Cb41D63",
},
},
});
Generate allow kit
Now, and after any update to the eth-sdk/config.js
file, make sure to run the following command:
yarn eth-sdk
This command will fetch the ABIs of the contracts listed in the config file and generate TypeScript types for them directly into your node_modules. If the ABI of any listed contract cannot be fetched automatically, the command will return an error code. In that case, you need to manually create a JSON file with the ABI at a location inside eth-sdk/abi