Skip to content

Commit

Permalink
update docs (#1058)
Browse files Browse the repository at this point in the history
* update docs

* fix
  • Loading branch information
shunjizhan authored Nov 18, 2024
1 parent cfab498 commit 29ebd9d
Show file tree
Hide file tree
Showing 97 changed files with 36 additions and 9,181 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
timeout_minutes: 5
max_attempts: 3
command: docker compose up -d
command: docker compose up -d -- node-ready

- name: start rpc adapter for eth-providers
if: matrix.project == 'eth-providers'
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
with:
timeout_minutes: 5
max_attempts: 3
command: docker compose up -d
command: docker compose up -d -- node-ready

- name: start coverage server
env:
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ services:
node:
condition: service_healthy
command: echo "node ready 🚀"

eth-rpc:
image: acala/eth-rpc-adapter:2.9.4
ports:
- 8545:8545
command:
- -e=ws://node:9944
depends_on:
- node-ready

11 changes: 3 additions & 8 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Bodhi Examples
Run a Bodhi Stack with docker:
```
docker compose -f docker-compose-bodhi-stack.yml up
```

Develop Contracts With:
- [Hardhat](./hardhat-tutorials/README.md)
- [Truffle](./truffle-tutorials/README.md)
- [Hardhat](../e2e-tests/e2e-hardhat/)
- [Truffle](../e2e-tests/e2e-truffle/)
- [Viem](../e2e-tests/e2e-viem/)
- [Foundry](./foundry/counter/README.md)
- [Waffle](./waffle/README.md)

Test with:
- [Chopsticks](./chopsticks/README.md)
86 changes: 0 additions & 86 deletions examples/docker-compose-bodhi-stack.yml

This file was deleted.

16 changes: 6 additions & 10 deletions examples/foundry/counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ forge test
```

## Deploy
### to local mandala
1) first start a local mandala
### to local acala fork
first start a local acala fork and an eth rpc adapter
```
docker run -it --rm -p 9944:9944 ghcr.io/acalanetwork/mandala-node:sha-fe67fd1 --dev --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing
cd ../../.. # root of the project
docker compose up
```

2) then start an eth rpc adapter
```
npx @acala-network/eth-rpc-adapter@latest --localMode
```

3) deploy to local mandala with the pre-funded account
deploy to local acala fork with the pre-funded account
```
forge create src/Counter.sol:Counter \
--private-key 0xa872f6cbd25a0e04a08b1e21098017a9e6194d101d75e13111f71410c59cd57f \
Expand All @@ -45,7 +41,7 @@ forge create src/Counter.sol:Counter \
```

### to public network
in order to deploy to public network, we can skip step 1 and 2 in previous section, and switch to public eth rpc endpoint for step 3. For example, to deploy to public mandala, substitute `http://localhost:8545` with `https://eth-rpc-tc9.aca-staging.network`.
in order to deploy to public network, we can skip step 1 and 2 in previous section, and switch to public eth rpc endpoint for step 3. For example, to deploy to acala mainnet, substitute `http://localhost:8545` with `https://eth-rpc-acala.aca-api.network`.

### use a deploy script
For more complex deployments or tests (for example if your tests need to make axios call), you might want to write a JS script. In such case you can easily integrate foundry with hardhat by following the instructions [here](https://hardhat.org/hardhat-runner/docs/advanced/hardhat-and-foundry). You can still write, test, and build contracts with foundry.
2 changes: 0 additions & 2 deletions examples/waffle/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions examples/waffle/README.md

This file was deleted.

Loading

0 comments on commit 29ebd9d

Please sign in to comment.