Giveth / giveconomy-foundry

GNU General Public License v3.0
29 stars 5 forks source link

GivPower

Foundry Tests Slither Analysis

Background

TBD

Upgrade script

  1. Deploy a new instance of GIVpower by script
    forge create --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> contracts/GIVpower.sol:GIVpower 

    NOTE: The verification part (--verify --etherscan-api-key ) is optional

  2. Grab the address of new GIVpower instance deployed above and use it in calling upgrade method on ProxyAdmin contract by a privilaged account.
    upgrade(<PROXY_CONTRACT_ADDRESS>, <NEW_GIVPOWER_IMPLEMENTATION_ADDRESS>)

Deployments

Network GardenUnipool (TransparentUpgradeableProxy) ProxyAdmin
Gnosis Chain [0xD93d3bDBa18ebcB3317a57119ea44ed2Cf41C2F2](https://blockscout.com/xdai/mainnet/address/0xD93d3bDBa18ebcB3317a57119ea44ed2Cf41C2F2) [0x076C250700D210e6cf8A27D1EB1Fd754FB487986](https://blockscout.com/xdai/mainnet/address/0x076C250700D210e6cf8A27D1EB1Fd754FB487986)

Diagram

Foundry

This project use Foundry. To install (assuming a Linux or macOS system):

curl -L https://foundry.paradigm.xyz | bash

This will download foundryup. To start Foundry, run:

foundryup

To install dependencies:

forge install

To run tests:

forge test