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

Adding Near -> Eth connectors #99

Merged
merged 71 commits into from
Aug 10, 2022

Conversation

ilblackdragon
Copy link
Contributor

Two new connectors are added:

  • token-factory - locks NEP141 tokens on NEAR side and emits <token, amount, recipient address>. Accepts Unlock event from Ethereum side, verifies it's correctness and releases funds to it.
  • erc20-bridge-token - BridgeTokenFactory and BridgeToken Ethereum contracts. BridgeTokenFactory creates new BridgeToken that correspond to specific token account id on NEAR side. BridgeTokenFactory can receive events from NEAR, verify them and mint appropriate amounts on recipient addresses. Calling withdraw will burn tokens of this user and will generate event <> that can be relayed to token-factory.

@ilblackdragon ilblackdragon requested a review from sept-en as a code owner March 27, 2022 14:53
@sept-en sept-en self-assigned this Mar 28, 2022
@sept-en sept-en added enhancement New feature or request security labels Mar 28, 2022
Copy link
Contributor

@sept-en sept-en left a comment

Choose a reason for hiding this comment

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

Thanks for implementing such useful things, guys!

Added some comments that need to be addressed as per the initial review. In general, looks good!

bridge-common/Cargo.toml Outdated Show resolved Hide resolved
bridge-common/Cargo.toml Outdated Show resolved Hide resolved
bridge-common/Cargo.toml Outdated Show resolved Hide resolved
bridge-common/src/lib.rs Outdated Show resolved Hide resolved
erc20-bridge-token/contracts/BridgeToken.sol Outdated Show resolved Hide resolved
token-locker/rust-toolchain Outdated Show resolved Hide resolved
token-locker/src/lib.rs Show resolved Hide resolved
token-locker/src/lib.rs Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@ilblackdragon
Copy link
Contributor Author

ilblackdragon commented Apr 1, 2022

I didn't update to near-plugins because versions of dependencies don't match.
To actually do this, everything including near-plugins and rainbow needs to be updated to the new versions properly.

I suggest to do that in a separate PR otherwise, this going to be a huge mess as it needs all changes from #96

Copy link
Contributor

@mfornet mfornet left a comment

Choose a reason for hiding this comment

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

Looks good security wise.

token-locker/src/lib.rs Outdated Show resolved Hide resolved
token-locker/src/lib.rs Outdated Show resolved Hide resolved
token-locker/src/lib.rs Outdated Show resolved Hide resolved
erc20-bridge-token/contracts/BridgeTokenFactory.sol Outdated Show resolved Hide resolved
erc20-bridge-token/contracts/BridgeToken.sol Outdated Show resolved Hide resolved
erc20-bridge-token/contracts/BridgeToken.sol Outdated Show resolved Hide resolved
erc20-bridge-token/contracts/BridgeToken.sol Outdated Show resolved Hide resolved
@Shockedshodan
Copy link
Contributor

5a77538

Last update - I cut some errors just to get some space. Is it ok?

@sept-en
Copy link
Contributor

sept-en commented Jun 3, 2022

5a77538

Last update - I cut some errors just to get some space. Is it ok?

No, please revert.

@Shockedshodan
Copy link
Contributor

Shockedshodan commented Jun 3, 2022

Reverted

ilblackdragon@aca89f0

@Shockedshodan Shockedshodan force-pushed the near-eth-connectors branch from e4b3ee6 to 2496b3f Compare June 3, 2022 11:59
@sept-en sept-en requested review from karim-en and sept-en June 20, 2022 12:27
@sept-en sept-en requested a review from mfornet August 8, 2022 14:48
Copy link
Contributor

@sept-en sept-en left a comment

Choose a reason for hiding this comment

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

Merging it now. All future improvements should be done in separate PRs.

@sept-en sept-en merged commit f7f3fea into Near-One:master Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants