Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: ibc transfer quota #1568

Merged
merged 84 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
6ed9e1f
WIP: add ibc rate limit middleware to ibc transfer
gsk967 Nov 7, 2022
4ce49c9
Merge main
gsk967 Nov 9, 2022
aada85f
WIP: add cll tx,query cmds
gsk967 Nov 9, 2022
08e3d08
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 10, 2022
16b50cd
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 11, 2022
57870ca
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 11, 2022
8412c70
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 12, 2022
9a4d380
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 12, 2022
28e2422
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 12, 2022
8e24765
WIP: add check rate limits for ibc denom
gsk967 Nov 14, 2022
4ad23eb
remove ibc-rate-limits and move rate limits into ibctransfer module
gsk967 Nov 14, 2022
9bf0109
move the umme ibctransfer into ics20 folder
gsk967 Nov 14, 2022
a87ff0d
fix: fix the lint
gsk967 Nov 14, 2022
bdeaec3
refactor: change the module structure to 'authz' type of cosmos-sdk
gsk967 Nov 15, 2022
aba25e0
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 15, 2022
7981d0d
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 16, 2022
37b15b3
remove inflow_limit in rate limits
gsk967 Nov 16, 2022
ea1316e
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 16, 2022
ac8381c
Merge remote-tracking branch 'origin/sai/ibc-rate-limit' into sai/ibc…
gsk967 Nov 16, 2022
a8206d3
chore: check the rate limits by exchange rate
gsk967 Nov 17, 2022
990db76
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 17, 2022
49c2bbb
add denom exponent to calculate amount in USD
gsk967 Nov 17, 2022
b5435b1
calculating the sent amount with exponent of registerd token
gsk967 Nov 17, 2022
3143115
fix: fix the amount calculation
gsk967 Nov 17, 2022
db358cf
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 17, 2022
0b30201
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 19, 2022
bce7a99
Merge main
gsk967 Nov 22, 2022
30bbdfc
fix: fix the rate-limit reset issue
gsk967 Nov 22, 2022
c2d0bc5
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 23, 2022
01ce260
refactor: update the params
gsk967 Nov 23, 2022
223f094
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 24, 2022
7b55068
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 28, 2022
c4b7de8
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Nov 29, 2022
b27ff0d
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 5, 2022
e75b6f9
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 23, 2022
90f82b5
fix: fix the build
gsk967 Dec 23, 2022
47f09be
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 27, 2022
ff6239a
chore: update the limits and quota interval
gsk967 Dec 27, 2022
ecacc9e
chore: fix the lint issues
gsk967 Dec 27, 2022
6968250
chore: fix the lint issues
gsk967 Dec 27, 2022
0e2ef16
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 27, 2022
eea2115
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 29, 2022
be02147
chore: addree the pr comments
gsk967 Dec 29, 2022
e9a8717
chore: remove the param subspace from uibc
gsk967 Dec 29, 2022
be8bc11
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Dec 30, 2022
267e958
refactor: refactor the proto and logic
gsk967 Dec 30, 2022
1aeb647
chore: address the pr comments
gsk967 Dec 30, 2022
b952683
fix: fix the buf lint
gsk967 Dec 30, 2022
1b119c7
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 2, 2023
1db2900
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 10, 2023
aa1daea
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 11, 2023
c5bfd75
chore: get the exchange price from TokenValue of leverage
gsk967 Jan 11, 2023
860795b
Merge remote-tracking branch 'origin/sai/ibc-rate-limit' into sai/ibc…
gsk967 Jan 11, 2023
b28f8f4
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 11, 2023
e485b2a
chore: convert uToken to baseToken in ibc-transfer quota checking
gsk967 Jan 11, 2023
3ae43d4
chore: add typed events for emit events
gsk967 Jan 12, 2023
f1d1e54
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 12, 2023
64600ef
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 16, 2023
4da6298
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 16, 2023
85e7486
address the review comments
gsk967 Jan 16, 2023
16e6488
refactor the code
gsk967 Jan 17, 2023
db8e103
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 17, 2023
a3f01de
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 18, 2023
07d05c5
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 23, 2023
14cdcd3
address the pr comments
gsk967 Jan 23, 2023
1dee0e7
chore: fix the build issue
gsk967 Jan 23, 2023
8f052ec
chore: add tests for params
gsk967 Jan 23, 2023
0d71fd2
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 23, 2023
07fe9b4
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 24, 2023
8f1cbe9
fix: fix the update quota params
gsk967 Jan 24, 2023
14c2558
Merge remote-tracking branch 'origin/sai/ibc-rate-limit' into sai/ibc…
gsk967 Jan 24, 2023
a3c1e58
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 24, 2023
14badea
chore: address the pr comments
gsk967 Jan 24, 2023
78184a5
chore: fix the lint
gsk967 Jan 24, 2023
e7ca80f
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 27, 2023
6e8cde5
address the pr comments++
gsk967 Jan 27, 2023
d558dc9
Merge branch 'main' into sai/ibc-rate-limit
gsk967 Jan 30, 2023
b62b3db
address the pr comments
gsk967 Jan 30, 2023
9cc1660
Merge remote-tracking branch 'origin' into sai/ibc-rate-limit
gsk967 Jan 30, 2023
afcf52a
Merge remote-tracking branch 'origin/sai/ibc-rate-limit' into sai/ibc…
gsk967 Jan 30, 2023
16642e6
update reset quota
robert-zaremba Jan 30, 2023
f0ecf0a
move to Marshal to MustMarshal in uibc
gsk967 Jan 30, 2023
87d72ae
add TODO for ibc middleware acknowledgement
gsk967 Jan 30, 2023
8feec2a
add comment to outflow_sum
gsk967 Jan 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 77 additions & 26 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@ import (
appparams "github.com/umee-network/umee/v4/app/params"
"github.com/umee-network/umee/v4/swagger"
"github.com/umee-network/umee/v4/util/genmap"
uibctransfer "github.com/umee-network/umee/v4/x/ibctransfer"
uibctransferkeeper "github.com/umee-network/umee/v4/x/ibctransfer/keeper"
"github.com/umee-network/umee/v4/x/leverage"
leveragekeeper "github.com/umee-network/umee/v4/x/leverage/keeper"
leveragetypes "github.com/umee-network/umee/v4/x/leverage/types"
"github.com/umee-network/umee/v4/x/oracle"
oraclekeeper "github.com/umee-network/umee/v4/x/oracle/keeper"
oracletypes "github.com/umee-network/umee/v4/x/oracle/types"

// umee ibc-transfer and quota for ibc-transfer
"github.com/umee-network/umee/v4/x/uibc"
uics20transfer "github.com/umee-network/umee/v4/x/uibc/ics20"
uibctransferkeeper "github.com/umee-network/umee/v4/x/uibc/ics20/keeper"
uibcmodule "github.com/umee-network/umee/v4/x/uibc/module"
uibcquota "github.com/umee-network/umee/v4/x/uibc/quota"
uibcquotakeeper "github.com/umee-network/umee/v4/x/uibc/quota/keeper"
)

