Skip to content

REST API - nibiru/tokenfactory ​

Query Service - nibiru/tokenfactory ​

/nibiru/tokenfactory/v1/denom-info/ ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/tokenfactory/v1/denom-info/{denom} \
  -H 'Accept: application/json'
Summary ​

DenomInfo retrieves the denom metadata and admin info

Parameters ​
NameLocated inDescriptionRequiredSchema
denompathYesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryDenomInfoResponse
defaultAn unexpected error response.runtimeError

/nibiru/tokenfactory/v1/denoms/ ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/tokenfactory/v1/denoms/{creator} \
  -H 'Accept: application/json'
Summary ​

Denoms retrieves all registered denoms for a given creator

Parameters ​
NameLocated inDescriptionRequiredSchema
creatorpathYesstring
Responses ​
CodeDescriptionSchema
200A successful response.v1QueryDenomsResponse
defaultAn unexpected error response.runtimeError

/nibiru/tokenfactory/v1/params ​

bash
# You can also use wget
curl -X GET https://lcd.nibiru.fi/nibiru/tokenfactory/v1/params \
  -H 'Accept: application/json'
Summary ​

Params retrieves the module params

Responses ​
CodeDescriptionSchema
200A successful response.v1QueryParamsResponse
defaultAn unexpected error response.runtimeError

Models ​

protobufAny ​

NameTypeDescriptionRequired
type_urlstringNo
valuebyteNo

runtimeError ​

NameTypeDescriptionRequired
errorstringNo
codeintegerNo
messagestringNo
details[ protobufAny ]No

v1ModuleParams ​

ModuleParams defines the parameters for the tokenfactory module.

On Denom Creation Costs ​

We'd like for fees to be paid by the user/signer of a ransaction, but in many casess, token creation is abstracted away behind a smart contract. Setting a nonzero denom_creation_fee would force each contract to handle collecting and paying a fees for denom (factory/{contract-addr}/{subdenom}) creation on behalf of the end user.

For IBC token transfers, it's unclear who should pay the feeΓÇöthe contract, the relayer, or the original sender?

"Charging fees will mess up composability, the same way Terra transfer tax caused all kinds of headaches for contract devs." - @ethanfrey

Have the end user (signer) pay fees directly in the form of higher gas costs. This way, contracts won't need to handle collecting or paying fees. And for IBC, the gas costs are already paid by the original sender and can be estimated by the relayer. It's easier to tune gas costs to make spam prohibitively expensive since there are per-transaction and per-block gas limits.

See https://github.com/CosmWasm/token-factory/issues/11 for the initial discussion of the issue with @ethanfrey and @valardragon.

NameTypeDescriptionRequired
denom_creation_gas_consumestring (uint64)Adds gas consumption to the execution of MsgCreateDenom as a method of spam prevention. Defaults to 10 NIBI.No

v1QueryDenomInfoResponse ​

NameTypeDescriptionRequired
adminstringNo
metadatav1beta1MetadataMetadata: Official x/bank metadata for the denom. All token factory denoms are standard, native assets.No

v1QueryDenomsResponse ​

NameTypeDescriptionRequired
denoms[ string ]No

v1QueryParamsResponse ​

QueryParamsResponse is the response type for the Query/Params RPC method.

NameTypeDescriptionRequired
paramsv1ModuleParamsNo

v1beta1DenomUnit ​

DenomUnit represents a struct that describes a given denomination unit of the basic token.

NameTypeDescriptionRequired
denomstringdenom represents the string name of the given denom unit (e.g uatom).No
exponentlongexponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom).No
aliases[ string ]No

v1beta1Metadata ​

Metadata represents a struct that describes a basic token.

NameTypeDescriptionRequired
descriptionstringNo
denom_units[ v1beta1DenomUnit ]No
basestringbase represents the base denom (should be the DenomUnit with exponent = 0).No
displaystringdisplay indicates the suggested denom that should be displayed in clients.No
namestringSince: cosmos-sdk 0.43No
symbolstringsymbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43No
uristringURI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46No
uri_hashstringURIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46No