/paima-dao

placeholder DAO contract for Paima

Primary LanguageSolidity

Paima DAO

This is a Paima DAO smart contract, to be deployed on Astar Network.
Shibuya is used as a testnet. Get test tokens here

Deployed on Shibuya: 0xe67Bd26330263b9830CD4E81e3faE298E8F5e487

Preparing for usage

  1. Install Foundry by following the instructions from their repository.
  2. Copy the .env.template file to .env and fill in the variables.
  3. Install the dependencies by running: yarn

Compiling smart contracts

yarn compile
yarn compile:sizes (to see contracts sizes)

Running local chain and deploying to it

yarn anvil
yarn deploy:localhost

Deploying to testnet or mainnet

Deploying will automatically verify the smart contracts on Blockscout. To disable this, remove the verifying arguments from the script.

WSL2

WSL2 cannot access USB devices in Windows by default, so you will need to expose your Trezor device to WSL2.

  1. In WSL2, run the CURL command to install the udev rules for Trezor from here.
  2. In WSL2, run sudo service udev restart
  3. In command prompt, run winget install usbipd
  4. In command prompt, run usbipd list and look for the BUSID for TREZOR
  5. In administrator command prompt, run usbipd bind --busid=<BUSID> with the BUSID from step (2).
  6. In command prompt, run usbipd attach --wsl --busid=<BUSID> with the BUSID from step (2). Note: you will have to re-run this specific step every time you disconnect/reconnect the device
  7. In WSL2, install trezorctl by following this guide (ignore the Trezor Bridge stuff)
  8. In WSL2, run lsusb and see if Trezor appears to ensure the setup worked from the USB perspective
  9. In WSL2, run trezorctl list to ensure the setup worked from the Trezor perspective

Commands to run

# Load the environment variables from the .env file
set -a  # automatically export all variables
source .env
set +a  # stop automatically exporting variables

yarn deploy:testnet
yarn deploy:mainnet