x/feegrant remove height base expiration (#9206)
* remove height from proto files * remove PrepareForExport * fix basic fee * fix periodic fee * fix errors * fix error * fix errors * add tests * review changes * fix errors * fix tests * fix lint error * Update x/feegrant/types/basic_fee.go Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com> * fix errors * fix keeper tests * Update x/feegrant/keeper/keeper_test.go Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> * review changes * review changes * fix tests * run make proto-gen * fix errors * Update x/feegrant/keeper/keeper_test.go Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> * Update x/feegrant/keeper/keeper_test.go * update ADR * add test * review changes * review changes Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com> Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
technicallyty
Marie Gauthier
atheeshp
mergify[bot]
parent
68d461052b
commit
1e1c812de2
+3
-39
@@ -309,8 +309,6 @@
|
||||
- [cosmos/feegrant/v1beta1/feegrant.proto](#cosmos/feegrant/v1beta1/feegrant.proto)
|
||||
- [AllowedMsgAllowance](#cosmos.feegrant.v1beta1.AllowedMsgAllowance)
|
||||
- [BasicAllowance](#cosmos.feegrant.v1beta1.BasicAllowance)
|
||||
- [Duration](#cosmos.feegrant.v1beta1.Duration)
|
||||
- [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt)
|
||||
- [Grant](#cosmos.feegrant.v1beta1.Grant)
|
||||
- [PeriodicAllowance](#cosmos.feegrant.v1beta1.PeriodicAllowance)
|
||||
|
||||
@@ -4571,41 +4569,7 @@ that optionally expires. The grantee can use up to SpendLimit to cover fees.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | spend_limit specifies the maximum amount of tokens that can be spent by this allowance and will be updated as tokens are spent. If it is empty, there is no spend limit and any amount of coins can be spent. |
|
||||
| `expiration` | [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt) | | expiration specifies an optional time when this allowance expires |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="cosmos.feegrant.v1beta1.Duration"></a>
|
||||
|
||||
### Duration
|
||||
Duration is a span of a clock time or number of blocks.
|
||||
This is designed to be added to an ExpiresAt struct.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| `duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | |
|
||||
| `blocks` | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="cosmos.feegrant.v1beta1.ExpiresAt"></a>
|
||||
|
||||
### ExpiresAt
|
||||
ExpiresAt is a point in time where something expires.
|
||||
It may be *either* block time or block height
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | |
|
||||
| `height` | [int64](#int64) | | |
|
||||
| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | expiration specifies an optional time when this allowance expires |
|
||||
|
||||
|
||||
|
||||
@@ -4639,10 +4603,10 @@ as well as a limit per time period.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| `basic` | [BasicAllowance](#cosmos.feegrant.v1beta1.BasicAllowance) | | basic specifies a struct of `BasicAllowance` |
|
||||
| `period` | [Duration](#cosmos.feegrant.v1beta1.Duration) | | period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset |
|
||||
| `period` | [google.protobuf.Duration](#google.protobuf.Duration) | | period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset |
|
||||
| `period_spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_spend_limit specifies the maximum number of coins that can be spent in the period |
|
||||
| `period_can_spend` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_can_spend is the number of coins left to be spent before the period_reset time |
|
||||
| `period_reset` | [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt) | | period_reset is the time at which this period resets and a new one begins, it is calculated from the start time of the first transaction after the last period ended |
|
||||
| `period_reset` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | period_reset is the time at which this period resets and a new one begins, it is calculated from the start time of the first transaction after the last period ended |
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user