Skip to content

pdragnev/auditlog

Repository files navigation

Installing Foundry

###On Linux and macOS If you use Linux or macOS.

Open your terminal and type in the following command:

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

This will download foundryup. Then install Foundry by running:

foundryup

If everything goes well, you will now have four binaries at your disposal: forge, cast, anvil, and chisel.

###On Windows Preferable to use Windows Subsystem for Linux (WSL) as an alternative. WSL allows you to run Linux applications directly on Windows, which can help avoid some common installation problems. You can follow the instructions provided by Microsoft to install WSL on your Windows machine WSL

You can manually download nightly releases here.

For more info click here

Using Foundry Commands

Use the commands in root folder

  • To build the project
forge build
  • To run tests the project
forge test
  • To deploy and verify on goerli testnet
forge script script/AuditLog.s.sol:DeployScript --rpc-url goerli --broadcast --verify -vvvv
  • You should have added the variables GOERLI_RPC_URL= PRIVATE_KEY= ETHERSCAN_API_KEY= to the .env for this next part to work. Preferably only for testnet deployments

  • Verifying contact on Polygon after deploying

forge script script/AuditLog.s.sol:DeployScript --chain-id $CHAIN_ID --rpc-url $RPC_URL \
    --etherscan-api-key $POLYGONSCAN_API_KEY --verifier-url $POLYGONSCAN
    --broadcast --verify -vvvv

Using Slither for static code checks

Installation

Slither requires Python 3.8+ and solc, the Solidity compiler.

git clone https://github.com/crytic/slither.git && cd slither
python3 setup.py install
  • To see which version of Python 3 and solc you have installed, open a command prompt and run:
python3 --version
solc --version
  • If you don't have python3 or solc you need to install it also python setup tools :
apt-get install solc
apt-get install python3.8
apt-get install python3-setuptools

Using Slither

Run Slither:

slither .

For more documentation on slither

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published