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(engine): erc20 gas token #662

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft

Conversation

joshuajbouw
Copy link
Contributor

@joshuajbouw joshuajbouw commented Jan 23, 2023

Description

This PR introduces a possible exciting feature unique to Aurora where you are able to pay in a gas token other than the base currency, in our case ETH. AURORA and others can then be used instead to pay for gas costs.

Performance / NEAR gas cost considerations

WIP

Testing

WIP

How should this be reviewed

WIP

Additional information

WIP

@joshuajbouw joshuajbouw added C-enhancement Category: New feature or request P-high Pririoty: high A-precompiles Area: Issues that relate to the precompiles. A-engine Area: purely engine EVM related C-research Category: Research, may not end up as a feature. and removed C-enhancement Category: New feature or request labels Jan 23, 2023
engine/src/state.rs Outdated Show resolved Hide resolved
@aleksuss aleksuss self-requested a review January 27, 2023 09:17
@aleksuss aleksuss force-pushed the feat/erc20-gas-token branch 2 times, most recently from 7742836 to 2aada62 Compare February 10, 2023 17:07
/// This does not take gas into account.
pub fn can_transfer<I: IO>(io: &I, address: &Address, amount: Wei) -> bool {
let current_balance = get_balance(io, address);
amount >= current_balance
Copy link
Member

Choose a reason for hiding this comment

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

Probably should be less or equal?

Suggested change
amount >= current_balance
amount <= current_balance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-engine Area: purely engine EVM related A-precompiles Area: Issues that relate to the precompiles. C-research Category: Research, may not end up as a feature. P-high Pririoty: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants