Skip to content

Commit

Permalink
v1.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Sep 21, 2023
1 parent 0c767ce commit e4926af
Show file tree
Hide file tree
Showing 196 changed files with 11,522 additions and 1,802 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

```bash
# build code:
cwtools build ../oraiswap/contracts/* -o packages/contracts-build/data
cwtools build ../oraiswap/contracts/* ../oraidex-listing-contract -o packages/contracts-build/data
# gen code:
cwtools gents ../oraiswap/contracts/* -o packages/contracts-sdk/src
cwtools gents ../oraiswap/contracts/* ../oraidex-listing-contract -o packages/contracts-sdk/src
# gen doc:
yarn docs

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

67 changes: 47 additions & 20 deletions docs/classes/OraiswapConverter_client.OraiswapConverterClient.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

61 changes: 44 additions & 17 deletions docs/classes/OraiswapFactory_client.OraiswapFactoryClient.html

Large diffs are not rendered by default.

53 changes: 40 additions & 13 deletions docs/classes/OraiswapFactory_client.OraiswapFactoryQueryClient.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

65 changes: 46 additions & 19 deletions docs/classes/OraiswapOracle_client.OraiswapOracleClient.html

Large diffs are not rendered by default.

53 changes: 40 additions & 13 deletions docs/classes/OraiswapOracle_client.OraiswapOracleQueryClient.html

Large diffs are not rendered by default.

63 changes: 45 additions & 18 deletions docs/classes/OraiswapPair_client.OraiswapPairClient.html

Large diffs are not rendered by default.

55 changes: 41 additions & 14 deletions docs/classes/OraiswapPair_client.OraiswapPairQueryClient.html

Large diffs are not rendered by default.

59 changes: 43 additions & 16 deletions docs/classes/OraiswapRewarder_client.OraiswapRewarderClient.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

61 changes: 44 additions & 17 deletions docs/classes/OraiswapRouter_client.OraiswapRouterClient.html

Large diffs are not rendered by default.

51 changes: 39 additions & 12 deletions docs/classes/OraiswapRouter_client.OraiswapRouterQueryClient.html

Large diffs are not rendered by default.

83 changes: 55 additions & 28 deletions docs/classes/OraiswapStaking_client.OraiswapStakingClient.html

Large diffs are not rendered by default.

57 changes: 42 additions & 15 deletions docs/classes/OraiswapStaking_client.OraiswapStakingQueryClient.html

Large diffs are not rendered by default.

93 changes: 60 additions & 33 deletions docs/classes/OraiswapToken_client.OraiswapTokenClient.html

Large diffs are not rendered by default.

65 changes: 46 additions & 19 deletions docs/classes/OraiswapToken_client.OraiswapTokenQueryClient.html

Large diffs are not rendered by default.

39 changes: 33 additions & 6 deletions docs/classes/index.CosmWasmClient.html

Large diffs are not rendered by default.

39 changes: 33 additions & 6 deletions docs/classes/index.SigningCosmWasmClient.html

Large diffs are not rendered by default.

43 changes: 36 additions & 7 deletions docs/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

390 changes: 390 additions & 0 deletions docs/interfaces/OraidexListingContract_types.Config.html

Large diffs are not rendered by default.

383 changes: 383 additions & 0 deletions docs/interfaces/OraidexListingContract_types.InstantiateMsg.html

Large diffs are not rendered by default.

404 changes: 404 additions & 0 deletions docs/interfaces/OraidexListingContract_types.ListTokenMsg.html

Large diffs are not rendered by default.

355 changes: 355 additions & 0 deletions docs/interfaces/OraidexListingContract_types.MigrateMsg.html

Large diffs are not rendered by default.

383 changes: 383 additions & 0 deletions docs/interfaces/OraidexListingContract_types.MinterResponse.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapConverter_types.ConfigResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapConverter_types.ConvertInfoResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapConverter_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapConverter_types.MigrateMsg.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapConverter_types.TokenInfo.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapConverter_types.TokenRatio.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapFactory_types.ConfigResponse.html

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapFactory_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapFactory_types.MigrateMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapFactory_types.PairsResponse.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapLimitOrder_types.ContractInfoResponse.html

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapLimitOrder_types.InstantiateMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapLimitOrder_types.LastOrderIdResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapLimitOrder_types.MigrateMsg.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapLimitOrder_types.OrderBookResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapLimitOrder_types.OrderBooksResponse.html

Large diffs are not rendered by default.

55 changes: 41 additions & 14 deletions docs/interfaces/OraiswapLimitOrder_types.OrderResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapLimitOrder_types.OrdersResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapLimitOrder_types.TickResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapLimitOrder_types.TicksResponse.html

Large diffs are not rendered by default.

61 changes: 44 additions & 17 deletions docs/interfaces/OraiswapOracle_client.OraiswapOracleInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapOracle_types.Coin.html

Large diffs are not rendered by default.

53 changes: 40 additions & 13 deletions docs/interfaces/OraiswapOracle_types.ContractInfoResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapOracle_types.ExchangeRateItem.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapOracle_types.ExchangeRateResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapOracle_types.ExchangeRatesResponse.html

Large diffs are not rendered by default.

51 changes: 39 additions & 12 deletions docs/interfaces/OraiswapOracle_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapOracle_types.MigrateMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapOracle_types.TaxCapResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapOracle_types.TaxRateResponse.html

Large diffs are not rendered by default.

59 changes: 43 additions & 16 deletions docs/interfaces/OraiswapPair_client.OraiswapPairInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapPair_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapPair_types.MigrateMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapPair_types.PairResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapPair_types.PoolResponse.html

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapPair_types.ReverseSimulationResponse.html

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapPair_types.SimulationResponse.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapRewarder_types.ConfigResponse.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapRewarder_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapRewarder_types.MigrateMsg.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

57 changes: 42 additions & 15 deletions docs/interfaces/OraiswapRouter_client.OraiswapRouterInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapRouter_types.ConfigResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapRouter_types.InstantiateMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/interfaces/OraiswapRouter_types.MigrateMsg.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

51 changes: 39 additions & 12 deletions docs/interfaces/OraiswapStaking_types.ConfigResponse.html

Large diffs are not rendered by default.

53 changes: 40 additions & 13 deletions docs/interfaces/OraiswapStaking_types.InstantiateMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapStaking_types.MigrateMsg.html

Large diffs are not rendered by default.

55 changes: 41 additions & 14 deletions docs/interfaces/OraiswapStaking_types.PoolInfoResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapStaking_types.RewardInfoResponse.html

Large diffs are not rendered by default.

51 changes: 39 additions & 12 deletions docs/interfaces/OraiswapStaking_types.RewardInfoResponseItem.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapStaking_types.RewardsPerSecResponse.html

Large diffs are not rendered by default.

89 changes: 58 additions & 31 deletions docs/interfaces/OraiswapToken_client.OraiswapTokenInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapToken_types.AllAccountsResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapToken_types.AllAllowancesResponse.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapToken_types.AllowanceInfo.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapToken_types.AllowanceResponse.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/interfaces/OraiswapToken_types.BalanceResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapToken_types.Cw20Coin.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapToken_types.DownloadLogoResponse.html

Large diffs are not rendered by default.

55 changes: 41 additions & 14 deletions docs/interfaces/OraiswapToken_types.InstantiateMsg.html

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapToken_types.MarketingInfoResponse.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/OraiswapToken_types.MinterResponse.html

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/OraiswapToken_types.SpenderAllowanceInfo.html

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions docs/interfaces/OraiswapToken_types.TokenInfoResponse.html

Large diffs are not rendered by default.

39 changes: 33 additions & 6 deletions docs/interfaces/index.ExecuteResult.html

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions docs/interfaces/types.Asset.html

Large diffs are not rendered by default.

47 changes: 37 additions & 10 deletions docs/interfaces/types.Cw20ReceiveMsg.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

51 changes: 39 additions & 12 deletions docs/interfaces/types.PairInfo.html

Large diffs are not rendered by default.

363 changes: 363 additions & 0 deletions docs/modules/OraidexListingContract_client.html

Large diffs are not rendered by default.

366 changes: 366 additions & 0 deletions docs/modules/OraidexListingContract_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapConverter_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapConverter_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapFactory_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapFactory_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapLimitOrder_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapLimitOrder_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapOracle_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapOracle_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapPair_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapPair_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapRewarder_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapRewarder_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapRouter_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapRouter_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapStaking_client.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapStaking_types.html

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions docs/modules/OraiswapToken_client.html

Large diffs are not rendered by default.

42 changes: 33 additions & 9 deletions docs/modules/OraiswapToken_types.html

Large diffs are not rendered by default.

69 changes: 64 additions & 5 deletions docs/modules/index.html

Large diffs are not rendered by default.

40 changes: 35 additions & 5 deletions docs/modules/types.html

Large diffs are not rendered by default.

357 changes: 357 additions & 0 deletions docs/types/OraidexListingContract_types.ExecuteMsg.html

Large diffs are not rendered by default.

358 changes: 358 additions & 0 deletions docs/types/OraidexListingContract_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapConverter_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapConverter_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapFactory_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapFactory_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapLimitOrder_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapLimitOrder_types.OrderDirection.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapLimitOrder_types.OrderFilter.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapLimitOrder_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.ContractResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.ExchangeResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.OracleContractQuery.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.OracleExchangeQuery.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.OracleTreasuryQuery.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapOracle_types.TreasuryResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapPair_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapPair_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapRewarder_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapRewarder_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapRouter_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapRouter_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapRouter_types.SwapOperation.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapStaking_types.ArrayOfRewardInfoResponse.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapStaking_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapStaking_types.QueryMsg.html

Large diffs are not rendered by default.

43 changes: 35 additions & 8 deletions docs/types/OraiswapToken_types.ExecuteMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapToken_types.Expiration.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapToken_types.LogoInfo.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapToken_types.QueryMsg.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapToken_types.Timestamp.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/OraiswapToken_types.Uint64.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/types.Addr.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/types.AssetInfo.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/types.Binary.html

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/types.Decimal.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

41 changes: 34 additions & 7 deletions docs/types/types.Uint128.html

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 1 addition & 1 deletion packages/contracts-build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-contracts-build",
"version": "1.0.17",
"version": "1.0.18",
"main": "build/index.js",
"license": "MIT",
"files": [
Expand Down
47 changes: 26 additions & 21 deletions packages/contracts-build/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
import { OraiswapTokenTypes, OraiswapRouterTypes, OraiswapStakingTypes, OraiswapLimitOrderTypes, OraiswapOracleTypes, OraiswapFactoryTypes, OraiswapRewarderTypes, OraiswapPairTypes } from '@oraichain/oraidex-contracts-sdk';
import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate';
import { readFileSync } from 'fs';
import path from 'path';
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { readFileSync } from "fs";
import path from "path";

export type ContractName = 'oraiswap_token' | 'oraiswap_limit_order' | 'oraiswap_pair' | 'oraiswap_oracle' | 'oraiswap_converter' | 'oraiswap_factory' | 'oraiswap_rewarder' | 'oraiswap_router' | 'oraiswap_staking';
export type ContractName =
| "oraiswap_token"
| "oraiswap_limit_order"
| "oraiswap_pair"
| "oraiswap_oracle"
| "oraiswap_converter"
| "oraiswap_factory"
| "oraiswap_rewarder"
| "oraiswap_router"
| "oraiswap_staking"
| "oraidex-listing-contract";

export type InstantiateMsg =
| OraiswapTokenTypes.InstantiateMsg
| OraiswapLimitOrderTypes.InstantiateMsg
| OraiswapPairTypes.InstantiateMsg
| OraiswapOracleTypes.InstantiateMsg
| OraiswapFactoryTypes.InstantiateMsg
| OraiswapRewarderTypes.InstantiateMsg
| OraiswapRouterTypes.InstantiateMsg
| OraiswapStakingTypes.InstantiateMsg;
const contractDir = path.join(path.dirname(module.filename), "..", "data");

const contractDir = path.join(path.dirname(module.filename), '..', 'data');

export const getContractDir = (name: ContractName = 'oraiswap_limit_order') => {
return path.join(contractDir, name + '.wasm');
export const getContractDir = (name: ContractName = "oraiswap_limit_order") => {
return path.join(contractDir, name + ".wasm");
};

export const deployContract = async (client: SigningCosmWasmClient, senderAddress: string, msg?: InstantiateMsg, label?: string, contractName?: ContractName) => {
export const deployContract = async <T>(
client: SigningCosmWasmClient,
senderAddress: string,
msg?: T,
label?: string,
contractName?: ContractName
) => {
// upload and instantiate the contract
const wasmBytecode = readFileSync(getContractDir(contractName));
const uploadRes = await client.upload(senderAddress, wasmBytecode, 'auto');
const initRes = await client.instantiate(senderAddress, uploadRes.codeId, msg ?? {}, label ?? contractName, 'auto');
const uploadRes = await client.upload(senderAddress, wasmBytecode, "auto");
const initRes = await client.instantiate(senderAddress, uploadRes.codeId, msg ?? {}, label ?? contractName, "auto");
return { ...uploadRes, ...initRes };
};
84 changes: 84 additions & 0 deletions packages/contracts-sdk/src/OraidexListingContract.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* This file was automatically generated by @oraichain/ts-codegen@0.35.8.
* 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 {Uint128, AssetInfo, Addr, Logo, EmbeddedLogo, Binary, Asset, InstantiateMarketingInfo} from "./types";
import {InstantiateMsg, ExecuteMsg, ListTokenMsg, MinterResponse, QueryMsg, MigrateMsg, Config} from "./OraidexListingContract.types";
export interface OraidexListingContractReadOnlyInterface {
contractAddress: string;
config: () => Promise<Config>;
}
export class OraidexListingContractQueryClient implements OraidexListingContractReadOnlyInterface {
client: CosmWasmClient;
contractAddress: string;

constructor(client: CosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
this.config = this.config.bind(this);
}

config = async (): Promise<Config> => {
return this.client.queryContractSmart(this.contractAddress, {
config: {}
});
};
}
export interface OraidexListingContractInterface extends OraidexListingContractReadOnlyInterface {
contractAddress: string;
sender: string;
listToken: ({
label,
liquidityPoolRewardAssets,
marketing,
mint,
symbol
}: {
label?: string;
liquidityPoolRewardAssets: Asset[];
marketing?: InstantiateMarketingInfo;
mint?: MinterResponse;
symbol: string;
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
}
export class OraidexListingContractClient extends OraidexListingContractQueryClient implements OraidexListingContractInterface {
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.listToken = this.listToken.bind(this);
}

listToken = async ({
label,
liquidityPoolRewardAssets,
marketing,
mint,
symbol
}: {
label?: string;
liquidityPoolRewardAssets: Asset[];
marketing?: InstantiateMarketingInfo;
mint?: MinterResponse;
symbol: string;
}, _fee: number | StdFee | "auto" = "auto", _memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
list_token: {
label,
liquidity_pool_reward_assets: liquidityPoolRewardAssets,
marketing,
mint,
symbol
}
}, _fee, _memo, _funds);
};
}
28 changes: 28 additions & 0 deletions packages/contracts-sdk/src/OraidexListingContract.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {Uint128, AssetInfo, Addr, Logo, EmbeddedLogo, Binary, Asset, InstantiateMarketingInfo} from "./types";
export interface InstantiateMsg {
cw20_code_id: number;
factory_addr: string;
}
export type ExecuteMsg = {
list_token: ListTokenMsg;
};
export interface ListTokenMsg {
label?: string | null;
liquidity_pool_reward_assets: Asset[];
marketing?: InstantiateMarketingInfo | null;
mint?: MinterResponse | null;
symbol: string;
}
export interface MinterResponse {
cap?: Uint128 | null;
minter: string;
}
export type QueryMsg = {
config: {};
};
export interface MigrateMsg {}
export interface Config {
cw20_code_id: number;
factory_addr: Addr;
owner: Addr;
}
29 changes: 1 addition & 28 deletions packages/contracts-sdk/src/OraiswapFactory.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { Coin, StdFee } from "@cosmjs/amino";
import {Addr, AssetInfo, Binary, PairInfo} from "./types";
import {Addr, AssetInfo, PairInfo} from "./types";
import {InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg, ConfigResponse, PairsResponse} from "./OraiswapFactory.types";
export interface OraiswapFactoryReadOnlyInterface {
contractAddress: string;
Expand Down Expand Up @@ -91,15 +91,6 @@ export interface OraiswapFactoryInterface extends OraiswapFactoryReadOnlyInterfa
}: {
pairInfo: PairInfo;
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
migrateContract: ({
contractAddr,
msg,
newCodeId
}: {
contractAddr: string;
msg: Binary;
newCodeId: number;
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
}
export class OraiswapFactoryClient extends OraiswapFactoryQueryClient implements OraiswapFactoryInterface {
client: SigningCosmWasmClient;
Expand All @@ -114,7 +105,6 @@ export class OraiswapFactoryClient extends OraiswapFactoryQueryClient implements
this.updateConfig = this.updateConfig.bind(this);
this.createPair = this.createPair.bind(this);
this.addPair = this.addPair.bind(this);
this.migrateContract = this.migrateContract.bind(this);
}

updateConfig = async ({
Expand Down Expand Up @@ -159,21 +149,4 @@ export class OraiswapFactoryClient extends OraiswapFactoryQueryClient implements
}
}, _fee, _memo, _funds);
};
migrateContract = async ({
contractAddr,
msg,
newCodeId
}: {
contractAddr: string;
msg: Binary;
newCodeId: number;
}, _fee: number | StdFee | "auto" = "auto", _memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
migrate_contract: {
contract_addr: contractAddr,
msg,
new_code_id: newCodeId
}
}, _fee, _memo, _funds);
};
}
8 changes: 1 addition & 7 deletions packages/contracts-sdk/src/OraiswapFactory.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Addr, AssetInfo, Binary, PairInfo} from "./types";
import {Addr, AssetInfo, PairInfo} from "./types";
export interface InstantiateMsg {
commission_rate?: string | null;
oracle_addr: Addr;
Expand All @@ -20,12 +20,6 @@ export type ExecuteMsg = {
add_pair: {
pair_info: PairInfo;
};
} | {
migrate_contract: {
contract_addr: string;
msg: Binary;
new_code_id: number;
};
};
export type QueryMsg = {
config: {};
Expand Down
29 changes: 1 addition & 28 deletions packages/contracts-sdk/src/OraiswapLimitOrder.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { Coin, StdFee } from "@cosmjs/amino";
import {Addr, Uint128, Binary, AssetInfo, Decimal, Cw20ReceiveMsg, Asset} from "./types";
import {InstantiateMsg, ExecuteMsg, OrderDirection, QueryMsg, OrderFilter, OrderStatus, MigrateMsg, ContractInfoResponse, LastOrderIdResponse, OrderResponse, OrderBookResponse, OrderBookMatchableResponse, OrderBooksResponse, OrdersResponse, TickResponse, TicksResponse} from "./OraiswapLimitOrder.types";
import {InstantiateMsg, ExecuteMsg, OrderDirection, QueryMsg, OrderFilter, MigrateMsg, ContractInfoResponse, LastOrderIdResponse, OrderResponse, OrderBookResponse, OrderBookMatchableResponse, OrderBooksResponse, OrdersResponse, TickResponse, TicksResponse} from "./OraiswapLimitOrder.types";
export interface OraiswapLimitOrderReadOnlyInterface {
contractAddress: string;
contractInfo: () => Promise<ContractInfoResponse>;
Expand Down Expand Up @@ -59,14 +59,12 @@ export interface OraiswapLimitOrderReadOnlyInterface {
ticks: ({
assetInfos,
direction,
end,
limit,
orderBy,
startAfter
}: {
assetInfos: AssetInfo[];
direction: OrderDirection;
end?: Decimal;
limit?: number;
orderBy?: number;
startAfter?: Decimal;
Expand Down Expand Up @@ -189,14 +187,12 @@ export class OraiswapLimitOrderQueryClient implements OraiswapLimitOrderReadOnly
ticks = async ({
assetInfos,
direction,
end,
limit,
orderBy,
startAfter
}: {
assetInfos: AssetInfo[];
direction: OrderDirection;
end?: Decimal;
limit?: number;
orderBy?: number;
startAfter?: Decimal;
Expand All @@ -205,7 +201,6 @@ export class OraiswapLimitOrderQueryClient implements OraiswapLimitOrderReadOnly
ticks: {
asset_infos: assetInfos,
direction,
end,
limit,
order_by: orderBy,
start_after: startAfter
Expand Down Expand Up @@ -246,13 +241,6 @@ export interface OraiswapLimitOrderInterface extends OraiswapLimitOrderReadOnlyI
}: {
admin: Addr;
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
updateConfig: ({
commissionRate,
rewardAddress
}: {
commissionRate?: string;
rewardAddress?: Addr;
}, _fee?: number | StdFee | "auto", _memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
createOrderBookPair: ({
baseCoinInfo,
minQuoteCoinAmount,
Expand Down Expand Up @@ -303,7 +291,6 @@ export class OraiswapLimitOrderClient extends OraiswapLimitOrderQueryClient impl
this.contractAddress = contractAddress;
this.receive = this.receive.bind(this);
this.updateAdmin = this.updateAdmin.bind(this);
this.updateConfig = this.updateConfig.bind(this);
this.createOrderBookPair = this.createOrderBookPair.bind(this);
this.submitOrder = this.submitOrder.bind(this);
this.cancelOrder = this.cancelOrder.bind(this);
Expand Down Expand Up @@ -339,20 +326,6 @@ export class OraiswapLimitOrderClient extends OraiswapLimitOrderQueryClient impl
}
}, _fee, _memo, _funds);
};
updateConfig = async ({
commissionRate,
rewardAddress
}: {
commissionRate?: string;
rewardAddress?: Addr;
}, _fee: number | StdFee | "auto" = "auto", _memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
update_config: {
commission_rate: commissionRate,
reward_address: rewardAddress
}
}, _fee, _memo, _funds);
};
createOrderBookPair = async ({
baseCoinInfo,
minQuoteCoinAmount,
Expand Down
Loading

0 comments on commit e4926af

Please sign in to comment.