Skip to content

Add an EVMBridgedData View in MetadataViews #221

Open

Description

Instructions

Issue To Be Solved

Need an EVMBridgedData view to contain the information of this token on the EVM side.

Suggest A Solution

Example:

access(all) struct EVMBridgedData {

        /// The EVM contract address of the corresponding ERC20 contract address
        ///
        access(all) let contractAddress: EVM.EVMAddress

        /// The Cadence type associated with the ERC20 contract address
        ///
        access(all) let associatedType:Type

        init(address: EVM.EVMAddress, type: Type) {
            self.contractAddress = address
            self.associatedType = type
        }
}

It is best to implement this View in Templates:
https://github.com/onflow/flow-evm-bridge/tree/main/cadence/contracts/templates

Context

Discord conversation:
https://discord.com/channels/613813861610684416/1240279845473226853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions