Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Bitcoin = BlockchainName("bitcoin") Ethereum = BlockchainName("ethereum") ERC20 = BlockchainName("erc20") )
View Source
var ( BTC = TokenName("BTC") ETH = TokenName("ETH") WBTC = TokenName("WBTC") REN = TokenName("REN") DGX = TokenName("DGX") ZRX = TokenName("ZRX") OMG = TokenName("OMG") DAI = TokenName("DAI") PAX = TokenName("PAX") USDC = TokenName("USDC") GUSD = TokenName("GUSD") TUSD = TokenName("TUSD") )
View Source
var ( TokenBTC = Token{BTC, 8, Bitcoin} TokenETH = Token{ETH, 18, Ethereum} TokenWBTC = Token{WBTC, 8, ERC20} TokenREN = Token{REN, 18, ERC20} TokenDGX = Token{DGX, 9, ERC20} TokenZRX = Token{ZRX, 18, ERC20} TokenOMG = Token{OMG, 18, ERC20} TokenTUSD = Token{TUSD, 18, ERC20} TokenDAI = Token{DAI, 18, ERC20} TokenUSDC = Token{USDC, 6, ERC20} TokenGUSD = Token{GUSD, 2, ERC20} TokenPAX = Token{PAX, 18, ERC20} )
Functions ¶
func NewErrUnsupportedBlockchain ¶
func NewErrUnsupportedBlockchain(blockchain BlockchainName) error
func NewErrUnsupportedToken ¶
NewErrUnsupportedToken returns a new ErrUnsupportedToken error.
Types ¶
type Blockchain ¶
type Blockchain struct { Name BlockchainName `json:"name"` Address string `json:"address"` }
type BlockchainName ¶
type BlockchainName string
type CostBlob ¶
TODO: Why this is in foundation? CostBlob is the json representation of cost.
func CostToCostBlob ¶
CostToCostBlob converts cost to cost blob
type ErrUnsupportedToken ¶
type ErrUnsupportedToken error
ErrUnsupportedToken is returned when the token is not supported by swapperd.
type Token ¶
type Token struct { Name TokenName `json:"name"` Decimals int `json:"decimals"` Blockchain BlockchainName `json:"blockchain"` }
Token represents the token we are trading.
func PatchToken ¶
func (Token) AdditionalTransactionFee ¶
Click to show internal directories.
Click to hide internal directories.