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

[WIP] Define information for each coin #111

Closed
vikmeup opened this issue Mar 8, 2019 · 5 comments
Closed

[WIP] Define information for each coin #111

vikmeup opened this issue Mar 8, 2019 · 5 comments
Assignees

Comments

@vikmeup
Copy link
Contributor

vikmeup commented Mar 8, 2019

  1. chain ID
  2. Is this only coin, or there is also support for tokens on the blockchain?
  3. default network fee - in satoshis.
  4. Native Token name, aka ERC20, TRC10, or Default to symbol + 20
@vikmeup vikmeup self-assigned this Mar 8, 2019
@vikmeup
Copy link
Contributor Author

vikmeup commented Mar 21, 2019

@alejandro-isaza, @hewigovens what's the best way to configure chain ID? it could be Int or String

Would it make sense to have such struct:

struct ChainID {
     struct Ethereum {
        static let mainnet = 1
     }
     struct Wanchain {
        static let mainnet = 1
     }
     struct Binance {
        static let mainnet = "Binance-Chain"
     }
    struct Stellar {
         static let mainnet = "Stellar-Network"
         static let kin = "Kin-Chain"
    }
}

@alejandro-isaza C++ wise, what's the easier to make this work and generate code for it?

@hewigovens
Copy link
Contributor

how about just do:

extension CoinType {
    var chainId: Int 
    var chainIdString: String
}

@alejandro-isaza
Copy link
Contributor

alejandro-isaza commented Mar 21, 2019

We can also just use string for everything. The alternative is to use std::variant<int, std::string> but we can't expose that on the interface.

@stale
Copy link

stale bot commented May 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 20, 2019
@vikmeup vikmeup closed this as completed May 20, 2019
@vikmeup
Copy link
Contributor Author

vikmeup commented May 20, 2019

Better design to avoid hardcoding and getting chain ID from the network itself.

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

No branches or pull requests

3 participants