Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Add full support for fee handlers in migration scripts #151

Closed
2 tasks
MakMuftic opened this issue Mar 6, 2023 · 0 comments · Fixed by #206
Closed
2 tasks

Add full support for fee handlers in migration scripts #151

MakMuftic opened this issue Mar 6, 2023 · 0 comments · Fixed by #206
Assignees

Comments

@MakMuftic
Copy link
Contributor

Current support for deploying different fee handlers trough migration scripts is limited. This could be especially become a hurtle on deploying new networks in production like environments (with a need for deploying and configuring multiple fee handlers on initial deployment).

Implementation details

To enable deployment of multiple fee handlers and using them when registering on fee router, requires an significant refactor of migration config file format. Below is one possible approach to new format that would enable us to:

  • define multiple fee handler instances that need to be deployed
  • map different fee handlers for each resource (per destination domain)
{
    "fee": {
        "basic": ["0.1", "0.2"],
        "oracle": [
            {
                "target": "evm",
                "gmp": true,
                "params": {
                    "gasUsed": "",
                    "feePercentage": 0
                },
                "address": ""
            }
        ]
    },
    "erc721": [
        {
            "name": "ERC721",
            "fees": [
                {
                    "destDomainID": "5",
                    "feeHandler": "oracle-0"
                },
                {
                    "destDomainID": "2",
                    "feeHandler": "basic-1"
                }
            ]
        }
    ]
}

Testing details

  • Manually test executing initial migration with multiple fee handlers defined, and different fee handlers registered for same resource.

Acceptance Criteria

  • Migration scripts have full support for deploying and setting fee handlers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants