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

feat: EVM account binding #761

Merged
merged 18 commits into from
Feb 20, 2024
Merged

feat: EVM account binding #761

merged 18 commits into from
Feb 20, 2024

Conversation

Roznovjak
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Feb 13, 2024

New crates:

  • pallet-evm-accounts: v1.0.0
  • pallet-evm-accounts-rpc-runtime-api: v1.0.0

Crate versions that have been updated:

  • runtime-integration-tests: v1.17.4 -> v1.17.5
  • hydradx-runtime: v208.0.0 -> v209.0.0

Runtime version has been increased.

Copy link
Contributor

@enthusiastmartin enthusiastmartin left a comment

Choose a reason for hiding this comment

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

some suggestions

pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/circuit-breaker/src/benchmarking.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/Cargo.toml Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
}

/// Return the Substrate address bound to the EVM account. If not bound, returns `None`.
pub fn bound_account_id(evm_address: EvmAddress) -> Option<T::AccountId> {
Copy link
Contributor

Choose a reason for hiding this comment

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

this does not bound the account. i would suggest not to use a verb. Something like

bounded_account_id would be more clear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not bind, so I believe it's ok as it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

bound is also a verb;-)

anyway, i find the wording bit too dificult to understand. there are functions named - get bound account, get truncated account, get account id, evm addres ...

without looking at the params - it kinda hard to understand what each one does.

Copy link
Member

@mrq1911 mrq1911 left a comment

Choose a reason for hiding this comment

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

please make sure the EVM transactions are not accepted for bound accounts (bound account can only submit EVM transactions through extrinsics)

pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
pallets/evm-accounts/src/lib.rs Outdated Show resolved Hide resolved
runtime/hydradx/src/lib.rs Outdated Show resolved Hide resolved
@Roznovjak Roznovjak requested a review from mrq1911 February 19, 2024 13:38
@mrq1911 mrq1911 merged commit 3c5749e into master Feb 20, 2024
3 of 4 checks passed
@Roznovjak Roznovjak deleted the evm_account_binding branch February 20, 2024 12:44
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.

3 participants