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

[evm] Minimalist precompile for x/bank #2049

Closed
3 of 5 tasks
Tracked by #1836
Unique-Divine opened this issue Sep 24, 2024 · 1 comment · Fixed by #2107 or #2135
Closed
3 of 5 tasks
Tracked by #1836

[evm] Minimalist precompile for x/bank #2049

Unique-Divine opened this issue Sep 24, 2024 · 1 comment · Fixed by #2107 or #2135
Assignees
Labels
x: evm Relates to Nibiru EVM or the EVM Module

Comments

@Unique-Divine
Copy link
Member

Unique-Divine commented Sep 24, 2024

Desired Behavior

As a user of an EVM wallet, I should be able to:

  • Method IFunToken.sendToBank: Send ERC20 tokens to the bank state as Bank Coins
  • Method IFunToken.sendToEvm: Send Bank Coins to the EVM state as ERC20 tokens
  • Method IFunToken.bankMsgSend: Make an EVM call that calls "/cosmos.bank.v1beta1.MsgSend" using
    a given to_address, denom, and amount. The to_address can be either a
    bech32 or hexadecimal, similar to precompile for fungible token mappings.
  • Method IFunToken.bankBalance: Query the balance of the coin with denomination denom for some address, returning 0 if the account
    does not exist. The `address can be either a bech32 or hexadecimal.
  • Method IFunToken.whoAmI: Query the addresses for a Nibiru account. Given some address (either the
    Bech32 or Ethereum hex), return both hexadecimal and bech32 representation. This
    method isn't related to the Bank Module, however it allows future developers to
    easily build on top of the functionality in x/bank and programmatically grab
    nibi-prefixed addresses corresponding to Ethereum address types in other
    smart contracts.

We can add these as methods to FunToken.sol

Related

@github-actions github-actions bot added the S-triage Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5 label Sep 24, 2024
@github-project-automation github-project-automation bot moved this to ⚡ Building 🧱 in ⚛️ Nibiru (Hougyoku) Sep 24, 2024
@github-project-automation github-project-automation bot moved this from ⚡ Building 🧱 to ✅ Completed in ⚛️ Nibiru (Hougyoku) Nov 8, 2024
@Unique-Divine
Copy link
Member Author

Unique-Divine commented Nov 8, 2024

The queries have been implemented, but the transfer method has not yet.

@Unique-Divine Unique-Divine reopened this Nov 8, 2024
@github-project-automation github-project-automation bot moved this from ✅ Completed to ⚡ Building 🧱 in ⚛️ Nibiru (Hougyoku) Nov 8, 2024
@Unique-Divine Unique-Divine added x: evm Relates to Nibiru EVM or the EVM Module and removed S-triage Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5 labels Nov 12, 2024
@github-project-automation github-project-automation bot moved this from ⚡ Building 🧱 to ✅ Completed in ⚛️ Nibiru (Hougyoku) Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x: evm Relates to Nibiru EVM or the EVM Module
Projects
Archived in project
2 participants