Skip to content

[PoC] Non-enshrined tokens #792

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

[PoC] Non-enshrined tokens #792

wants to merge 2 commits into from

Conversation

shermike
Copy link
Contributor

@shermike shermike commented Apr 10, 2025

This is a Proof Of Concept PR about enshrined tokens implemented in contracts.

The following was done:

  • TokenManager contract control all tokens within one shard. It has a predefined address and is deployed on each shard.
  • Relayer is a stub for messages via contracts. In this PR, it is necessary only for calling TokenManager contract to handle tokens.
  • Support bounce transactions in Relayer
  • Replace all tokens precompiles

It already passes all tests from multitoken_test.go file.

@@ -80,10 +59,7 @@ func (as *AccountState) FetchRequestId() uint64 {
}

func NewAccountStateReader(account *AccountState) *AccountStateReader {
Copy link
Contributor

@Un1oR Un1oR Apr 21, 2025

Choose a reason for hiding this comment

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

The account parameter is no longer used

@@ -117,7 +116,7 @@ func (api *localShardApi) GetTokens(
return res, nil
}

func (api *localShardApi) CallGetter(
func (api *localShardApiRo) CallGetter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (api *localShardApiRo) CallGetter(
func (api *localShardApiRo) callGetter(

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