-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,136 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
indexer/packages/v4-protos/src/codegen/dydxprotocol/ibcratelimit/capacity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { DeepPartial } from "../../helpers"; | ||
/** DenomCapacity stores a list of rate limit capacity for a denom. */ | ||
|
||
export interface DenomCapacity { | ||
/** | ||
* denom is the denomination of the token being rate limited. | ||
* e.g. ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5 | ||
*/ | ||
denom: string; | ||
/** | ||
* capacity_list is a list of capacity amount tracked for each `Limiter` | ||
* on the denom. This list has a 1:1 mapping to `limiter` list under | ||
* `LimitParams`. | ||
*/ | ||
|
||
capacityList: Uint8Array[]; | ||
} | ||
/** DenomCapacity stores a list of rate limit capacity for a denom. */ | ||
|
||
export interface DenomCapacitySDKType { | ||
/** | ||
* denom is the denomination of the token being rate limited. | ||
* e.g. ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5 | ||
*/ | ||
denom: string; | ||
/** | ||
* capacity_list is a list of capacity amount tracked for each `Limiter` | ||
* on the denom. This list has a 1:1 mapping to `limiter` list under | ||
* `LimitParams`. | ||
*/ | ||
|
||
capacity_list: Uint8Array[]; | ||
} | ||
|
||
function createBaseDenomCapacity(): DenomCapacity { | ||
return { | ||
denom: "", | ||
capacityList: [] | ||
}; | ||
} | ||
|
||
export const DenomCapacity = { | ||
encode(message: DenomCapacity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.denom !== "") { | ||
writer.uint32(10).string(message.denom); | ||
} | ||
|
||
for (const v of message.capacityList) { | ||
writer.uint32(18).bytes(v!); | ||
} | ||
|
||
return writer; | ||
}, | ||
|
||
decode(input: _m0.Reader | Uint8Array, length?: number): DenomCapacity { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseDenomCapacity(); | ||
|
||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
|
||
switch (tag >>> 3) { | ||
case 1: | ||
message.denom = reader.string(); | ||
break; | ||
|
||
case 2: | ||
message.capacityList.push(reader.bytes()); | ||
break; | ||
|
||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
|
||
return message; | ||
}, | ||
|
||
fromPartial(object: DeepPartial<DenomCapacity>): DenomCapacity { | ||
const message = createBaseDenomCapacity(); | ||
message.denom = object.denom ?? ""; | ||
message.capacityList = object.capacityList?.map(e => e) || []; | ||
return message; | ||
} | ||
|
||
}; |
Oops, something went wrong.