Skip to content

Impl ERC20 precompile interface#1965

Open
HenriqueNogara wants to merge 8 commits into
developfrom
erc20-precompile-v0
Open

Impl ERC20 precompile interface#1965
HenriqueNogara wants to merge 8 commits into
developfrom
erc20-precompile-v0

Conversation

@HenriqueNogara

@HenriqueNogara HenriqueNogara commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

changelog

new features

  • Adds an ERC20 precompile interface

other

Comment thread pallets/asset/src/lib.rs Outdated
Comment on lines +216 to +223
Self::deposit_event(
env,
IERC20Events::Transfer(IERC20::Transfer {
from: caller.0.into(),
to: call.to,
value: call.value,
}),
)?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we will need to emit EVM-compatible transfer events from Substrate-issued asset transfer calls.

@HenriqueNogara HenriqueNogara marked this pull request as ready for review July 6, 2026 01:10
Comment thread pallets/asset/src/migrations.rs Outdated
Comment thread pallets/asset/src/migrations.rs Outdated
let next_index = asset_index.saturating_add(1);
NextAssetIndex::<T>::put(next_index);
writes += 3;
reads += 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there is only one read NextAssetIndex::<T>::get inside the loop right now.

@HenriqueNogara HenriqueNogara Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

One read is for the Assets storage

@HenriqueNogara HenriqueNogara requested a review from Neopallium July 8, 2026 22:33
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.

2 participants