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

Map serialized EVM address to associated types #33

Closed
sisyphusSmiling opened this issue Apr 16, 2024 · 0 comments · Fixed by #35
Closed

Map serialized EVM address to associated types #33

sisyphusSmiling opened this issue Apr 16, 2024 · 0 comments · Fixed by #35

Comments

@sisyphusSmiling
Copy link
Contributor

Issue To Be Solved

This issue arose when creating batch onboarding transactions. That is, the current EVM address onboarding check validates one of two things:

  • Is the EVM contract address factory-deployed?
  • Is there a Cadence contract with the appropriately derived name deployed in the bridge account?

If either of those things are true, then the address does not require onboarding. However, when onboarding multiple EVM addresses in a single transaction, contracts deployed to the bridge account cannot be accessed in the runtime since they are not available in the state space until after the transaction has completed.

Suggest A Solution

@lmcmz has mentioned that batch onboarding is a product requirement, so EVM address status will require some reworking. Unfortunately, the EVMAddress type cannot serve as an index to a mapping, at least not at the moment (though this may be possible by somehow ensuring the type is a HashableStruct). Instead, we could index on the serialized value of the EVM address and map to the associated Type. This would in essence be a reverse mapping of the FlowEVMBridgeConfig.typeToEVMAddress field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant