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

Conversation

anshalshukla
Copy link
Contributor

  • ERC20 token is not deployed behind a proxy as it was causing issues while deposit.
  • Didn't include submodules as code for different bridge components were fetched from different sources
    * Legacy Bridge (Eth) solidity contracts were downloaded from etherscan as the function selector required for eth
    deposit was not present in any of the branch of starkgate-contracts. Cairo contract was taken from branch
    update-cairo- 0.9.0 of starkgate-contracts.
    * Token Bridge (ERC20) contracts were fetched from starkgate-contracts release v2.0

@anshalshukla
Copy link
Contributor Author

Requirement for #1419

* feat : added ethereum client for custom input

* feat : code refactoring | module splitting

* fixes : pr #1

* fixes : pr #1 | iter 2

* fixes : pr #1 | proxy client update

* fixes : pr #1 | proxy client update | ethereum instance

* fixes : pr #1 | proxy client update | ethereum instance

* fix : starkgate_manager_client modules

* feat : updated the deps and visibility

* feat : updated abis
crates/ethereum-instance/src/lib.rs Outdated Show resolved Hide resolved
crates/ethereum-instance/src/lib.rs Outdated Show resolved Hide resolved
crates/ethereum-instance/src/lib.rs Outdated Show resolved Hide resolved
crates/ethereum-instance/src/lib.rs Outdated Show resolved Hide resolved
crates/starknet-token-bridge-client/src/lib.rs Outdated Show resolved Hide resolved
crates/starknet-erc20-client/src/lib.rs Outdated Show resolved Hide resolved

use utils::errors::Error;

type Address = H160;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I'd remove these aliases, they do not contribute much to the readability (on the contrary you have to check what's the actual type).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't Address more readable than H160?

README.md Show resolved Hide resolved
.idea/.gitignore Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add this to gitignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

crates/ethereum-instance/src/lib.rs Outdated Show resolved Hide resolved

use utils::errors::Error;

type Address = H160;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't Address more readable than H160?

crates/starknet-proxy-client/src/deploy.rs Show resolved Hide resolved
@ocdbytes
Copy link
Contributor

ocdbytes commented Apr 9, 2024

@apoorvsadana @unstark

I have pushed some of the changes. I will add the contract changes also and push

@ocdbytes
Copy link
Contributor

@apoorvsadana @EvolveArt @unstark

I have pushed the changes requested. For the Proxy part, I am creating a new issue as a few things were breaking while testing. Please review the latest changes and please do tell me if anything needs to be changed.

README.md Show resolved Hide resolved
/// Will try to attach to already running Anvil instance or custom rpc and private key provided to the function.
/// if not provided any argument it will attack to a default anvil instance with default anvil params.
pub fn attach(rpc_endpoint: Option<String>, priv_key: Option<String>) -> Result<Self, Error> {
let rpc_endpoint = rpc_endpoint.unwrap_or_else(|| {
std::env::var("ANVIL_ENDPOINT")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rename this as well to make it generic, ETH_RPC_ENDPOINT? we will also need to change it in Madara

@apoorvsadana apoorvsadana merged commit 55511ad into keep-starknet-strange:main Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants