Skip to content

Commit

Permalink
added init script to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 committed Oct 30, 2024
1 parent 02f129c commit 169f75e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 66 deletions.
66 changes: 4 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,8 @@
## Foundry
# zk-interop

**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

```shell
$ forge test
```

### Format

```shell
$ forge fmt
## How to Run
```

### Gas Snapshots

```shell
$ forge snapshot
docker compose up -d
```

### Anvil

```shell
$ anvil
```

### Deploy

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
For examples on how to use it see this [guide](https://github.com/mm-zk/slingshot?tab=readme-ov-file#examples-how-to-trigger)
20 changes: 17 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ services:
networks:
- era-network

slingshot:
slingshot-init:
build:
context: ./slingshot
dockerfile: Dockerfile
args:
PRIV_KEY: "0x509ca2e9e6acf0ba086477910950125e698d4ea70fa6f63e000c5a22bda9361c"
INTEROP_ADDR: "0xf3112Bf9e1DE454786477683Ab73AEDB36DeB2c3"
PRIV_KEY: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e"
CHAIN_1_RPC: "http://host.docker.internal:8012/"
CHAIN_2_RPC: "http://host.docker.internal:8013/"
networks:
Expand All @@ -38,6 +37,21 @@ services:
- era-test-node-1
- era-test-node-2

slingshot:
build:
context: ./slingshot/cli
dockerfile: Dockerfile
args:
PRIV_KEY: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e"
INTEROP_ADDR: "0x7122bb051DE72eAD9CE1F6374BEaCBc38E81fdb1"
CHAIN_1_RPC: "http://host.docker.internal:8012/"
CHAIN_2_RPC: "http://host.docker.internal:8013/"
networks:
- era-network
depends_on:
slingshot-init:
condition: service_completed_successfully

networks:
era-network:
driver: bridge
2 changes: 1 addition & 1 deletion slingshot

0 comments on commit 169f75e

Please sign in to comment.