From cc97976c3d066f2191570f3f9be354e4ac8364d0 Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Tue, 5 Nov 2024 10:43:33 +0800 Subject: [PATCH] injective demo with interchain-ui, interchainjs and interchain-kit --- examples/injective/.babelrc | 3 - examples/injective/.eslintrc.json | 3 - examples/injective/.gitignore | 3 + examples/injective/.yarnrc.yml | 1 - examples/injective/CHANGELOG.md | 356 - examples/injective/README.md | 8 +- examples/injective/api/apr.ts | 19 - examples/injective/api/fees.ts | 18 - examples/injective/api/index.ts | 5 - examples/injective/api/prices.ts | 15 - examples/injective/api/rewards.ts | 23 - examples/injective/api/tokens.ts | 25 - examples/injective/components/Main.tsx | 23 + examples/injective/components/SendMsg.tsx | 105 + examples/injective/components/card.tsx | 115 - .../injective/components/common/Footer.tsx | 141 + .../injective/components/common/Header.tsx | 72 + .../injective/components/common/Layout.tsx | 20 + examples/injective/components/common/index.ts | 3 + examples/injective/components/features.tsx | 79 - examples/injective/components/index.tsx | 7 +- .../components/react/address-card.tsx | 201 - .../injective/components/react/chain-card.tsx | 39 - .../components/react/chain-dropdown.tsx | 277 - .../components/react/choose-chain.tsx | 33 - .../components/react/handleChangeColor.tsx | 9 - examples/injective/components/react/index.ts | 12 - .../react/liquidity/add-liquidity-modal.tsx | 284 - .../react/liquidity/bond-shares-modal.tsx | 230 - .../components/react/liquidity/hooks.tsx | 30 - .../components/react/liquidity/index.ts | 1 - .../react/liquidity/modal-components.tsx | 326 - .../components/react/liquidity/pool-card.tsx | 170 - .../react/liquidity/pool-detail-modal.tsx | 427 - .../components/react/liquidity/pool-list.tsx | 489 - .../react/liquidity/pools-overview.tsx | 194 - .../react/liquidity/provide-liquidity.tsx | 508 - .../liquidity/remove-liquidity-modal.tsx | 268 - .../react/liquidity/token-input.tsx | 282 - .../components/react/liquidity/types.tsx | 81 - .../components/react/proposal-card.tsx | 208 - .../components/react/proposal-modal.tsx | 652 - .../components/react/send-tokens-card.tsx | 171 - .../injective/components/react/user-card.tsx | 33 - examples/injective/components/react/vote.tsx | 229 - .../components/react/wallet-connect.tsx | 197 - .../injective/components/react/warn-block.tsx | 91 - examples/injective/components/types.tsx | 98 - .../injective/components/wallet-multi.tsx | 78 - examples/injective/components/wallet.tsx | 183 - .../astronaut.tsx => wallet/Astronaut.tsx} | 0 .../injective/components/wallet/Chain.tsx | 43 + .../injective/components/wallet/Connect.tsx | 76 + examples/injective/components/wallet/User.tsx | 19 + .../injective/components/wallet/Wallet.tsx | 62 + .../injective/components/wallet/Warning.tsx | 32 + examples/injective/components/wallet/index.ts | 1 + examples/injective/config/defaults.ts | 22 +- examples/injective/config/features.ts | 47 - examples/injective/config/index.ts | 4 +- .../injective/config/liquidity/defaults.ts | 41 - .../injective/config/liquidity/features.ts | 47 - examples/injective/config/liquidity/index.ts | 3 - examples/injective/config/liquidity/theme.ts | 34 - examples/injective/config/projects.ts | 56 + examples/injective/config/theme.ts | 34 - examples/injective/hooks/index.ts | 22 +- examples/injective/hooks/useBalance.ts | 57 + examples/injective/hooks/useClient.ts | 23 - .../injective/hooks/useOsmosisRequests.ts | 140 - examples/injective/hooks/useQueuedRequests.ts | 56 - examples/injective/hooks/useRequest.ts | 33 - .../injective/hooks/useTransactionToast.tsx | 30 - examples/injective/next.config.js | 4 +- examples/injective/package.json | 51 +- examples/injective/pages/_app.tsx | 113 +- examples/injective/pages/index.tsx | 269 +- examples/injective/pages/liquidity.tsx | 128 - examples/injective/pages/mobx.tsx | 269 - examples/injective/pages/validator-test.tsx | 310 - examples/injective/pages/vote.tsx | 110 - examples/injective/proto/confio/LICENSE | 204 - examples/injective/proto/confio/README.md | 1 - examples/injective/proto/confio/proofs.proto | 234 - examples/injective/proto/cosmos/LICENSE | 204 - examples/injective/proto/cosmos/README.md | 1 - .../proto/cosmos/app/v1alpha1/config.proto | 36 - .../proto/cosmos/app/v1alpha1/module.proto | 93 - .../proto/cosmos/app/v1alpha1/query.proto | 22 - .../proto/cosmos/auth/v1beta1/auth.proto | 47 - .../proto/cosmos/auth/v1beta1/genesis.proto | 17 - .../proto/cosmos/auth/v1beta1/query.proto | 130 - .../proto/cosmos/authz/v1beta1/authz.proto | 46 - .../proto/cosmos/authz/v1beta1/event.proto | 27 - .../proto/cosmos/authz/v1beta1/genesis.proto | 13 - .../proto/cosmos/authz/v1beta1/query.proto | 82 - .../proto/cosmos/authz/v1beta1/tx.proto | 75 - .../proto/cosmos/bank/v1beta1/authz.proto | 19 - .../proto/cosmos/bank/v1beta1/bank.proto | 108 - .../proto/cosmos/bank/v1beta1/genesis.proto | 40 - .../proto/cosmos/bank/v1beta1/query.proto | 231 - .../proto/cosmos/bank/v1beta1/tx.proto | 48 - .../proto/cosmos/base/abci/v1beta1/abci.proto | 158 - .../proto/cosmos/base/kv/v1beta1/kv.proto | 17 - .../base/query/v1beta1/pagination.proto | 56 - .../base/reflection/v1beta1/reflection.proto | 44 - .../base/reflection/v2alpha1/reflection.proto | 218 - .../base/snapshots/v1beta1/snapshot.proto | 70 - .../base/store/v1beta1/commit_info.proto | 29 - .../cosmos/base/store/v1beta1/listening.proto | 16 - .../base/tendermint/v1beta1/query.proto | 138 - .../proto/cosmos/base/v1beta1/coin.proto | 43 - .../capability/v1beta1/capability.proto | 30 - .../cosmos/capability/v1beta1/genesis.proto | 26 - .../proto/cosmos/crisis/v1beta1/genesis.proto | 14 - .../proto/cosmos/crisis/v1beta1/tx.proto | 29 - .../proto/cosmos/crypto/ed25519/keys.proto | 23 - .../proto/cosmos/crypto/hd/v1/hd.proto | 23 - .../cosmos/crypto/keyring/v1/record.proto | 47 - .../proto/cosmos/crypto/multisig/keys.proto | 17 - .../crypto/multisig/v1beta1/multisig.proto | 25 - .../proto/cosmos/crypto/secp256k1/keys.proto | 22 - .../proto/cosmos/crypto/secp256r1/keys.proto | 23 - .../distribution/v1beta1/distribution.proto | 154 - .../cosmos/distribution/v1beta1/genesis.proto | 144 - .../cosmos/distribution/v1beta1/query.proto | 219 - .../cosmos/distribution/v1beta1/tx.proto | 95 - .../cosmos/evidence/v1beta1/evidence.proto | 22 - .../cosmos/evidence/v1beta1/genesis.proto | 12 - .../proto/cosmos/evidence/v1beta1/query.proto | 51 - .../proto/cosmos/evidence/v1beta1/tx.proto | 35 - .../cosmos/feegrant/v1beta1/feegrant.proto | 78 - .../cosmos/feegrant/v1beta1/genesis.proto | 13 - .../proto/cosmos/feegrant/v1beta1/query.proto | 79 - .../proto/cosmos/feegrant/v1beta1/tx.proto | 53 - .../cosmos/genutil/v1beta1/genesis.proto | 12 - .../proto/cosmos/gov/v1/genesis.proto | 26 - .../injective/proto/cosmos/gov/v1/gov.proto | 132 - .../injective/proto/cosmos/gov/v1/query.proto | 183 - .../injective/proto/cosmos/gov/v1/tx.proto | 100 - .../proto/cosmos/gov/v1beta1/genesis.proto | 26 - .../proto/cosmos/gov/v1beta1/gov.proto | 201 - .../proto/cosmos/gov/v1beta1/query.proto | 191 - .../proto/cosmos/gov/v1beta1/tx.proto | 106 - .../proto/cosmos/group/v1/events.proto | 77 - .../proto/cosmos/group/v1/genesis.proto | 38 - .../proto/cosmos/group/v1/query.proto | 308 - .../injective/proto/cosmos/group/v1/tx.proto | 364 - .../proto/cosmos/group/v1/types.proto | 308 - .../proto/cosmos/mint/v1beta1/genesis.proto | 16 - .../proto/cosmos/mint/v1beta1/mint.proto | 57 - .../proto/cosmos/mint/v1beta1/query.proto | 57 - .../injective/proto/cosmos/msg/v1/msg.proto | 22 - .../proto/cosmos/nft/v1beta1/event.proto | 26 - .../proto/cosmos/nft/v1beta1/genesis.proto | 22 - .../proto/cosmos/nft/v1beta1/nft.proto | 48 - .../proto/cosmos/nft/v1beta1/query.proto | 125 - .../proto/cosmos/nft/v1beta1/tx.proto | 30 - .../injective/proto/cosmos/orm/v1/orm.proto | 104 - .../proto/cosmos/orm/v1alpha1/schema.proto | 76 - .../proto/cosmos/params/v1beta1/params.proto | 29 - .../proto/cosmos/params/v1beta1/query.proto | 54 - .../cosmos/slashing/v1beta1/genesis.proto | 47 - .../proto/cosmos/slashing/v1beta1/query.proto | 64 - .../cosmos/slashing/v1beta1/slashing.proto | 45 - .../proto/cosmos/slashing/v1beta1/tx.proto | 30 - .../proto/cosmos/staking/v1beta1/authz.proto | 47 - .../cosmos/staking/v1beta1/genesis.proto | 49 - .../proto/cosmos/staking/v1beta1/query.proto | 349 - .../cosmos/staking/v1beta1/staking.proto | 358 - .../proto/cosmos/staking/v1beta1/tx.proto | 138 - .../cosmos/tx/signing/v1beta1/signing.proto | 94 - .../proto/cosmos/tx/v1beta1/service.proto | 163 - .../proto/cosmos/tx/v1beta1/tx.proto | 249 - .../proto/cosmos/upgrade/v1beta1/query.proto | 120 - .../proto/cosmos/upgrade/v1beta1/tx.proto | 55 - .../cosmos/upgrade/v1beta1/upgrade.proto | 86 - .../proto/cosmos/vesting/v1beta1/tx.proto | 74 - .../cosmos/vesting/v1beta1/vesting.proto | 76 - examples/injective/proto/cosmos_proto/LICENSE | 204 - .../injective/proto/cosmos_proto/README.md | 1 - .../injective/proto/cosmos_proto/cosmos.proto | 97 - examples/injective/proto/cosmwasm/LICENSE | 204 - examples/injective/proto/cosmwasm/README.md | 1 - .../proto/cosmwasm/wasm/v1/genesis.proto | 60 - .../proto/cosmwasm/wasm/v1/ibc.proto | 31 - .../proto/cosmwasm/wasm/v1/proposal.proto | 150 - .../proto/cosmwasm/wasm/v1/query.proto | 223 - .../injective/proto/cosmwasm/wasm/v1/tx.proto | 135 - .../proto/cosmwasm/wasm/v1/types.proto | 140 - examples/injective/proto/gogoproto/LICENSE | 34 - examples/injective/proto/gogoproto/README.md | 1 - examples/injective/proto/gogoproto/gogo.proto | 145 - examples/injective/proto/google/LICENSE | 201 - examples/injective/proto/google/README.md | 1 - .../proto/google/api/annotations.proto | 31 - .../injective/proto/google/api/http.proto | 375 - .../injective/proto/google/protobuf/any.proto | 155 - .../proto/google/protobuf/descriptor.proto | 885 -- .../proto/google/protobuf/duration.proto | 116 - .../proto/google/protobuf/empty.proto | 52 - .../proto/google/protobuf/timestamp.proto | 138 - examples/injective/proto/ibc/LICENSE | 21 - examples/injective/proto/ibc/README.md | 1 - .../applications/transfer/v1/genesis.proto | 19 - .../ibc/applications/transfer/v1/query.proto | 67 - .../applications/transfer/v1/transfer.proto | 30 - .../ibc/applications/transfer/v1/tx.proto | 44 - .../ibc/applications/transfer/v2/packet.proto | 19 - .../proto/ibc/core/channel/v1/channel.proto | 148 - .../proto/ibc/core/channel/v1/genesis.proto | 32 - .../proto/ibc/core/channel/v1/query.proto | 376 - .../proto/ibc/core/channel/v1/tx.proto | 211 - .../proto/ibc/core/client/v1/client.proto | 104 - .../proto/ibc/core/client/v1/genesis.proto | 48 - .../proto/ibc/core/client/v1/query.proto | 184 - .../proto/ibc/core/client/v1/tx.proto | 99 - .../ibc/core/commitment/v1/commitment.proto | 41 - .../ibc/core/connection/v1/connection.proto | 114 - .../ibc/core/connection/v1/genesis.proto | 18 - .../proto/ibc/core/connection/v1/query.proto | 138 - .../proto/ibc/core/connection/v1/tx.proto | 119 - .../proto/ibc/core/port/v1/query.proto | 35 - .../proto/ibc/core/types/v1/genesis.proto | 23 - .../lightclients/localhost/v1/localhost.proto | 18 - .../solomachine/v1/solomachine.proto | 189 - .../solomachine/v2/solomachine.proto | 189 - .../tendermint/v1/tendermint.proto | 115 - .../proto/osmosis/claim/v1beta1/claim.proto | 35 - .../proto/osmosis/claim/v1beta1/genesis.proto | 33 - .../proto/osmosis/claim/v1beta1/params.proto | 31 - .../proto/osmosis/claim/v1beta1/query.proto | 94 - .../proto/osmosis/epochs/genesis.proto | 72 - .../proto/osmosis/epochs/query.proto | 30 - .../pool-models/balancer/balancerPool.proto | 151 - .../gamm/pool-models/balancer/tx/tx.proto | 31 - .../stableswap/stableswap_pool.proto | 73 - .../gamm/pool-models/stableswap/tx.proto | 53 - .../proto/osmosis/gamm/v1beta1/genesis.proto | 27 - .../proto/osmosis/gamm/v1beta1/query.proto | 308 - .../proto/osmosis/gamm/v1beta1/tx.proto | 237 - .../proto/osmosis/gamm/v2/query.proto | 38 - .../ibc-rate-limit/v1beta1/params.proto | 12 - .../ibc-rate-limit/v1beta1/query.proto | 27 - .../proto/osmosis/incentives/gauge.proto | 60 - .../proto/osmosis/incentives/genesis.proto | 28 - .../proto/osmosis/incentives/params.proto | 14 - .../proto/osmosis/incentives/query.proto | 175 - .../proto/osmosis/incentives/tx.proto | 60 - .../proto/osmosis/lockup/genesis.proto | 14 - .../injective/proto/osmosis/lockup/lock.proto | 108 - .../proto/osmosis/lockup/params.proto | 11 - .../proto/osmosis/lockup/query.proto | 299 - .../injective/proto/osmosis/lockup/tx.proto | 88 - .../proto/osmosis/mint/v1beta1/genesis.proto | 21 - .../proto/osmosis/mint/v1beta1/mint.proto | 111 - .../proto/osmosis/mint/v1beta1/query.proto | 45 - .../pool-incentives/v1beta1/genesis.proto | 27 - .../osmosis/pool-incentives/v1beta1/gov.proto | 52 - .../pool-incentives/v1beta1/incentives.proto | 58 - .../pool-incentives/v1beta1/query.proto | 108 - .../proto/osmosis/sumtree/v1beta1/tree.proto | 19 - .../proto/osmosis/superfluid/genesis.proto | 27 - .../proto/osmosis/superfluid/params.proto | 20 - .../proto/osmosis/superfluid/query.proto | 284 - .../proto/osmosis/superfluid/superfluid.proto | 82 - .../proto/osmosis/superfluid/tx.proto | 92 - .../osmosis/superfluid/v1beta1/gov.proto | 50 - .../v1beta1/authorityMetadata.proto | 17 - .../tokenfactory/v1beta1/genesis.proto | 32 - .../osmosis/tokenfactory/v1beta1/params.proto | 18 - .../osmosis/tokenfactory/v1beta1/query.proto | 71 - .../osmosis/tokenfactory/v1beta1/tx.proto | 108 - .../proto/osmosis/twap/v1beta1/genesis.proto | 29 - .../proto/osmosis/twap/v1beta1/query.proto | 73 - .../proto/osmosis/twap/v1beta1/query.yml | 22 - .../osmosis/twap/v1beta1/twap_record.proto | 69 - .../osmosis/txfees/v1beta1/feetoken.proto | 17 - .../osmosis/txfees/v1beta1/genesis.proto | 13 - .../proto/osmosis/txfees/v1beta1/gov.proto | 27 - .../proto/osmosis/txfees/v1beta1/query.proto | 74 - examples/injective/proto/tendermint/LICENSE | 204 - examples/injective/proto/tendermint/README.md | 1 - .../proto/tendermint/abci/types.proto | 394 - .../proto/tendermint/crypto/keys.proto | 17 - .../proto/tendermint/crypto/proof.proto | 41 - .../proto/tendermint/libs/bits/types.proto | 9 - .../proto/tendermint/p2p/types.proto | 42 - .../proto/tendermint/types/block.proto | 15 - .../proto/tendermint/types/evidence.proto | 38 - .../proto/tendermint/types/params.proto | 79 - .../proto/tendermint/types/types.proto | 153 - .../proto/tendermint/types/validator.proto | 25 - .../proto/tendermint/version/types.proto | 24 - examples/injective/public/favicon.ico | Bin 25531 -> 14037 bytes examples/injective/scripts/aminos.js | 31 - examples/injective/scripts/codegen.js | 98 - examples/injective/styles/Home.module.css | 25 - examples/injective/styles/globals.css | 23 +- examples/injective/tsconfig.json | 24 +- examples/injective/utils.ts | 24 - examples/injective/utils/index.ts | 1 + examples/injective/utils/liquidity/apr.ts | 140 - examples/injective/utils/liquidity/index.ts | 2 - examples/injective/utils/liquidity/pool.ts | 320 - examples/injective/utils/liquidity/types.ts | 82 - examples/injective/utils/utils.ts | 16 + examples/injective/yarn.lock | 10865 ++++------------ 308 files changed, 3294 insertions(+), 36320 deletions(-) delete mode 100644 examples/injective/.babelrc delete mode 100644 examples/injective/.eslintrc.json delete mode 100644 examples/injective/.yarnrc.yml delete mode 100644 examples/injective/api/apr.ts delete mode 100644 examples/injective/api/fees.ts delete mode 100644 examples/injective/api/index.ts delete mode 100644 examples/injective/api/prices.ts delete mode 100644 examples/injective/api/rewards.ts delete mode 100644 examples/injective/api/tokens.ts create mode 100644 examples/injective/components/Main.tsx create mode 100644 examples/injective/components/SendMsg.tsx delete mode 100644 examples/injective/components/card.tsx create mode 100644 examples/injective/components/common/Footer.tsx create mode 100644 examples/injective/components/common/Header.tsx create mode 100644 examples/injective/components/common/Layout.tsx create mode 100644 examples/injective/components/common/index.ts delete mode 100644 examples/injective/components/features.tsx delete mode 100644 examples/injective/components/react/address-card.tsx delete mode 100644 examples/injective/components/react/chain-card.tsx delete mode 100644 examples/injective/components/react/chain-dropdown.tsx delete mode 100644 examples/injective/components/react/choose-chain.tsx delete mode 100644 examples/injective/components/react/handleChangeColor.tsx delete mode 100644 examples/injective/components/react/index.ts delete mode 100644 examples/injective/components/react/liquidity/add-liquidity-modal.tsx delete mode 100644 examples/injective/components/react/liquidity/bond-shares-modal.tsx delete mode 100644 examples/injective/components/react/liquidity/hooks.tsx delete mode 100644 examples/injective/components/react/liquidity/index.ts delete mode 100644 examples/injective/components/react/liquidity/modal-components.tsx delete mode 100644 examples/injective/components/react/liquidity/pool-card.tsx delete mode 100644 examples/injective/components/react/liquidity/pool-detail-modal.tsx delete mode 100644 examples/injective/components/react/liquidity/pool-list.tsx delete mode 100644 examples/injective/components/react/liquidity/pools-overview.tsx delete mode 100644 examples/injective/components/react/liquidity/provide-liquidity.tsx delete mode 100644 examples/injective/components/react/liquidity/remove-liquidity-modal.tsx delete mode 100644 examples/injective/components/react/liquidity/token-input.tsx delete mode 100644 examples/injective/components/react/liquidity/types.tsx delete mode 100644 examples/injective/components/react/proposal-card.tsx delete mode 100644 examples/injective/components/react/proposal-modal.tsx delete mode 100644 examples/injective/components/react/send-tokens-card.tsx delete mode 100644 examples/injective/components/react/user-card.tsx delete mode 100644 examples/injective/components/react/vote.tsx delete mode 100644 examples/injective/components/react/wallet-connect.tsx delete mode 100644 examples/injective/components/react/warn-block.tsx delete mode 100644 examples/injective/components/types.tsx delete mode 100644 examples/injective/components/wallet-multi.tsx delete mode 100644 examples/injective/components/wallet.tsx rename examples/injective/components/{react/astronaut.tsx => wallet/Astronaut.tsx} (100%) create mode 100644 examples/injective/components/wallet/Chain.tsx create mode 100644 examples/injective/components/wallet/Connect.tsx create mode 100644 examples/injective/components/wallet/User.tsx create mode 100644 examples/injective/components/wallet/Wallet.tsx create mode 100644 examples/injective/components/wallet/Warning.tsx create mode 100644 examples/injective/components/wallet/index.ts delete mode 100644 examples/injective/config/features.ts delete mode 100644 examples/injective/config/liquidity/defaults.ts delete mode 100644 examples/injective/config/liquidity/features.ts delete mode 100644 examples/injective/config/liquidity/index.ts delete mode 100644 examples/injective/config/liquidity/theme.ts create mode 100644 examples/injective/config/projects.ts delete mode 100644 examples/injective/config/theme.ts create mode 100644 examples/injective/hooks/useBalance.ts delete mode 100644 examples/injective/hooks/useClient.ts delete mode 100644 examples/injective/hooks/useOsmosisRequests.ts delete mode 100644 examples/injective/hooks/useQueuedRequests.ts delete mode 100644 examples/injective/hooks/useRequest.ts delete mode 100644 examples/injective/hooks/useTransactionToast.tsx delete mode 100644 examples/injective/pages/liquidity.tsx delete mode 100644 examples/injective/pages/mobx.tsx delete mode 100644 examples/injective/pages/validator-test.tsx delete mode 100644 examples/injective/pages/vote.tsx delete mode 100644 examples/injective/proto/confio/LICENSE delete mode 100644 examples/injective/proto/confio/README.md delete mode 100644 examples/injective/proto/confio/proofs.proto delete mode 100644 examples/injective/proto/cosmos/LICENSE delete mode 100644 examples/injective/proto/cosmos/README.md delete mode 100644 examples/injective/proto/cosmos/app/v1alpha1/config.proto delete mode 100644 examples/injective/proto/cosmos/app/v1alpha1/module.proto delete mode 100644 examples/injective/proto/cosmos/app/v1alpha1/query.proto delete mode 100644 examples/injective/proto/cosmos/auth/v1beta1/auth.proto delete mode 100644 examples/injective/proto/cosmos/auth/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/auth/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/authz/v1beta1/authz.proto delete mode 100644 examples/injective/proto/cosmos/authz/v1beta1/event.proto delete mode 100644 examples/injective/proto/cosmos/authz/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/authz/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/authz/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/bank/v1beta1/authz.proto delete mode 100644 examples/injective/proto/cosmos/bank/v1beta1/bank.proto delete mode 100644 examples/injective/proto/cosmos/bank/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/bank/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/bank/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/base/abci/v1beta1/abci.proto delete mode 100644 examples/injective/proto/cosmos/base/kv/v1beta1/kv.proto delete mode 100644 examples/injective/proto/cosmos/base/query/v1beta1/pagination.proto delete mode 100644 examples/injective/proto/cosmos/base/reflection/v1beta1/reflection.proto delete mode 100644 examples/injective/proto/cosmos/base/reflection/v2alpha1/reflection.proto delete mode 100644 examples/injective/proto/cosmos/base/snapshots/v1beta1/snapshot.proto delete mode 100644 examples/injective/proto/cosmos/base/store/v1beta1/commit_info.proto delete mode 100644 examples/injective/proto/cosmos/base/store/v1beta1/listening.proto delete mode 100644 examples/injective/proto/cosmos/base/tendermint/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/base/v1beta1/coin.proto delete mode 100644 examples/injective/proto/cosmos/capability/v1beta1/capability.proto delete mode 100644 examples/injective/proto/cosmos/capability/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/crisis/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/crisis/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/crypto/ed25519/keys.proto delete mode 100644 examples/injective/proto/cosmos/crypto/hd/v1/hd.proto delete mode 100644 examples/injective/proto/cosmos/crypto/keyring/v1/record.proto delete mode 100644 examples/injective/proto/cosmos/crypto/multisig/keys.proto delete mode 100644 examples/injective/proto/cosmos/crypto/multisig/v1beta1/multisig.proto delete mode 100644 examples/injective/proto/cosmos/crypto/secp256k1/keys.proto delete mode 100644 examples/injective/proto/cosmos/crypto/secp256r1/keys.proto delete mode 100644 examples/injective/proto/cosmos/distribution/v1beta1/distribution.proto delete mode 100644 examples/injective/proto/cosmos/distribution/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/distribution/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/distribution/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/evidence/v1beta1/evidence.proto delete mode 100644 examples/injective/proto/cosmos/evidence/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/evidence/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/evidence/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/feegrant/v1beta1/feegrant.proto delete mode 100644 examples/injective/proto/cosmos/feegrant/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/feegrant/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/feegrant/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/genutil/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1/gov.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1/query.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1/tx.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1beta1/gov.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/gov/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/group/v1/events.proto delete mode 100644 examples/injective/proto/cosmos/group/v1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/group/v1/query.proto delete mode 100644 examples/injective/proto/cosmos/group/v1/tx.proto delete mode 100644 examples/injective/proto/cosmos/group/v1/types.proto delete mode 100644 examples/injective/proto/cosmos/mint/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/mint/v1beta1/mint.proto delete mode 100644 examples/injective/proto/cosmos/mint/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/msg/v1/msg.proto delete mode 100644 examples/injective/proto/cosmos/nft/v1beta1/event.proto delete mode 100644 examples/injective/proto/cosmos/nft/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/nft/v1beta1/nft.proto delete mode 100644 examples/injective/proto/cosmos/nft/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/nft/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/orm/v1/orm.proto delete mode 100644 examples/injective/proto/cosmos/orm/v1alpha1/schema.proto delete mode 100644 examples/injective/proto/cosmos/params/v1beta1/params.proto delete mode 100644 examples/injective/proto/cosmos/params/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/slashing/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/slashing/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/slashing/v1beta1/slashing.proto delete mode 100644 examples/injective/proto/cosmos/slashing/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/staking/v1beta1/authz.proto delete mode 100644 examples/injective/proto/cosmos/staking/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/cosmos/staking/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/staking/v1beta1/staking.proto delete mode 100644 examples/injective/proto/cosmos/staking/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/tx/signing/v1beta1/signing.proto delete mode 100644 examples/injective/proto/cosmos/tx/v1beta1/service.proto delete mode 100644 examples/injective/proto/cosmos/tx/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/upgrade/v1beta1/query.proto delete mode 100644 examples/injective/proto/cosmos/upgrade/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/upgrade/v1beta1/upgrade.proto delete mode 100644 examples/injective/proto/cosmos/vesting/v1beta1/tx.proto delete mode 100644 examples/injective/proto/cosmos/vesting/v1beta1/vesting.proto delete mode 100644 examples/injective/proto/cosmos_proto/LICENSE delete mode 100644 examples/injective/proto/cosmos_proto/README.md delete mode 100644 examples/injective/proto/cosmos_proto/cosmos.proto delete mode 100644 examples/injective/proto/cosmwasm/LICENSE delete mode 100644 examples/injective/proto/cosmwasm/README.md delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/genesis.proto delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/ibc.proto delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/proposal.proto delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/query.proto delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/tx.proto delete mode 100644 examples/injective/proto/cosmwasm/wasm/v1/types.proto delete mode 100644 examples/injective/proto/gogoproto/LICENSE delete mode 100644 examples/injective/proto/gogoproto/README.md delete mode 100644 examples/injective/proto/gogoproto/gogo.proto delete mode 100644 examples/injective/proto/google/LICENSE delete mode 100644 examples/injective/proto/google/README.md delete mode 100644 examples/injective/proto/google/api/annotations.proto delete mode 100644 examples/injective/proto/google/api/http.proto delete mode 100644 examples/injective/proto/google/protobuf/any.proto delete mode 100644 examples/injective/proto/google/protobuf/descriptor.proto delete mode 100644 examples/injective/proto/google/protobuf/duration.proto delete mode 100644 examples/injective/proto/google/protobuf/empty.proto delete mode 100644 examples/injective/proto/google/protobuf/timestamp.proto delete mode 100644 examples/injective/proto/ibc/LICENSE delete mode 100644 examples/injective/proto/ibc/README.md delete mode 100644 examples/injective/proto/ibc/applications/transfer/v1/genesis.proto delete mode 100644 examples/injective/proto/ibc/applications/transfer/v1/query.proto delete mode 100644 examples/injective/proto/ibc/applications/transfer/v1/transfer.proto delete mode 100644 examples/injective/proto/ibc/applications/transfer/v1/tx.proto delete mode 100644 examples/injective/proto/ibc/applications/transfer/v2/packet.proto delete mode 100644 examples/injective/proto/ibc/core/channel/v1/channel.proto delete mode 100644 examples/injective/proto/ibc/core/channel/v1/genesis.proto delete mode 100644 examples/injective/proto/ibc/core/channel/v1/query.proto delete mode 100644 examples/injective/proto/ibc/core/channel/v1/tx.proto delete mode 100644 examples/injective/proto/ibc/core/client/v1/client.proto delete mode 100644 examples/injective/proto/ibc/core/client/v1/genesis.proto delete mode 100644 examples/injective/proto/ibc/core/client/v1/query.proto delete mode 100644 examples/injective/proto/ibc/core/client/v1/tx.proto delete mode 100644 examples/injective/proto/ibc/core/commitment/v1/commitment.proto delete mode 100644 examples/injective/proto/ibc/core/connection/v1/connection.proto delete mode 100644 examples/injective/proto/ibc/core/connection/v1/genesis.proto delete mode 100644 examples/injective/proto/ibc/core/connection/v1/query.proto delete mode 100644 examples/injective/proto/ibc/core/connection/v1/tx.proto delete mode 100644 examples/injective/proto/ibc/core/port/v1/query.proto delete mode 100644 examples/injective/proto/ibc/core/types/v1/genesis.proto delete mode 100644 examples/injective/proto/ibc/lightclients/localhost/v1/localhost.proto delete mode 100644 examples/injective/proto/ibc/lightclients/solomachine/v1/solomachine.proto delete mode 100644 examples/injective/proto/ibc/lightclients/solomachine/v2/solomachine.proto delete mode 100644 examples/injective/proto/ibc/lightclients/tendermint/v1/tendermint.proto delete mode 100644 examples/injective/proto/osmosis/claim/v1beta1/claim.proto delete mode 100644 examples/injective/proto/osmosis/claim/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/claim/v1beta1/params.proto delete mode 100644 examples/injective/proto/osmosis/claim/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/epochs/genesis.proto delete mode 100644 examples/injective/proto/osmosis/epochs/query.proto delete mode 100644 examples/injective/proto/osmosis/gamm/pool-models/balancer/balancerPool.proto delete mode 100644 examples/injective/proto/osmosis/gamm/pool-models/balancer/tx/tx.proto delete mode 100644 examples/injective/proto/osmosis/gamm/pool-models/stableswap/stableswap_pool.proto delete mode 100644 examples/injective/proto/osmosis/gamm/pool-models/stableswap/tx.proto delete mode 100644 examples/injective/proto/osmosis/gamm/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/gamm/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/gamm/v1beta1/tx.proto delete mode 100644 examples/injective/proto/osmosis/gamm/v2/query.proto delete mode 100644 examples/injective/proto/osmosis/ibc-rate-limit/v1beta1/params.proto delete mode 100644 examples/injective/proto/osmosis/ibc-rate-limit/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/incentives/gauge.proto delete mode 100644 examples/injective/proto/osmosis/incentives/genesis.proto delete mode 100644 examples/injective/proto/osmosis/incentives/params.proto delete mode 100644 examples/injective/proto/osmosis/incentives/query.proto delete mode 100644 examples/injective/proto/osmosis/incentives/tx.proto delete mode 100644 examples/injective/proto/osmosis/lockup/genesis.proto delete mode 100644 examples/injective/proto/osmosis/lockup/lock.proto delete mode 100644 examples/injective/proto/osmosis/lockup/params.proto delete mode 100644 examples/injective/proto/osmosis/lockup/query.proto delete mode 100644 examples/injective/proto/osmosis/lockup/tx.proto delete mode 100644 examples/injective/proto/osmosis/mint/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/mint/v1beta1/mint.proto delete mode 100644 examples/injective/proto/osmosis/mint/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/pool-incentives/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/pool-incentives/v1beta1/gov.proto delete mode 100644 examples/injective/proto/osmosis/pool-incentives/v1beta1/incentives.proto delete mode 100644 examples/injective/proto/osmosis/pool-incentives/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/sumtree/v1beta1/tree.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/genesis.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/params.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/query.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/superfluid.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/tx.proto delete mode 100644 examples/injective/proto/osmosis/superfluid/v1beta1/gov.proto delete mode 100644 examples/injective/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto delete mode 100644 examples/injective/proto/osmosis/tokenfactory/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/tokenfactory/v1beta1/params.proto delete mode 100644 examples/injective/proto/osmosis/tokenfactory/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/tokenfactory/v1beta1/tx.proto delete mode 100644 examples/injective/proto/osmosis/twap/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/twap/v1beta1/query.proto delete mode 100644 examples/injective/proto/osmosis/twap/v1beta1/query.yml delete mode 100644 examples/injective/proto/osmosis/twap/v1beta1/twap_record.proto delete mode 100644 examples/injective/proto/osmosis/txfees/v1beta1/feetoken.proto delete mode 100644 examples/injective/proto/osmosis/txfees/v1beta1/genesis.proto delete mode 100644 examples/injective/proto/osmosis/txfees/v1beta1/gov.proto delete mode 100644 examples/injective/proto/osmosis/txfees/v1beta1/query.proto delete mode 100644 examples/injective/proto/tendermint/LICENSE delete mode 100644 examples/injective/proto/tendermint/README.md delete mode 100644 examples/injective/proto/tendermint/abci/types.proto delete mode 100644 examples/injective/proto/tendermint/crypto/keys.proto delete mode 100644 examples/injective/proto/tendermint/crypto/proof.proto delete mode 100644 examples/injective/proto/tendermint/libs/bits/types.proto delete mode 100644 examples/injective/proto/tendermint/p2p/types.proto delete mode 100644 examples/injective/proto/tendermint/types/block.proto delete mode 100644 examples/injective/proto/tendermint/types/evidence.proto delete mode 100644 examples/injective/proto/tendermint/types/params.proto delete mode 100644 examples/injective/proto/tendermint/types/types.proto delete mode 100644 examples/injective/proto/tendermint/types/validator.proto delete mode 100644 examples/injective/proto/tendermint/version/types.proto delete mode 100644 examples/injective/scripts/aminos.js delete mode 100644 examples/injective/scripts/codegen.js delete mode 100644 examples/injective/styles/Home.module.css delete mode 100644 examples/injective/utils.ts create mode 100644 examples/injective/utils/index.ts delete mode 100644 examples/injective/utils/liquidity/apr.ts delete mode 100644 examples/injective/utils/liquidity/index.ts delete mode 100644 examples/injective/utils/liquidity/pool.ts delete mode 100644 examples/injective/utils/liquidity/types.ts create mode 100644 examples/injective/utils/utils.ts diff --git a/examples/injective/.babelrc b/examples/injective/.babelrc deleted file mode 100644 index 1ff94f7ed..000000000 --- a/examples/injective/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["next/babel"] -} diff --git a/examples/injective/.eslintrc.json b/examples/injective/.eslintrc.json deleted file mode 100644 index bffb357a7..000000000 --- a/examples/injective/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/examples/injective/.gitignore b/examples/injective/.gitignore index c87c9b392..ae45b5ee5 100644 --- a/examples/injective/.gitignore +++ b/examples/injective/.gitignore @@ -34,3 +34,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +*.next/* +*.yarn/* \ No newline at end of file diff --git a/examples/injective/.yarnrc.yml b/examples/injective/.yarnrc.yml deleted file mode 100644 index 3186f3f07..000000000 --- a/examples/injective/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/examples/injective/CHANGELOG.md b/examples/injective/CHANGELOG.md index aa20dde41..e69de29bb 100644 --- a/examples/injective/CHANGELOG.md +++ b/examples/injective/CHANGELOG.md @@ -1,356 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# 2.1.0 (2024-10-08) - -**Note:** Version bump only for package @cosmology/injective - - - - - -## [2.0.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@2.0.0...@cosmology/connect-chain-with-telescope@2.0.1) (2024-04-06) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [2.0.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.8.3...@cosmology/connect-chain-with-telescope@2.0.0) (2024-04-06) - - -### Bug Fixes - -* custom filtering stake-tokens ([9cc3d24](https://github.com/cosmology-tech/create-cosmos-app/commit/9cc3d24055cc54358af9dc7d8a56856bd2ef0787)) -* use new combobox in asset-list ([68449d3](https://github.com/cosmology-tech/create-cosmos-app/commit/68449d39411c259f85eec07b7ae42f1a712c21a9)) - - - - - -## [1.8.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.8.2...@cosmology/connect-chain-with-telescope@1.8.3) (2024-01-20) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.8.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.8.1...@cosmology/connect-chain-with-telescope@1.8.2) (2024-01-20) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.8.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.8.0...@cosmology/connect-chain-with-telescope@1.8.1) (2024-01-19) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.8.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.8...@cosmology/connect-chain-with-telescope@1.8.0) (2024-01-19) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.8](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.7...@cosmology/connect-chain-with-telescope@1.7.8) (2024-01-19) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.7](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.6...@cosmology/connect-chain-with-telescope@1.7.7) (2024-01-19) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.6](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.5...@cosmology/connect-chain-with-telescope@1.7.6) (2023-09-27) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.5](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.4...@cosmology/connect-chain-with-telescope@1.7.5) (2023-09-27) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.3...@cosmology/connect-chain-with-telescope@1.7.4) (2023-07-30) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.2...@cosmology/connect-chain-with-telescope@1.7.3) (2023-07-14) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.1...@cosmology/connect-chain-with-telescope@1.7.2) (2023-07-14) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.7.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.7.0...@cosmology/connect-chain-with-telescope@1.7.1) (2023-06-28) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.7.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.6.3...@cosmology/connect-chain-with-telescope@1.7.0) (2023-04-12) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.6.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.6.2...@cosmology/connect-chain-with-telescope@1.6.3) (2023-03-28) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.6.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.6.1...@cosmology/connect-chain-with-telescope@1.6.2) (2023-02-15) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.6.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.6.0...@cosmology/connect-chain-with-telescope@1.6.1) (2023-01-11) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.6.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.5.4...@cosmology/connect-chain-with-telescope@1.6.0) (2022-12-17) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.5.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.5.3...@cosmology/connect-chain-with-telescope@1.5.4) (2022-11-25) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.5.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.5.2...@cosmology/connect-chain-with-telescope@1.5.3) (2022-11-21) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.5.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.5.1...@cosmology/connect-chain-with-telescope@1.5.2) (2022-11-17) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.5.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.5.0...@cosmology/connect-chain-with-telescope@1.5.1) (2022-11-17) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.5.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.4.0...@cosmology/connect-chain-with-telescope@1.5.0) (2022-11-15) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.4.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.3.0...@cosmology/connect-chain-with-telescope@1.4.0) (2022-11-14) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.3.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.2.0...@cosmology/connect-chain-with-telescope@1.3.0) (2022-11-10) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.2.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.1.0...@cosmology/connect-chain-with-telescope@1.2.0) (2022-11-09) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -# [1.1.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.0.7...@cosmology/connect-chain-with-telescope@1.1.0) (2022-11-08) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.0.7](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.0.6...@cosmology/connect-chain-with-telescope@1.0.7) (2022-11-05) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.0.6](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.0.5...@cosmology/connect-chain-with-telescope@1.0.6) (2022-11-05) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.0.5](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-chain-with-telescope@1.0.4...@cosmology/connect-chain-with-telescope@1.0.5) (2022-11-05) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## 1.0.4 (2022-11-01) - -**Note:** Version bump only for package @cosmology/connect-chain-with-telescope - - - - - -## [1.0.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@1.0.2...@cosmonauts/connect-chain-with-telescope@1.0.3) (2022-10-24) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -## [1.0.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@1.0.1...@cosmonauts/connect-chain-with-telescope@1.0.2) (2022-10-15) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -## [1.0.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@1.0.0...@cosmonauts/connect-chain-with-telescope@1.0.1) (2022-10-03) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [1.0.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.6.0...@cosmonauts/connect-chain-with-telescope@1.0.0) (2022-10-01) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [0.6.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.5.1...@cosmonauts/connect-chain-with-telescope@0.6.0) (2022-09-30) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -## [0.5.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.5.0...@cosmonauts/connect-chain-with-telescope@0.5.1) (2022-09-25) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [0.5.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.4.0...@cosmonauts/connect-chain-with-telescope@0.5.0) (2022-09-25) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [0.4.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.3.0...@cosmonauts/connect-chain-with-telescope@0.4.0) (2022-09-23) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [0.3.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.2.0...@cosmonauts/connect-chain-with-telescope@0.3.0) (2022-09-22) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -# [0.2.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-chain-with-telescope@0.1.9...@cosmonauts/connect-chain-with-telescope@0.2.0) (2022-09-22) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope - - - - - -## 0.1.9 (2022-09-11) - -**Note:** Version bump only for package @cosmonauts/connect-chain-with-telescope diff --git a/examples/injective/README.md b/examples/injective/README.md index 8c1363707..c8b801a98 100644 --- a/examples/injective/README.md +++ b/examples/injective/README.md @@ -1,5 +1,3 @@ -This is a Cosmos App project bootstrapped with [`create-cosmos-app`](https://github.com/cosmology-tech/create-cosmos-app). - ## Getting Started First, install the packages and run the development server: @@ -26,11 +24,11 @@ Checkout more videos for how to use various frontend tooling in the Cosmos! * https://cosmology.zone/learn -### Cosmos Kit +### Interchain Kit A wallet connector for the Cosmos ⚛️ -* https://github.com/cosmology-tech/cosmos-kit +* https://github.com/cosmology-tech/interchain-kit ### Telescope @@ -71,7 +69,7 @@ Checkout these related projects: * [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. * [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. * [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. -* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. +* [interchain-kit](https://github.com/cosmology-tech/interchain-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. * [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command. * [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. * [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain. diff --git a/examples/injective/api/apr.ts b/examples/injective/api/apr.ts deleted file mode 100644 index 467d538fd..000000000 --- a/examples/injective/api/apr.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { handleError } from './tokens'; - -export const getSuperfluidApr = async (): Promise => { - const url = 'https://api-osmosis.imperator.co/apr/v2/all'; - return fetch(url) - .then(handleError) - .then((res) => res.json()) - .then((res) => { - const superfluidApr = res - .find((apr: { apr_list: any[] }) => - apr.apr_list.find((a) => a.symbol === 'ECH') - ) - .apr_list.find( - (a: { symbol: string }) => a.symbol === 'ECH' - ).apr_superfluid; - - return superfluidApr; - }); -}; diff --git a/examples/injective/api/fees.ts b/examples/injective/api/fees.ts deleted file mode 100644 index d3755a738..000000000 --- a/examples/injective/api/fees.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { handleError } from './tokens'; - -export type Fee = { - pool_id: string; - volume_24h: number; - volume_7d: number; - fees_spent_24h: number; - fees_spent_7d: number; - fees_percentage: string; -}; - -export const getFees = async (): Promise => { - const url = 'https://api-osmosis.imperator.co/fees/v1/pools'; - return fetch(url) - .then(handleError) - .then((res) => res.json()) - .then((res) => res.data); -}; diff --git a/examples/injective/api/index.ts b/examples/injective/api/index.ts deleted file mode 100644 index 521e52804..000000000 --- a/examples/injective/api/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './apr'; -export * from './fees'; -export * from './tokens'; -export * from './prices'; -export * from './rewards'; diff --git a/examples/injective/api/prices.ts b/examples/injective/api/prices.ts deleted file mode 100644 index 3a1828332..000000000 --- a/examples/injective/api/prices.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { handleError } from './tokens'; - -type CoinGeckoId = string; -type CoinGeckoUSD = { usd: number }; -type CoinGeckoUSDResponse = Record; - -export const getPrices = async ( - geckoIds: string[] -): Promise => { - const url = `https://api.coingecko.com/api/v3/simple/price?ids=${geckoIds.join()}&vs_currencies=usd`; - - return fetch(url) - .then(handleError) - .then((res) => res.json()); -}; diff --git a/examples/injective/api/rewards.ts b/examples/injective/api/rewards.ts deleted file mode 100644 index 444c1744d..000000000 --- a/examples/injective/api/rewards.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { handleError } from './tokens'; - -type PoolReward = { - day_usd: number; - month_usd: number; - year_usd: number; -}; - -type Rewards = { - pools: { - [key: number]: PoolReward; - }; - total_day_usd: number; - total_month_usd: number; - total_year_usd: number; -}; - -export const getRewards = async (address: string): Promise => { - const url = `https://api-osmosis-chain.imperator.co/lp/v1/rewards/estimation/${address}`; - return fetch(url) - .then(handleError) - .then((res) => res.json()); -}; diff --git a/examples/injective/api/tokens.ts b/examples/injective/api/tokens.ts deleted file mode 100644 index de31cb9b9..000000000 --- a/examples/injective/api/tokens.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type Token = { - price: number; - denom: string; - symbol: string; - liquidity: number; - volume_24h: number; - volume_24h_change: number; - name: string; - price_24h_change: number; - price_7d_change: number; - exponent: number; - display: string; -}; - -export const handleError = (resp: Response) => { - if (!resp.ok) throw Error(resp.statusText); - return resp; -}; - -export const getTokens = async (): Promise => { - const url = 'https://api-osmosis.imperator.co/tokens/v2/all'; - return fetch(url) - .then(handleError) - .then((res) => res.json()); -}; diff --git a/examples/injective/components/Main.tsx b/examples/injective/components/Main.tsx new file mode 100644 index 000000000..56803830a --- /dev/null +++ b/examples/injective/components/Main.tsx @@ -0,0 +1,23 @@ +import { Box, Text } from '@interchain-ui/react'; +import { useChain } from "@interchain-kit/react"; +import { defaultChainName } from "@/config"; +import { WalletState } from '@interchain-kit/core' +import dynamic from 'next/dynamic'; + +const SendMsg = dynamic(() => import('./SendMsg'), { + ssr: false, +}); + +export function Main() { + const { status } = useChain(defaultChainName); + + return ( + status === WalletState.Connected ? + : + + + Please connect to your wallet. + + + ); +} \ No newline at end of file diff --git a/examples/injective/components/SendMsg.tsx b/examples/injective/components/SendMsg.tsx new file mode 100644 index 000000000..d2ebbc890 --- /dev/null +++ b/examples/injective/components/SendMsg.tsx @@ -0,0 +1,105 @@ +import { Box, Text, Button, Link } from "@interchain-ui/react"; +import { useState } from "react"; +import { useChain } from "@interchain-kit/react"; +import { defaultAssetList, defaultChain, defaultChainName } from "@/config"; +import useBalance from "@/hooks/useBalance"; +import { toEncoders, toConverters } from '@interchainjs/cosmos/utils'; +import { MsgSend } from '@interchainjs/cosmos-types/cosmos/bank/v1beta1/tx'; +import { cosmos } from '../src/codegen'; + +export default function SendMsg() { + const coin = defaultAssetList?.assets[0]; + + const denom = coin!.base! + + const COIN_DISPLAY_EXPONENT = coin!.denomUnits.find( + (unit) => unit.denom === coin!.display + )?.exponent as number; + + const chain = defaultChain + const txPage = chain?.explorers?.[0].txPage + + const { address, signingClient, isLoading } = useChain(defaultChainName); + signingClient?.addEncoders(toEncoders(MsgSend)); + signingClient?.addConverters(toConverters(MsgSend)); + + const [sending, setSending] = useState(false); + const [txHash, setTxHash] = useState(null); + const [error, setError] = useState(null); + + const { + balance, + isBalanceLoaded, + isFetchingBalance, + refetchBalance, + } = useBalance({ + address, + }) + + const handleSend = async () => { + if (sending || isLoading) return; + + setError(null); + setTxHash(null); + setSending(true); + + const fee = { + amount: [{ + denom, + amount: '2500', + }], + gas: "1000000", + }; + const { send } = cosmos.bank.v1beta1.MessageComposer.withTypeUrl + const msgs = [send({ + fromAddress: address, + toAddress: address, + amount: [{ denom, amount: '1' }] + })] + try { + const data = await signingClient.signAndBroadcast( + address, msgs, fee, 'using interchainjs' + ) as any + console.log('onSuccess', data) + if (data.code===0) { + setTimeout(() => { + refetchBalance() + setTxHash(data.hash); + setSending(false); + }, 4000) + } else { + setError(data.rawLog||JSON.stringify(data||{})); + setSending(false); + } + } catch (error:any) { + console.log('onError', error) + setError(error?.message || 'Unknown error'); + setSending(false); + } + } + + return ( + + + Balance: {isFetchingBalance?'--':(balance?.toFixed(COIN_DISPLAY_EXPONENT))} {coin?.symbol} + + + + + {txHash && + Details: + + {txPage?.replace('${txHash}', txHash)!} + + } + {error && + Error: + {error} + } + + ); +} \ No newline at end of file diff --git a/examples/injective/components/card.tsx b/examples/injective/components/card.tsx deleted file mode 100644 index 4d3716147..000000000 --- a/examples/injective/components/card.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { useChain } from "@cosmos-kit/react"; -import { - Box, - GridItem, - Icon, - Stack, - useColorModeValue, -} from "@chakra-ui/react"; -import { MouseEventHandler, useEffect } from "react"; -import { FiAlertTriangle } from "react-icons/fi"; -import { - Astronaut, - Error, - Connected, - ConnectedShowAddress, - ConnectedUserInfo, - Connecting, - ConnectStatusWarn, - CopyAddressBtn, - Disconnected, - NotExist, - Rejected, - RejectedWarn, - WalletConnectComponent, -} from "."; - -export const WalletCardSection = ({ chainName }: { chainName: string }) => { - const { connect, openView, status, username, address, message, wallet } = - useChain(chainName); - - // Events - const onClickConnect: MouseEventHandler = async (e) => { - e.preventDefault(); - await connect(); - }; - - const onClickOpenView: MouseEventHandler = (e) => { - e.preventDefault(); - openView(); - }; - - // Components - const connectWalletButton = ( - - } - connecting={} - connected={ - - } - rejected={} - error={} - notExist={ - - } - /> - ); - - const connectWalletWarn = ( - } - wordOfWarning={`${wallet?.prettyName}: ${message}`} - /> - } - error={ - } - wordOfWarning={`${wallet?.prettyName}: ${message}`} - /> - } - /> - ); - - const userInfo = username && ( - } /> - ); - const addressBtn = ( - } - /> - ); - - return ( - <> - {connectWalletWarn && {connectWalletWarn}} - - - {userInfo} - {addressBtn} - - {connectWalletButton} - - - - - ); -}; diff --git a/examples/injective/components/common/Footer.tsx b/examples/injective/components/common/Footer.tsx new file mode 100644 index 000000000..abdb60da5 --- /dev/null +++ b/examples/injective/components/common/Footer.tsx @@ -0,0 +1,141 @@ +import { Box, Link, Text, Icon, Stack, Divider, useColorModeValue } from '@interchain-ui/react'; +import { dependencies, products, Project } from '@/config'; + +function Product({ name, desc, link }: Project) { + return ( + + + + {name} → + + + {desc} + + + + ); +} + +function Dependency({ name, desc, link }: Project) { + return ( + + + + + + + + + {name} + + + {desc} + + + + + ); +} + +export function Footer() { + return ( + <> + + {products.map((product) => ( + + ))} + + + {dependencies.map((dependency) => ( + + ))} + + + + + + Built with + + Cosmology + + + + ); +} \ No newline at end of file diff --git a/examples/injective/components/common/Header.tsx b/examples/injective/components/common/Header.tsx new file mode 100644 index 000000000..b036a25e1 --- /dev/null +++ b/examples/injective/components/common/Header.tsx @@ -0,0 +1,72 @@ +import { Link, Box, Button, Icon, Text, useTheme, useColorModeValue } from '@interchain-ui/react'; +import { dependencies } from '@/config'; + +const stacks = ['Interchain Kit', 'Next.js']; + +const dependency = dependencies[0]; + +export function Header() { + const { theme, setTheme } = useTheme(); + + const toggleColorMode = () => { + setTheme(theme === 'light' ? 'dark' : 'light'); + }; + + return ( + <> + + + + + + + Interchain + + + + Welcome to  + + + {stacks.join(' + ')} + {' + '} + + + {dependency.name} + + + + + + ); +} \ No newline at end of file diff --git a/examples/injective/components/common/Layout.tsx b/examples/injective/components/common/Layout.tsx new file mode 100644 index 000000000..af6777c01 --- /dev/null +++ b/examples/injective/components/common/Layout.tsx @@ -0,0 +1,20 @@ +import Head from 'next/head'; +import { Toaster, Container } from '@interchain-ui/react'; +import { Header } from './Header'; +import { Footer } from './Footer'; + +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + Interchain-Kit Demo + + + +
+ {children} + +