-
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.
Merge pull request #333 from oraichain/feat/zapper-2
Feat/zapper 2
- Loading branch information
Showing
23 changed files
with
1,525 additions
and
525 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
90 changes: 90 additions & 0 deletions
90
packages/contracts-sdk/src/IncentivesFundManager.client.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,90 @@ | ||
/** | ||
* This file was automatically generated by @oraichain/[email protected]. | ||
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | ||
* and run the @oraichain/ts-codegen generate command to regenerate this file. | ||
*/ | ||
|
||
import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate"; | ||
import { Coin, StdFee } from "@cosmjs/amino"; | ||
import {Addr, InstantiateMsg, ExecuteMsg, Uint128, AssetInfo, Asset, QueryMsg, MigrateMsg, ConfigResponse} from "./IncentivesFundManager.types"; | ||
export interface IncentivesFundManagerReadOnlyInterface { | ||
contractAddress: string; | ||
config: () => Promise<ConfigResponse>; | ||
} | ||
export class IncentivesFundManagerQueryClient implements IncentivesFundManagerReadOnlyInterface { | ||
client: CosmWasmClient; | ||
contractAddress: string; | ||
|
||
constructor(client: CosmWasmClient, contractAddress: string) { | ||
this.client = client; | ||
this.contractAddress = contractAddress; | ||
this.config = this.config.bind(this); | ||
} | ||
|
||
config = async (): Promise<ConfigResponse> => { | ||
return this.client.queryContractSmart(this.contractAddress, { | ||
config: {} | ||
}); | ||
}; | ||
} | ||
export interface IncentivesFundManagerInterface extends IncentivesFundManagerReadOnlyInterface { | ||
contractAddress: string; | ||
sender: string; | ||
updateConfig: ({ | ||
oraiswapV3, | ||
owner | ||
}: { | ||
oraiswapV3?: Addr; | ||
owner?: Addr; | ||
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>; | ||
sendFund: ({ | ||
asset, | ||
receiver | ||
}: { | ||
asset: Asset; | ||
receiver: Addr; | ||
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>; | ||
} | ||
export class IncentivesFundManagerClient extends IncentivesFundManagerQueryClient implements IncentivesFundManagerInterface { | ||
client: SigningCosmWasmClient; | ||
sender: string; | ||
contractAddress: string; | ||
|
||
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) { | ||
super(client, contractAddress); | ||
this.client = client; | ||
this.sender = sender; | ||
this.contractAddress = contractAddress; | ||
this.updateConfig = this.updateConfig.bind(this); | ||
this.sendFund = this.sendFund.bind(this); | ||
} | ||
|
||
updateConfig = async ({ | ||
oraiswapV3, | ||
owner | ||
}: { | ||
oraiswapV3?: Addr; | ||
owner?: Addr; | ||
}, _fee: number | StdFee | "auto" = "auto", _memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => { | ||
return await this.client.execute(this.sender, this.contractAddress, { | ||
update_config: { | ||
oraiswap_v3: oraiswapV3, | ||
owner | ||
} | ||
}, _fee, _memo, _funds); | ||
}; | ||
sendFund = async ({ | ||
asset, | ||
receiver | ||
}: { | ||
asset: Asset; | ||
receiver: Addr; | ||
}, _fee: number | StdFee | "auto" = "auto", _memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => { | ||
return await this.client.execute(this.sender, this.contractAddress, { | ||
send_fund: { | ||
asset, | ||
receiver | ||
} | ||
}, _fee, _memo, _funds); | ||
}; | ||
} |
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,38 @@ | ||
export type Addr = string; | ||
export interface InstantiateMsg { | ||
oraiswap_v3: Addr; | ||
owner?: Addr | null; | ||
} | ||
export type ExecuteMsg = { | ||
update_config: { | ||
oraiswap_v3?: Addr | null; | ||
owner?: Addr | null; | ||
}; | ||
} | { | ||
send_fund: { | ||
asset: Asset; | ||
receiver: Addr; | ||
}; | ||
}; | ||
export type Uint128 = string; | ||
export type AssetInfo = { | ||
token: { | ||
contract_addr: Addr; | ||
}; | ||
} | { | ||
native_token: { | ||
denom: string; | ||
}; | ||
}; | ||
export interface Asset { | ||
amount: Uint128; | ||
info: AssetInfo; | ||
} | ||
export type QueryMsg = { | ||
config: {}; | ||
}; | ||
export interface MigrateMsg {} | ||
export interface ConfigResponse { | ||
oraiswap_v3: Addr; | ||
owner: Addr; | ||
} |
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
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
Oops, something went wrong.