Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eth/ERC20 Bridge related contracts #9

Merged
merged 32 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
48a6425
add:starkgate contracts
anshalshukla Mar 1, 2024
66d626d
update: add traits to bridge and legacy bridge
anshalshukla Mar 3, 2024
b35e52e
test:eth
anshalshukla Mar 3, 2024
26bf6a2
add proxxy
anshalshukla Mar 3, 2024
a615c7b
update
anshalshukla Mar 3, 2024
d75d001
update
anshalshukla Mar 3, 2024
f2e1eb0
add: methods to eth bridge
anshalshukla Mar 6, 2024
64a466c
add: add fees to eth bridge payable function
anshalshukla Mar 6, 2024
90c36ee
add: add fees to eth bridge payable function
anshalshukla Mar 6, 2024
d646677
add: methods to token bridge
anshalshukla Mar 7, 2024
f9a10a8
refactor
anshalshukla Mar 7, 2024
bd3f2ad
update: abi compiles
anshalshukla Mar 7, 2024
8921057
add: methods to token bridge
anshalshukla Mar 8, 2024
c104f23
fix
anshalshukla Mar 8, 2024
7278ace
tesr
anshalshukla Mar 9, 2024
60bd142
add
anshalshukla Mar 11, 2024
1585303
add
anshalshukla Mar 11, 2024
5fd421a
add
anshalshukla Mar 11, 2024
b23c6b4
test
anshalshukla Mar 11, 2024
53a2443
remove proxy support from erc20
anshalshukla Mar 12, 2024
845ec4b
minor: refactoring
anshalshukla Mar 12, 2024
5426c46
add: withdraw function
anshalshukla Mar 12, 2024
4b4e6e0
fix
anshalshukla Mar 12, 2024
59234b8
remove .idea
anshalshukla Mar 13, 2024
452e5f8
zaun module updates (#2)
Apr 2, 2024
2a84dbb
fix : fixed unwrap and clone changes
Apr 8, 2024
b37bae7
fix : added fixes for unwrap and makefile updated
Apr 9, 2024
6d289ed
feat : updated ethereum client and added no arg type
Apr 10, 2024
e4f6689
update readme for bridge contract sources
apoorvsadana Apr 10, 2024
3b43f2c
pushed changes
Apr 10, 2024
657b026
Merge branch 'starkgate' of https://github.com/anshalshukla/zaun into…
Apr 10, 2024
06d35f4
fix : updated the vars
Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ docs/
# Dotenv file
.env

script/anvil.json
script/anvil.json

.idea
120 changes: 107 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
resolver = "2"
members = [
"crates/starknet-core-contract-client",
"crates/sandbox",
"crates/ethereum-instance", "crates/starknet-eth-bridge-client", "crates/starknet-token-bridge-client", "crates/starkgate-manager-client", "crates/utils", "crates/starknet-erc20-client", "crates/starkgate-registry-client", "crates/starknet-proxy-client",
]

[workspace.package]
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
.PHONY: artifacts

artifacts:
mkdir crates/sandbox/artifacts || true
mkdir crates/starknet-proxy-client/src/artifacts || true
mkdir crates/starknet-core-contract-client/src/artifacts || true
forge build
cp out/UnsafeProxy.sol/UnsafeProxy.json crates/sandbox/artifacts/
cp out/StarknetSovereign.sol/Starknet.json crates/sandbox/artifacts/
cp out/UnsafeProxy.sol/UnsafeProxy.json crates/starknet-proxy-client/src/artifacts/
cp out/StarknetSovereign.sol/Starknet.json crates/starknet-core-contract-client/src/artifacts/
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
# Zaun
A development environment for Starknet Solidity contracts.

### Setup:
This repository contains interfaces and functions to interact with starknet solidity contracts.

## Setup

```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```

### Testing:
## Testing

Unit

```bash
forge test -vv
```

### Devnet

Start Avnvil as background process w/ Core Contracts and STARK token:
Start Anvil as background process w/ Core Contracts and STARK token:

```bash
./script/sn-base-dev.sh
```

Kill Anvil deployment:

```bash
./script/sn-base-kill.sh
```

### Artifacts
## Artifacts

Zaun sandbox crate can be used as dev dependency in external projects for integration testing.
If any changes made to the Solidity contracts, one has to re-generate Ethers bindings (this won't be done automatically).
Zaun sandbox crate can be used as dev dependency in external projects. If any changes made to the Solidity contracts, one has to re-generate Ethers bindings (this won't be done automatically).

```bash
make artifacts
```
apoorvsadana marked this conversation as resolved.
Show resolved Hide resolved

### StarkNet Consensus Protocol Contracts
## StarkNet Consensus Protocol Contracts

PoC solidity implementation of the following Starknet Decentralized Protocol proposal:

- [I - Introduction](https://community.starknet.io/t/starknet-decentralized-protocol-i-introduction/2671/1)
- [II - Candidate for Leader Elections](https://community.starknet.io/t/starknet-decentralized-protocol-ii-candidate-for-leader-elections/4751)
- [III - Consensus](https://community.starknet.io/t/starknet-decentralized-protocol-iii-consensus/5386)
- [IV - Proofs in the Protocol](https://community.starknet.io/t/starknet-decentralized-protocol-iv-proofs-in-the-protocol/6030)
- [V - Checkpoints for Fast Finality](https://community.starknet.io/t/starknet-decentralized-protocol-v-checkpoints-for-fast-finality/6032)
- [VI - The Buffer Problem](https://community.starknet.io/t/starknet-decentralized-protocol-vi-the-buffer-problem/7098)
- [VII - Chained Proof Protocols & Braiding](https://community.starknet.io/t/starknet-decentralized-protocol-vii-chained-proof-protocols-braiding/18831)
- [VII - Chained Proof Protocols & Braiding](https://community.starknet.io/t/starknet-decentralized-protocol-vii-chained-proof-protocols-braiding/18831)
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "sandbox"
name = "ethereum-instance"
edition.workspace = true
version.workspace = true
authors.workspace = true

[dependencies]
starknet-core-contract-client = { path = "../starknet-core-contract-client" }
ethers = { workspace = true }
dirs = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
hex = { workspace = true }
utils = { path = "../utils" }

[dev-dependencies]
tokio = { version = "1.29.1", features = ["rt", "macros", "parking_lot"] }
Loading