From 070e60411d21084e83bc41baebe5c49470d008d3 Mon Sep 17 00:00:00 2001 From: kbhat1 Date: Tue, 11 Oct 2022 11:52:20 -0400 Subject: [PATCH 1/2] Add tokenfactory module readme --- x/tokenfactory/README.md | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 x/tokenfactory/README.md diff --git a/x/tokenfactory/README.md b/x/tokenfactory/README.md new file mode 100644 index 0000000000..54f89761e1 --- /dev/null +++ b/x/tokenfactory/README.md @@ -0,0 +1,60 @@ +# Token Factory + +The tokenfactory module allows any account to create a new token with +the name `factory/{creator address}/{subdenom}` in a permissionless fashion. + +## Messages + +### CreateDenom + +Creates a denom of `factory/{creator address}/{subdenom}` given the denom creator +address and the subdenom. Subdenoms can contain `[a-zA-Z0-9./]`. + +```go +message MsgCreateDenom { + string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; + string subdenom = 2 [ (gogoproto.moretags) = "yaml:\"subdenom\"" ]; +} +``` + +### Mint + +Minting of a specific denom is only allowed for the current admin. +Note, the current admin is defaulted to the creator of the denom. + +```go +message MsgMint { + string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.nullable) = false + ]; +} +``` + +### Burn + +Burning of a specific denom is only allowed for the current admin. +Note, the current admin is defaulted to the creator of the denom. + +```go +message MsgBurn { + string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.nullable) = false + ]; +} +``` + +### ChangeAdmin + +Change the admin of a denom. Note, this is only allowed to be called by the current admin of the denom. + +```go +message MsgChangeAdmin { + string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; + string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; + string newAdmin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; +} +``` From de4d31b30feeb19e3daaadec8a727d2035bffb14 Mon Sep 17 00:00:00 2001 From: kbhat1 Date: Tue, 11 Oct 2022 12:03:20 -0400 Subject: [PATCH 2/2] Tag with protobuf instead of go --- x/tokenfactory/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/tokenfactory/README.md b/x/tokenfactory/README.md index 54f89761e1..dcac9b0162 100644 --- a/x/tokenfactory/README.md +++ b/x/tokenfactory/README.md @@ -10,7 +10,7 @@ the name `factory/{creator address}/{subdenom}` in a permissionless fashion. Creates a denom of `factory/{creator address}/{subdenom}` given the denom creator address and the subdenom. Subdenoms can contain `[a-zA-Z0-9./]`. -```go +```protobuf message MsgCreateDenom { string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; string subdenom = 2 [ (gogoproto.moretags) = "yaml:\"subdenom\"" ]; @@ -22,7 +22,7 @@ message MsgCreateDenom { Minting of a specific denom is only allowed for the current admin. Note, the current admin is defaulted to the creator of the denom. -```go +```protobuf message MsgMint { string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; cosmos.base.v1beta1.Coin amount = 2 [ @@ -37,7 +37,7 @@ message MsgMint { Burning of a specific denom is only allowed for the current admin. Note, the current admin is defaulted to the creator of the denom. -```go +```protobuf message MsgBurn { string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; cosmos.base.v1beta1.Coin amount = 2 [ @@ -51,7 +51,7 @@ message MsgBurn { Change the admin of a denom. Note, this is only allowed to be called by the current admin of the denom. -```go +```protobuf message MsgChangeAdmin { string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ];