Skip to content

Commit

Permalink
Merge pull request #677 from alleslabs/feat/minitias
Browse files Browse the repository at this point in the history
Feat/minitias
  • Loading branch information
songwongtp committed Dec 20, 2023
2 parents 2b5090d + 33fd5c3 commit 7889b80
Show file tree
Hide file tree
Showing 40 changed files with 1,382 additions and 1,858 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- [#677](https://github.com/alleslabs/celatone-frontend/pull/677) Add minimove-1 and miniwasm-1
- [#676](https://github.com/alleslabs/celatone-frontend/pull/676) New error fetching image & refactor empty states
- [#666](https://github.com/alleslabs/celatone-frontend/pull/666) Add my published modules page
- [#671](https://github.com/alleslabs/celatone-frontend/pull/671) Add mahalo-1
Expand Down
103 changes: 101 additions & 2 deletions src/config/chain/initia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { wallets as keplrWallets } from "@cosmos-kit/keplr";

import type { ChainConfigs } from "./types";

const INITIA_DECODER =
"https://initia-api-jiod42ec2q-as.a.run.app/decode_module";

export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
"mahalo-1": {
chain: "initia",
Expand All @@ -22,7 +25,7 @@ export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
move: {
enabled: true,
moduleMaxFileSize: 1_048_576,
decodeApi: "https://initia-api-jiod42ec2q-as.a.run.app/decode_module",
decodeApi: INITIA_DECODER,
},
pool: {
enabled: false,
Expand Down Expand Up @@ -52,6 +55,102 @@ export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
},
extra: {},
},
"minimove-1": {
chain: "initia",
registryChainName: "minitiamovedevnet1",
prettyName: "Minitia Move Devnet 1",
lcd: "https://lcd.minimove-1.initia.xyz",
rpc: "https://rpc.minimove-1.initia.xyz:443",
indexer: "https://minimove-1-graphql.alleslabs.dev/v1/graphql",
wallets: [...keplrWallets],
features: {
faucet: {
enabled: false,
},
wasm: {
enabled: false,
},
move: {
enabled: true,
moduleMaxFileSize: 1_048_576,
decodeApi: INITIA_DECODER,
},
pool: {
enabled: false,
},
publicProject: {
enabled: true,
},
gov: {
enabled: false,
},
nft: {
enabled: true,
},
},
gas: {
gasPrice: {
tokenPerGas: 0.151,
denom: "umin",
},
gasAdjustment: 1.5,
maxGasLimit: 25_000_000,
},
explorerLink: {
validator:
"https://lcd.minimove-1.initia.xyz/opinit/opchild/v1/validator",
proposal: "",
},
extra: { disableDelegation: true },
},
"miniwasm-1": {
chain: "initia",
registryChainName: "minitiawasmdevnet1",
prettyName: "Minitia Wasm Devnet 1",
lcd: "https://lcd.miniwasm-1.initia.xyz",
rpc: "https://rpc.miniwasm-1.initia.xyz:443",
indexer: "https://miniwasm-1-graphql.alleslabs.dev/v1/graphql",
wallets: [...keplrWallets],
features: {
faucet: {
enabled: false,
},
wasm: {
enabled: true,
storeCodeMaxFileSize: 800_000,
clearAdminGas: 50_000,
},
move: {
enabled: false,
},
pool: {
enabled: false,
},
publicProject: {
enabled: true,
},
gov: {
enabled: false,
},
nft: {
enabled: true,
},
},
gas: {
gasPrice: {
tokenPerGas: 0.151,
denom: "umin",
},
gasAdjustment: 1.5,
maxGasLimit: 25_000_000,
},
explorerLink: {
validator:
"https://lcd.miniwasm-1.initia.xyz/opinit/opchild/v1/validator",
proposal: "",
},
extra: { disableDelegation: true },
},
"stone-12-1": {
chain: "initia",
registryChainName: "initiatestnet12-1",
Expand All @@ -71,7 +170,7 @@ export const INITIA_CHAIN_CONFIGS: ChainConfigs = {
move: {
enabled: true,
moduleMaxFileSize: 1_048_576,
decodeApi: "https://initia-api-jiod42ec2q-as.a.run.app/decode_module",
decodeApi: INITIA_DECODER,
},
pool: {
enabled: false,
Expand Down
6 changes: 5 additions & 1 deletion src/config/chain/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ type WasmConfig =
};

type MoveConfig =
| { enabled: true; moduleMaxFileSize: number; decodeApi: string }
| {
enabled: true;
moduleMaxFileSize: number;
decodeApi: string;
}
| { enabled: false };

type PoolConfig =
Expand Down
145 changes: 139 additions & 6 deletions src/lib/chain-registry/initiatestnet.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import type { AssetList, Chain } from "@chain-registry/types";

const CHAIN_SCHEMA = "../chain.schema.json";
const NODE_HOME = "$HOME/.init";

export const initiatestnet: Chain[] = [
{
$schema: "../chain.schema.json",
$schema: CHAIN_SCHEMA,
chain_name: "initiadevnet1",
status: "live",
network_type: "devnet",
pretty_name: "Initia Devnet 1",
chain_id: "mahalo-1",
bech32_prefix: "init",
daemon_name: "initiad",
node_home: "$HOME/.init",
node_home: NODE_HOME,
key_algos: ["secp256k1"],
slip44: 118,
fees: {
Expand Down Expand Up @@ -49,15 +52,97 @@ export const initiatestnet: Chain[] = [
},
},
{
$schema: "../chain.schema.json",
$schema: CHAIN_SCHEMA,
chain_name: "minitiamovedevnet1",
status: "live",
network_type: "devnet",
pretty_name: "Minitia Move Devnet 1",
chain_id: "minimove-1",
bech32_prefix: "init",
daemon_name: "minitiad",
node_home: NODE_HOME,
key_algos: ["secp256k1"],
slip44: 118,
fees: {
fee_tokens: [
{
denom: "umin",
fixed_min_gas_price: 0,
low_gas_price: 0.151,
average_gas_price: 0.151,
high_gas_price: 0.151,
},
],
},
staking: undefined,
logo_URIs: {
png: "",
svg: "",
},
apis: {
rpc: [
{
address: "https://rpc.minimove-1.initia.xyz:443",
},
],
rest: [
{
address: "https://lcd.minimove-1.initia.xyz",
},
],
},
},
{
$schema: CHAIN_SCHEMA,
chain_name: "minitiawasmdevnet1",
status: "live",
network_type: "devnet",
pretty_name: "Minitia Wasm Devnet 1",
chain_id: "miniwasm-1",
bech32_prefix: "init",
daemon_name: "minitiad",
node_home: NODE_HOME,
key_algos: ["secp256k1"],
slip44: 118,
fees: {
fee_tokens: [
{
denom: "umin",
fixed_min_gas_price: 0,
low_gas_price: 0.151,
average_gas_price: 0.151,
high_gas_price: 0.151,
},
],
},
staking: undefined,
logo_URIs: {
png: "",
svg: "",
},
apis: {
rpc: [
{
address: "https://rpc.miniwasm-1.initia.xyz:443",
},
],
rest: [
{
address: "https://lcd.miniwasm-1.initia.xyz",
},
],
},
},
{
$schema: CHAIN_SCHEMA,
chain_name: "initiatestnet12-1",
status: "live",
network_type: "testnet",
pretty_name: "Initia Testnet 12-1",
chain_id: "stone-12-1",
bech32_prefix: "init",
daemon_name: "initiad",
node_home: "$HOME/.init",
node_home: NODE_HOME,
key_algos: ["secp256k1"],
slip44: 118,
fees: {
Expand Down Expand Up @@ -97,9 +182,11 @@ export const initiatestnet: Chain[] = [
},
];

const ASSETLIST_SCHEMA = "../assetlist.schema.json";

export const initiatestnetAssets: AssetList[] = [
{
$schema: "../assetlist.schema.json",
$schema: ASSETLIST_SCHEMA,
chain_name: "initiadevnet1",
assets: [
{
Expand All @@ -122,7 +209,53 @@ export const initiatestnetAssets: AssetList[] = [
],
},
{
$schema: "../assetlist.schema.json",
$schema: ASSETLIST_SCHEMA,
chain_name: "minitiamovedevnet1",
assets: [
{
description: "The native staking token of Minitia.",
denom_units: [
{
denom: "umin",
exponent: 0,
},
{
denom: "min",
exponent: 6,
},
],
base: "umin",
name: "Min",
display: "min",
symbol: "MIN",
},
],
},
{
$schema: ASSETLIST_SCHEMA,
chain_name: "minitiawasmdevnet1",
assets: [
{
description: "The native staking token of Minitia.",
denom_units: [
{
denom: "umin",
exponent: 0,
},
{
denom: "min",
exponent: 6,
},
],
base: "umin",
name: "Min",
display: "min",
symbol: "MIN",
},
],
},
{
$schema: ASSETLIST_SCHEMA,
chain_name: "initiatestnet12-1",
assets: [
{
Expand Down
30 changes: 5 additions & 25 deletions src/lib/components/table/modules/ModulesTableMobileCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Flex, Text } from "@chakra-ui/react";
import { Box, Flex, Text } from "@chakra-ui/react";

import { MobileCardTemplate } from "../MobileCardTemplate";
import { MobileLabel } from "../MobileLabel";
Expand Down Expand Up @@ -36,30 +36,10 @@ export const ModulesTableMobileCard = ({
})
}
topContent={
<Flex w="100%" justifyContent="space-between">
<Box>
<MobileLabel label="Module Path" />
<ModulePathLink hexAddr={hex} moduleName={moduleInfo.name} />
</Box>

<Button
variant="outline-white"
size="sm"
onClick={(e) => {
e.stopPropagation();
navigate({
pathname: "/interact",
query: {
address: hex,
moduleName: moduleInfo.name,
functionType: "view",
},
});
}}
>
View
</Button>
</Flex>
<Box>
<MobileLabel label="Module Path" />
<ModulePathLink hexAddr={hex} moduleName={moduleInfo.name} />
</Box>
}
middleContent={
<Flex direction="column" gap={3}>
Expand Down
Loading

2 comments on commit 7889b80

@vercel
Copy link

@vercel vercel bot commented on 7889b80 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7889b80 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.