Skip to content

VolodymyrBg/contracts

This branch is 1 commit ahead of berachain/contracts:main.

Folders and files

NameName
Last commit message
Last commit date
Jan 15, 2025
Jan 23, 2025
Jan 15, 2025
Jan 25, 2025
Jan 20, 2025
Jan 20, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 23, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 20, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025
Jan 15, 2025

Repository files navigation

Berachain Contracts

Usage

This is a list of the most frequently needed commands.

Build

Build the contracts:

$ forge build

Clean

Delete the build artifacts and cache directories:

$ forge clean

Compile

Compile the contracts:

$ forge build

Coverage

Get a test coverage report:

$ forge coverage

Deploy

Deploy to Anvil:

$ forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545

For this script to work, you need to have a MNEMONIC environment variable set to a valid BIP39 mnemonic.

For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.

Format

Format the contracts:

$ forge fmt

Gas Usage

Get a gas report:

$ forge test --gas-report

Lint

Lint the contracts:

$ bun run lint

Test

Run the tests:

$ forge test

Generate test coverage and output result to the terminal:

$ bun run test:coverage

Generate test coverage with lcov report (you'll have to open the ./coverage/index.html file in your browser, to do so simply copy paste the path):

$ bun run test:coverage:report

Related Efforts

License

This project is licensed under BUSL 1.1.

Solstat

Follow instructions to install solstat locally and run. Currently, named parameters in mappings causes solstat to panic and is unable to produce the solstat_report.md (issue).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 99.9%
  • TypeScript 0.1%