Skip to content

Move contracts publickey in a settings toml file #38

@giacomo-cc

Description

@giacomo-cc

Currently we have all the chain smart contracts public keys hardcoded in the codebase:

vyper-cli/src/main.rs

Lines 35 to 38 in c9fc594

const VYPER_CORE_ID: &str = "vyPErCcGJKQQBeeQ59gXcWrDyU4vBrq8qQfacwmsAsp";
const REDEEM_LOGIC_FORWARD: &str = "BrpV1re8MshA8qskKVxcEG8zXG3vf2uLX6myeTKAyhsK";
const RATE_SWITCHBOARD: &str = "2hGXiH1oEQwjCXRx8bNdHTi49ScZp7Mj2bxcjxtULKe1";
const OTC: &str = "8aHSkExY28qCvg4gnTLU7y1Ev6HnpJ1NxuWb9XtEesVt";

We should move these parameters to an external file for easy tuning. For example it could be a settings.toml file (in order to prepare the field also for future user settings/preferences).

Once created the settings.toml file we can create a new command to open it in a text editor in order to allow users to change it, for example:

vyper-cli settings open

I would avoid creating a command for changing each setting entry from the suite, for now it's not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions