Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add stone-12-1 to main #661

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- [#661](https://github.com/alleslabs/celatone-frontend/pull/661) Add stone-12-1 network
- [#642](https://github.com/alleslabs/celatone-frontend/pull/642) Add stone-12 network
- [#629](https://github.com/alleslabs/celatone-frontend/pull/629) Add Amplitude for save account,to save code page count, and to save
- [#628](https://github.com/alleslabs/celatone-frontend/pull/628) Add Amplitude for contract states, pagination and contract details
Expand Down
62 changes: 7 additions & 55 deletions src/config/chain/initia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,13 @@ import { wallets as keplrWallets } from "@cosmos-kit/keplr";
import type { ChainConfigs } from "./types";

export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
"stone-11": {
"stone-12-1": {
chain: "initia",
registryChainName: "initiatestnet11",
prettyName: "Initia Testnet 11",
lcd: "https://stone-rest.initia.tech",
rpc: "https://stone-rpc.initia.tech:443",
indexer: "https://stone-11-graphql.alleslabs.dev/v1/graphql",
api: "https://celatone-api.alleslabs.dev",
wallets: [...keplrWallets],
features: {
faucet: {
enabled: true,
url: process.env.NEXT_PUBLIC_INITIA_TESTNET_FAUCET_URL ?? "",
},
wasm: {
enabled: false,
},
move: {
enabled: true,
moduleMaxFileSize: 1_048_576,
decodeApi: "https://initia-api-jiod42ec2q-as.a.run.app/decode_module",
},
pool: {
enabled: false,
},
publicProject: {
enabled: true,
},
gov: {
enabled: true,
},
nft: {
enabled: true,
},
},
gas: {
gasPrice: {
tokenPerGas: 0.151,
denom: "uinit",
},
gasAdjustment: 1.5,
maxGasLimit: 25_000_000,
},
explorerLink: {
validator: "https://app.initia.tech/validator",
proposal: "https://app.initia.tech/proposal",
},
extra: {},
},
"stone-12": {
chain: "initia",
registryChainName: "initiatestnet12",
prettyName: "Initia Testnet 12",
lcd: "https://stone-12-rest.initia.tech",
rpc: "https://stone-12-rpc.initia.tech:443",
indexer: "https://stone-12-graphql.alleslabs.dev/v1/graphql",
registryChainName: "initiatestnet12-1",
prettyName: "Initia Testnet 12-1",
lcd: "https://next-stone-rest.initia.tech",
rpc: "https://next-stone-rpc.initia.tech:443",
indexer: "https://stone-12-1-graphql.alleslabs.dev/v1/graphql",
api: "https://celatone-api.alleslabs.dev",
wallets: [...keplrWallets],
features: {
Expand All @@ -82,6 +33,7 @@ export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
},
gov: {
enabled: true,
hideOpenProposal: true,
},
nft: {
enabled: true,
Expand Down
82 changes: 6 additions & 76 deletions src/lib/chain-registry/initiatestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type { AssetList, Chain } from "@chain-registry/types";
export const initiatestnet: Chain[] = [
{
$schema: "../chain.schema.json",
chain_name: "initiatestnet11",
chain_name: "initiatestnet12-1",
status: "live",
network_type: "testnet",
pretty_name: "Initia Testnet 11",
chain_id: "stone-11",
pretty_name: "Initia Testnet 12-1",
chain_id: "stone-12-1",
bech32_prefix: "init",
daemon_name: "initiad",
node_home: "$HOME/.init",
Expand Down Expand Up @@ -38,59 +38,12 @@ export const initiatestnet: Chain[] = [
apis: {
rpc: [
{
address: "https://stone-rpc.initia.tech:443",
address: "https://next-stone-rpc.initia.tech:443",
},
],
rest: [
{
address: "https://stone-rest.initia.tech",
},
],
},
},
{
$schema: "../chain.schema.json",
chain_name: "initiatestnet12",
status: "live",
network_type: "testnet",
pretty_name: "Initia Testnet 12",
chain_id: "stone-12",
bech32_prefix: "init",
daemon_name: "initiad",
node_home: "$HOME/.init",
key_algos: ["secp256k1"],
slip44: 118,
fees: {
fee_tokens: [
{
denom: "uinit",
fixed_min_gas_price: 0,
low_gas_price: 0.151,
average_gas_price: 0.151,
high_gas_price: 0.151,
},
],
},
staking: {
staking_tokens: [
{
denom: "uinit",
},
],
},
logo_URIs: {
png: "",
svg: "",
},
apis: {
rpc: [
{
address: "https://stone-12-rpc.initia.tech:443",
},
],
rest: [
{
address: "https://stone-12-rest.initia.tech",
address: "https://next-stone-rest.initia.tech",
},
],
},
Expand All @@ -100,30 +53,7 @@ export const initiatestnet: Chain[] = [
export const initiatestnetAssets: AssetList[] = [
{
$schema: "../assetlist.schema.json",
chain_name: "initiatestnet11",
assets: [
{
description: "The native staking token of Initia.",
denom_units: [
{
denom: "uinit",
exponent: 0,
},
{
denom: "init",
exponent: 6,
},
],
base: "uinit",
name: "Init",
display: "init",
symbol: "INIT",
},
],
},
{
$schema: "../assetlist.schema.json",
chain_name: "initiatestnet12",
chain_name: "initiatestnet12-1",
assets: [
{
description: "The native staking token of Initia.",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/services/poolService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const indexPairResponse = (res: string): PairResponse[] => {

export const useLPShareInfo = () => {
const { data: moduleData } = useAccountModules({
address: "0xa36bd0a54fad4bd931c4c00e3e74815f99a6c6b4" as HexAddr,
address: "0x38d2a65b2be5d2c1b9f329f5b45f708c7b7d9cf5" as HexAddr,
moduleName: "PoolInfo",
functionName: "get_all_pair_infos",
options: { refetchOnWindowFocus: false, staleTime: Infinity },
Expand Down