var (
Expand Down Expand Up @@ -174,7 +180,7 @@ func init() {
}

if Experimental {
moduleBasics = append(moduleBasics, wasm.AppModuleBasic{})
moduleBasics = append(moduleBasics, wasm.AppModuleBasic{}, uibcmodule.AppModuleBasic{})
}

ModuleBasics = module.NewBasicManager(moduleBasics...)
Expand All @@ -196,6 +202,7 @@ func init() {

if Experimental {
maccPerms[wasm.ModuleName] = []string{authtypes.Burner}
maccPerms[uibc.ModuleName] = nil
}
}

Expand Down Expand Up @@ -241,6 +248,7 @@ type UmeeApp struct {
LeverageKeeper leveragekeeper.Keeper
OracleKeeper oraclekeeper.Keeper
bech32IbcKeeper bech32ibckeeper.Keeper
uibcQuotaKeeper uibcquotakeeper.Keeper

// make scoped keepers public for testing purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
Expand Down Expand Up @@ -300,12 +308,11 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey,
authzkeeper.StoreKey, nftkeeper.StoreKey, group.StoreKey,
ibchost.StoreKey, ibctransfertypes.StoreKey,
gravitytypes.StoreKey,
ibchost.StoreKey, ibctransfertypes.StoreKey, gravitytypes.StoreKey,
leveragetypes.StoreKey, oracletypes.StoreKey, bech32ibctypes.StoreKey,
}
if Experimental {
storeKeys = append(storeKeys, wasm.StoreKey)
storeKeys = append(storeKeys, wasm.StoreKey, uibc.StoreKey)
}

keys := sdk.NewKVStoreKeys(storeKeys...)
Expand Down Expand Up @@ -442,18 +449,14 @@ func New(
app.StakingKeeper,
distrtypes.ModuleName,
)
var err error
app.LeverageKeeper, err = leveragekeeper.NewKeeper(
app.LeverageKeeper = leveragekeeper.NewKeeper(
appCodec,
keys[leveragetypes.ModuleName],
app.GetSubspace(leveragetypes.ModuleName),
app.BankKeeper,
app.OracleKeeper,
cast.ToBool(appOpts.Get(leveragetypes.FlagEnableLiquidatorQuery)),
)
if err != nil {
panic(err)
}
app.LeverageKeeper = *app.LeverageKeeper.SetHooks(
leveragetypes.NewMultiHooks(
app.OracleKeeper.Hooks(),
Expand Down Expand Up @@ -494,13 +497,35 @@ func New(
// If evidence needs to be handled for the app, set routes in router here and seal
app.EvidenceKeeper = *evidenceKeeper

app.IBCKeeper = ibckeeper.NewKeeper(
appCodec,
keys[ibchost.StoreKey],
app.GetSubspace(ibchost.ModuleName),
*app.StakingKeeper,
app.UpgradeKeeper,
app.ScopedIBCKeeper,
)

var ics4Wrapper ibcporttypes.ICS4Wrapper
if Experimental {
app.uibcQuotaKeeper = uibcquotakeeper.NewKeeper(
appCodec,
keys[uibc.StoreKey],
app.IBCKeeper.ChannelKeeper, app.LeverageKeeper,
)
ics4Wrapper = app.uibcQuotaKeeper
} else {
ics4Wrapper = app.IBCKeeper.ChannelKeeper
}

// Middleware Stacks
// Create an original ICS-20 transfer keeper and AppModule and then use it to
// created an Umee wrapped ICS-20 transfer keeper and AppModule.
ibcTransferKeeper := ibctransferkeeper.NewKeeper(
appCodec,
keys[ibctransfertypes.StoreKey],
app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
ics4Wrapper, // ISC4 Wrapper: IBC Rate Limit middleware
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
app.AccountKeeper,
Expand All @@ -509,15 +534,34 @@ func New(
)

app.UIBCTransferKeeper = uibctransferkeeper.New(ibcTransferKeeper, app.BankKeeper)
ibcTransferModule := ibctransfer.NewAppModule(ibcTransferKeeper)
uibcTransferIBCModule := uibctransfer.NewIBCModule(
ibctransfer.NewIBCModule(ibcTransferKeeper), app.UIBCTransferKeeper,

// Create Transfer Stack
// SendPacket, since it is originating from the application to core IBC:
// transferKeeper.SendPacket -> uibcquota.SendPacket -> channel.SendPacket

// RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way
// channel.RecvPacket -> uibcquota.OnRecvPacket -> transfer.OnRecvPacket

// transfer stack contains (from top to bottom):
// - Umee IBC Transfer
// - IBC Rate Limit Middleware

// create IBC module from bottom to top of stack
var transferStack ibcporttypes.IBCModule
transferStack = uics20transfer.NewIBCModule(
ibctransfer.NewIBCModule(ibcTransferKeeper),
app.UIBCTransferKeeper,
)

if Experimental {
transferStack = uibcquota.NewIBCMiddleware(transferStack, app.uibcQuotaKeeper)
}

// Create IBC Router
// create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, uibcTransferIBCModule)

// Add transfer stack to IBC Router
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper))
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down Expand Up @@ -593,15 +637,18 @@ func New(
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),

ibcTransferModule,
ibctransfer.NewAppModule(ibcTransferKeeper),
gravity.NewAppModule(app.GravityKeeper, app.BankKeeper),
leverage.NewAppModule(appCodec, app.LeverageKeeper, app.AccountKeeper, app.BankKeeper),
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
bech32ibc.NewAppModule(appCodec, app.bech32IbcKeeper),
}
if Experimental {
appModules = append(appModules,
wasm.NewAppModule(app.appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper))
appModules = append(
appModules,
wasm.NewAppModule(app.appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
uibcmodule.NewAppModule(appCodec, app.uibcQuotaKeeper),
)
}

app.mm = module.NewManager(appModules...)
Expand All @@ -626,6 +673,7 @@ func New(
gravitytypes.ModuleName,
bech32ibctypes.ModuleName,
}

endBlockers := []string{
crisistypes.ModuleName,
oracletypes.ModuleName, // must be before gov and staking
Expand Down Expand Up @@ -661,6 +709,7 @@ func New(
gravitytypes.ModuleName,
bech32ibctypes.ModuleName,
}

orderMigrations := []string{
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName,
stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName,
Expand All @@ -676,10 +725,10 @@ func New(
}

if Experimental {
beginBlockers = append(beginBlockers, wasm.ModuleName)
endBlockers = append(endBlockers, wasm.ModuleName)
initGenesis = append(initGenesis, wasm.ModuleName)
orderMigrations = append(orderMigrations, wasm.ModuleName)
beginBlockers = append(beginBlockers, wasm.ModuleName, uibc.ModuleName)
endBlockers = append(endBlockers, wasm.ModuleName, uibc.ModuleName)
initGenesis = append(initGenesis, wasm.ModuleName, uibc.ModuleName)
orderMigrations = append(orderMigrations, wasm.ModuleName, uibc.ModuleName)
}

app.mm.SetOrderBeginBlockers(beginBlockers...)
Expand All @@ -704,8 +753,10 @@ func New(
authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
}

simStateModules := genmap.Pick(app.mm.Modules,
[]string{stakingtypes.ModuleName, authtypes.ModuleName, oracletypes.ModuleName})
simStateModules := genmap.Pick(
app.mm.Modules,
[]string{stakingtypes.ModuleName, authtypes.ModuleName, oracletypes.ModuleName},
)
// TODO: Ensure x/leverage implements simulator and add it here:
simTestModules := genmap.Pick(simStateModules, []string{oracletypes.ModuleName})

Expand Down
17 changes: 17 additions & 0 deletions proto/umee/uibc/v1/events.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";
package umee.uibc.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/umee-network/umee/v4/x/uibc";
option (gogoproto.goproto_getters_all) = false;

// EventBadRevert is emitted on failure of ibc-transfer quota.
message EventBadRevert {
// module name
string module = 1;
// failure event type
string failure_type = 2;
// ibc packet data
string packet = 3;
}
29 changes: 29 additions & 0 deletions proto/umee/uibc/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
syntax = "proto3";
package umee.uibc.v1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";
import "umee/uibc/v1/quota.proto";

option go_package = "github.com/umee-network/umee/v4/x/uibc";
option (gogoproto.goproto_getters_all) = false;

// GenesisState defines the uibc module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated Quota quotas = 2 [(gogoproto.nullable) = false];
// total_outflow_sum defines the total outflow sum of ibc-transfer in USD
string total_outflow_sum = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// quota_expires defines quota expires for ibc-transfer denom in seconds
google.protobuf.Timestamp quota_expires = 4 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true,
(gogoproto.jsontag) = "quota_duration,omitempty",
(gogoproto.moretags) = "yaml:\"quota_expires\""
];
}
44 changes: 44 additions & 0 deletions proto/umee/uibc/v1/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
syntax = "proto3";
package umee.uibc.v1;

import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "umee/uibc/v1/quota.proto";

option go_package = "github.com/umee-network/umee/v4/x/uibc";

option (gogoproto.goproto_getters_all) = false;

// Query defines the gRPC querier service.
service Query {
// Params queries the parameters of the x/uibc module.
rpc Params(QueryParams) returns (QueryParamsResponse) {
option (google.api.http).get = "/umee/uibc/v1/params";
}

// Quota queries the rate limits of ibc denoms.
gsk967 marked this conversation as resolved.
Show resolved Hide resolved
// If denom is empty, returns quota for all tokens.
rpc Quota(QueryQuota) returns (QueryQuotaResponse) {
option (google.api.http).get = "/umee/uibc/v1/quota/{denom}";
}
}

// QueryParams defines the request structure for the Params gRPC service
// handler.
message QueryParams {}

// QueryParamsResponse defines the response structure for the Params gRPC
// service handler.
message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}

// QueryQuota defines request type for query the quota of denoms
message QueryQuota {
string denom = 1;
}

// QueryQuotaResponse defines response type of Query/Quota
message QueryQuotaResponse {
repeated Quota quota = 1 [(gogoproto.nullable) = false];
}
57 changes: 57 additions & 0 deletions proto/umee/uibc/v1/quota.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
syntax = "proto3";
package umee.uibc.v1;

import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/umee-network/umee/v4/x/uibc";

// Quota stores current sum of IBC outflow transfers of IBC Denom.
message Quota {
// ibc_denom defines the ibc denom
string ibc_denom = 1;
// outflow_sum defines the sum of USD value of outflow tokens through ibc-transfer
string outflow_sum = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
gsk967 marked this conversation as resolved.
Show resolved Hide resolved
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

// Params of x/uibc module
message Params {
// ibc_status defines the wethever ibc-transfer enabled, disbaled or paused
IBCTransferStatus ibc_pause = 1;
// total_quota defines the total outflow limit of ibc-transfer in USD
string total_quota = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// token_quota defines the outflow limit per token in USD
string token_quota = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// quota_duration defines quota expires for each ibc-transfer denom in seconds
google.protobuf.Duration quota_duration = 4 [
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.jsontag) = "quota_duration,omitempty",
(gogoproto.moretags) = "yaml:\"quota_duration\""
];
}

// IBCTransferStatus status of ibc-transfer
enum IBCTransferStatus {
// UNSPECIFIED defines a no-op status.
IBC_TRANSFER_STATUS_UNSPECIFIED = 0;
// DISABLED defines the quota checking diabled for ibc-transfer.
IBC_TRANSFER_STATUS_DISABLED = 1;
// ENABLED defines the enable quota checking for ibc-transfer.
IBC_TRANSFER_STATUS_ENABLED = 2;
// PAUSED defines pause the ibc-transfer from app.
IBC_TRANSFER_STATUS_PAUSED = 3;
}
Loading