forked from subquery/cosmos-subql-starter
-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
4947ffe
commit d7c166f
Showing
3 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Interface} from "../../../types"; | ||
|
||
export class BaseStructure { | ||
static getInterface() { | ||
return Interface.Uncertain; | ||
} | ||
} |
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,28 @@ | ||
import {Interface} from "../../../types"; | ||
import {BaseStructure} from "./base"; | ||
|
||
export class LegacyBridgeSwapStructure extends BaseStructure { | ||
private cap = BigInt(0); | ||
private reverse_aggregated_allowance = BigInt(0); | ||
private reverse_aggregated_allowance_approver_cap = BigInt(0); | ||
private lower_swap_limit = BigInt(0); | ||
private upper_swap_limit = BigInt(0); | ||
private swap_fee = BigInt(0); | ||
private paused_since_block = BigInt(0); | ||
private denom = ""; | ||
private next_swap_id = ""; | ||
|
||
static listProperties() { | ||
const a = new LegacyBridgeSwapStructure(); | ||
return Object.getOwnPropertyNames(a); | ||
} | ||
|
||
static getPropertyType(prop: string) { | ||
const a = new LegacyBridgeSwapStructure(); | ||
return typeof (a[prop]); | ||
} | ||
|
||
static getInterface() { | ||
return Interface.LegacyBridgeSwap; | ||
} | ||
} |
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,24 @@ | ||
import {Interface} from "../../../types"; | ||
import {BaseStructure} from "./base"; | ||
|
||
export class CW20Structure extends BaseStructure { | ||
private name = ""; | ||
private symbol = ""; | ||
private decimals = 0; | ||
private initial_balances: [{ amount: bigint, address: string }] = [{amount: BigInt(0), address: ""}]; | ||
private mint: { minter: string } = {minter: ""}; | ||
|
||
static listProperties() { | ||
const a = new CW20Structure(); | ||
return Object.getOwnPropertyNames(a); | ||
} | ||
|
||
static getPropertyType(prop: string) { | ||
const a = new CW20Structure(); | ||
return typeof (a[prop]); | ||
} | ||
|
||
static getInterface() { | ||
return Interface.CW20; | ||
} | ||
} |