-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dfd26e
commit 3703381
Showing
1 changed file
with
25 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,43 @@ | ||
## Foundry | ||
## Chainlink CCIP - Proof of Concept | ||
|
||
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** | ||
|
||
Foundry consists of: | ||
|
||
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). | ||
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. | ||
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. | ||
- **Chisel**: Fast, utilitarian, and verbose solidity REPL. | ||
|
||
## Documentation | ||
|
||
https://book.getfoundry.sh/ | ||
|
||
## Usage | ||
|
||
### Build | ||
|
||
```shell | ||
$ forge build | ||
``` | ||
|
||
### Test | ||
Send and receive messages crosschain - Base <> Optimism (testnets) | ||
|
||
### Clone | ||
```shell | ||
$ forge test | ||
$ git clone git@github.com:skeletordapps/chainlink-ccip-poc.git | ||
``` | ||
|
||
### Format | ||
|
||
### Run | ||
```shell | ||
$ forge fmt | ||
$ foundryup && forge install | ||
``` | ||
|
||
### Gas Snapshots | ||
|
||
### Create .env file | ||
```shell | ||
$ forge snapshot | ||
``` | ||
BASE_SEPOLIA_RPC_URL="https://sepolia.base.org" | ||
OPTIMISM_SEPOLIA_RPC_URL="https://sepolia.optimism.io" | ||
|
||
### Anvil | ||
BASE_SEPOLIA_CHAIN_SELECTOR=10344971235874465080 | ||
OPTIMISM_SEPOLIA_CHAIN_SELECTOR=5224473277236331295 | ||
|
||
```shell | ||
$ anvil | ||
``` | ||
BASE_SEPOLIA_ROUTER_ADDRESS=0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93 | ||
OPTIMISM_SEPOLIA_ROUTER_ADDRESS=0x114A20A10b43D4115e5aeef7345a1A71d2a60C57 | ||
|
||
### Deploy | ||
BASE_SEPOLIA_LINK_ADDRESS=0xE4aB69C077896252FAFBD49EFD26B5D171A32410 | ||
OPTIMISM_SEPOLIA_LINK_ADDRESS=0xE4aB69C077896252FAFBD49EFD26B5D171A32410 | ||
|
||
```shell | ||
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> | ||
WALLET_A=0x | ||
WALLET_B=0x | ||
WALLET_C=0x | ||
``` | ||
|
||
### Cast | ||
|
||
### Test | ||
```shell | ||
$ cast <subcommand> | ||
$ forge test && forge coverage | ||
``` | ||
|
||
### Help | ||
|
||
```shell | ||
$ forge --help | ||
$ anvil --help | ||
$ cast --help | ||
``` | ||
### Contracts | ||
- ***Tier.sol:*** used on base testnet as a list of tiers with name and min/max points. | ||
- ***Points.sol:*** used on base testnet as a list of wallets and it's points to be compared on each tier in order to know the correct tier. | ||
- ***Ask.sol:*** used on optimism to send a wallet and obtain the tier in base network | ||
- ***Answer.sol:*** receives the wallet to be checked from other chain |