Description
opened on Aug 17, 2020
The faucet is the only place in CosmJS where we still have the BCP token tickers supported (e.g. request SHELL instead of ushell). This causes a lot of effort to get right in the faucet and it also seems to confuse testnet users trying to request the base denom.
What about removing
export interface BankTokenMeta {
readonly denom: string;
/**
* The token ticker symbol, e.g. ATOM or ETH.
*/
readonly tickerSymbol: string;
/**
* The number of fractional digits the token supports.
*
* A quantity is expressed as atomic units. 10^fractionalDigits of those
* atomic units make up 1 token.
*
* E.g. in Ethereum 10^18 wei are 1 ETH and from the quantity 123000000000000000000
* the last 18 digits are the fractional part and the rest the wole part.
*/
readonly fractionalDigits: number;
}
from the faucet entirely and leave it up to UI applications to convert between the base denom and a display token (where the logic needs to exist anyways for all the other APIs).
So instead of
JSON=$(jq -n --arg addr $(coral keys show -a fred) '{"ticker":"COSM", "address":$addr}') \
&& curl -X POST --header "Content-Type: application/json" --data "$JSON" https://faucet.coralnet.cosmwasm.com/credit
you'd
JSON=$(jq -n --arg addr $(coral keys show -a fred) '{"denom":"ucosm", "address":$addr}') \
&& curl -X POST --header "Content-Type: application/json" --data "$JSON" https://faucet.coralnet.cosmwasm.com/credit
Activity