Skip to content

Commit

Permalink
finished token factory
Browse files Browse the repository at this point in the history
  • Loading branch information
faneaatiku committed Feb 12, 2024
1 parent eff76fa commit 6bec55a
Show file tree
Hide file tree
Showing 24 changed files with 2,976 additions and 181 deletions.
192 changes: 98 additions & 94 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32344,13 +32344,17 @@ definitions:
title: 'Can be empty for no admin, or a valid osmosis address'
bze.tokenfactory.v1.MsgBurnResponse:
type: object
bze.tokenfactory.v1.MsgChangeAdminResponse:
type: object
bze.tokenfactory.v1.MsgCreateDenomResponse:
type: object
properties:
new_denom:
type: string
bze.tokenfactory.v1.MsgMintResponse:
type: object
bze.tokenfactory.v1.MsgSetDenomMetadataResponse:
type: object
bze.tokenfactory.v1.Params:
type: object
properties:
Expand All @@ -32376,6 +32380,100 @@ definitions:
createDenomFee:
type: string
description: QueryParamsResponse is response type for the Query/Params RPC method.
cosmos.bank.v1beta1.DenomUnit:
type: object
properties:
denom:
type: string
description: denom represents the string name of the given denom unit (e.g uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one must

raise the base_denom to in order to equal the given DenomUnit's denom

1 denom = 1^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).
aliases:
type: array
items:
type: string
title: aliases is a list of string aliases for the given denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
cosmos.bank.v1beta1.Metadata:
type: object
properties:
description:
type: string
denom_units:
type: array
items:
type: object
properties:
denom:
type: string
description: >-
denom represents the string name of the given denom unit (e.g
uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one must

raise the base_denom to in order to equal the given DenomUnit's
denom

1 denom = 1^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).
aliases:
type: array
items:
type: string
title: aliases is a list of string aliases for the given denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
title: denom_units represents the list of DenomUnit's for a given coin
base:
type: string
description: >-
base represents the base denom (should be the DenomUnit with exponent
= 0).
display:
type: string
description: |-
display indicates the suggested denom that should be
displayed in clients.
name:
type: string
description: 'Since: cosmos-sdk 0.43'
title: 'name defines the name of the token (eg: Cosmos Atom)'
symbol:
type: string
description: >-
symbol is the token symbol usually shown on exchanges (eg: ATOM). This
can

be the same as the display.


Since: cosmos-sdk 0.43
description: |-
Metadata represents a struct that describes
a basic token.
cosmos.auth.v1beta1.Params:
type: object
properties:
Expand Down Expand Up @@ -33811,34 +33909,6 @@ definitions:
description: >-
QueryGrantsResponse is the response type for the Query/Authorizations RPC
method.
cosmos.bank.v1beta1.DenomUnit:
type: object
properties:
denom:
type: string
description: denom represents the string name of the given denom unit (e.g uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one must

raise the base_denom to in order to equal the given DenomUnit's denom

1 denom = 1^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).
aliases:
type: array
items:
type: string
title: aliases is a list of string aliases for the given denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
cosmos.bank.v1beta1.Input:
type: object
properties:
Expand All @@ -33859,72 +33929,6 @@ definitions:
NOTE: The amount field is an Int which implements the custom method
signatures required by gogoproto.
description: Input models transaction input.
cosmos.bank.v1beta1.Metadata:
type: object
properties:
description:
type: string
denom_units:
type: array
items:
type: object
properties:
denom:
type: string
description: >-
denom represents the string name of the given denom unit (e.g
uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one must

raise the base_denom to in order to equal the given DenomUnit's
denom

1 denom = 1^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).
aliases:
type: array
items:
type: string
title: aliases is a list of string aliases for the given denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
title: denom_units represents the list of DenomUnit's for a given coin
base:
type: string
description: >-
base represents the base denom (should be the DenomUnit with exponent
= 0).
display:
type: string
description: |-
display indicates the suggested denom that should be
displayed in clients.
name:
type: string
description: 'Since: cosmos-sdk 0.43'
title: 'name defines the name of the token (eg: Cosmos Atom)'
symbol:
type: string
description: >-
symbol is the token symbol usually shown on exchanges (eg: ATOM). This
can

be the same as the display.


Since: cosmos-sdk 0.43
description: |-
Metadata represents a struct that describes
a basic token.
cosmos.bank.v1beta1.MsgMultiSendResponse:
type: object
description: MsgMultiSendResponse defines the Msg/MultiSend response type.
Expand Down
25 changes: 25 additions & 0 deletions proto/tokenfactory/tx.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";
package bze.tokenfactory.v1;

import "gogoproto/gogo.proto";
import "cosmos/bank/v1beta1/bank.proto";

// this line is used by starport scaffolding # proto/tx/import

option go_package = "github.com/bze-alphateam/bze/x/tokenfactory/types";
Expand All @@ -10,6 +13,8 @@ service Msg {
rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse);
rpc Mint(MsgMint) returns (MsgMintResponse);
rpc Burn(MsgBurn) returns (MsgBurnResponse);
rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse);
rpc SetDenomMetadata(MsgSetDenomMetadata) returns (MsgSetDenomMetadataResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}

Expand Down Expand Up @@ -38,4 +43,24 @@ message MsgBurn {
message MsgBurnResponse {
}

message MsgChangeAdmin {
string creator = 1;
string denom = 2;
string newAdmin = 3;
}

message MsgChangeAdminResponse {
}

message MsgSetDenomMetadata {
string creator = 1;
cosmos.bank.v1beta1.Metadata metadata = 2 [
(gogoproto.moretags) = "yaml:\"metadata\"",
(gogoproto.nullable) = false
];
}

message MsgSetDenomMetadataResponse {
}

// this line is used by starport scaffolding # proto/tx/message
Loading

0 comments on commit 6bec55a

Please sign in to comment.