Skip to content

Commit

Permalink
refactor: updates naming convention to reflect repo rename of era-tes…
Browse files Browse the repository at this point in the history
…t-node to anvil-zksync (#31)
  • Loading branch information
dutterbutter authored Dec 12, 2024
1 parent 68bf194 commit 03ba96c
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 163 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
pull_request:
branches: [ "*" ]
branches: ["*"]
push:
branches: ["main"]

Expand Down Expand Up @@ -49,8 +49,8 @@ jobs:
- name: Install sccache
uses: mozilla-actions/[email protected]

- name: Install era-test-node
uses: dutterbutter/era-test-node-action@v1
- name: Install anvil-zksync
uses: dutterbutter/anvil-zksync-action@v1.0.0

- name: Format
run: cargo fmt --all -- --check
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the functionality is added in a way that is aligned with overall `alloy` design,
specific to the `Zksync` network, or via extension traits (in case of `Provider`, for example).

Similarly to `anvil` bindings, `alloy-zksync` provides bindings for
[era-test-node](https://github.com/matter-labs/era-test-node).
[anvil-zksync](https://github.com/matter-labs/anvil-zksync).

For usage, the best reference currently is [examples](./examples/):
- [basic usage](./examples/showcase.rs),
Expand Down
8 changes: 4 additions & 4 deletions examples/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Example of deploying a contract at runtime from Solidity bytecode to era-test-node and
//! Example of deploying a contract at runtime from Solidity bytecode to anvil-zksync and
//! interacting with it.
//! Based on the example from the `alloy` book.
Expand Down Expand Up @@ -27,12 +27,12 @@ sol! {

#[tokio::main]
async fn main() -> Result<()> {
// Create provider connected to the `era_test_node`.
// Note that you can manually spawn and configure the `era_test_node`, e.g. if you don't want the instance
// Create provider connected to the `anvil-zksync`.
// Note that you can manually spawn and configure the `anvil-zksync`, e.g. if you don't want the instance
// to be spawned implicitly and/or you don't want it to be attached to a single provider.
let provider = zksync_provider()
.with_recommended_fillers()
.on_era_test_node_with_wallet();
.on_anvil_zksync_with_wallet();

// Manually deploy contract.
let bytecode = hex::decode("0000008003000039000000400030043f0000000100200190000000180000c13d00000060021002700000000f02200197000000040020008c000000330000413d000000000301043b000000e003300270000000110030009c000000270000613d000000120030009c000000200000613d000000130030009c000000330000c13d000000240020008c000000330000413d0000000002000416000000000002004b000000330000c13d0000000401100370000000000101043b000000350000013d0000000001000416000000000001004b000000330000c13d0000002001000039000001000010044300000120000004430000001001000041000000390001042e0000000001000416000000000001004b000000330000c13d000000000100041a000000800010043f0000001601000041000000390001042e0000000001000416000000000001004b000000330000c13d000000000100041a000000010110003a000000350000c13d0000001401000041000000000010043f0000001101000039000000040010043f00000015010000410000003a0001043000000000010000190000003a00010430000000000010041b0000000001000019000000390001042e0000003800000432000000390001042e0000003a00010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000d09de08a000000000000000000000000000000000000000000000000000000008381f58a000000000000000000000000000000000000000000000000000000003fb5c1cb4e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000200000008000000000000000000000000000000000000000000000000000000000000000000000000000000000907744cfcba9c9276da62757037b7ad91caa65b463857bae5ffcd6ceb985e728").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples/showcase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> anyhow::Result<()> {
// Create a provider with the wallet.
let provider = zksync_provider()
.with_recommended_fillers()
.on_era_test_node_with_wallet();
.on_anvil_zksync_with_wallet();

// Build a transaction to send 100 wei from Alice to Vitalik.
// The `from` field is automatically filled to the first signer's address (Alice).
Expand Down
Loading

0 comments on commit 03ba96c

Please sign in to comment.