hyperweb-io / hyperweb-io/create-cosmos-app

Add a template for Juno localnet

Open
#66 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
166
Forks
53
PR merge metrics
No merged PRs in 30d

Description

This issue proposes to add a template `--template juno-localnet` that allows creating the app configured to use a Juno localnet exposed with the command:
```
docker run -it \
--name juno_node_1 \
-p 1317:1317 \
-p 26656:26656 \
-p 26657:26657 \
-e STAKE_TOKEN=ujunox \
-e UNSAFE_CORS=true \
ghcr.io/cosmoscontracts/juno:v11.0.0 \
./setup_and_run.sh juno16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y
```

### Proposed solution

The template would contain under `config/localnet.ts` the configuration of the chain:
```
import { Chain } from "@chain-registry/types";

export const localnet: Chain = {
chain_name: "localnet",
status: "live",
network_type: "testnet",
pretty_name: "Localnet",
chain_id: "testing",
bech32_prefix: "juno",
slip44: 118,
fees: {
fee_tokens: [
{
denom: "ujunox",
fixed_min_gas_price: 0.0025,
low_gas_price: 0.03,
average_gas_price: 0.04,
high_gas_price: 0.05,
},
],
},
staking: {
staking_tokens: [
{
denom: "ujunox",
},
],
},
};
```

`_app.tsx` includes the localnet:

```
function CreateCosmosApp({ Component, pageProps }: AppProps) {
const signerOptions: SignerOptions = {
signingCosmwasm: (chain: Chain) => {
switch (chain.chain_name) {
case "localnet":
return {
gasPrice: GasPrice.fromString("0.025ujunox"),
};
}
},
};

return (

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.