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

Cosmjs removal #1

Merged
merged 12 commits into from
Jan 18, 2025
20 changes: 10 additions & 10 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -28,62 +28,62 @@ jobs:

- name: asset-list
run: |
cca --example asset-list --name asset-list
cia --example asset-list --name asset-list
cd asset-list
yarn build

- name: vote-proposal
run: |
cca --example vote-proposal --name vote-proposal
cia --example vote-proposal --name vote-proposal
cd vote-proposal
yarn build

- name: ibc-transfer
run: |
cca --example ibc-transfer --name ibc-transfer
cia --example ibc-transfer --name ibc-transfer
cd ibc-transfer
yarn build

- name: swap-tokens
run: |
cca --example swap-tokens --name swap-tokens
cia --example swap-tokens --name swap-tokens
cd swap-tokens
yarn build

- name: provide-liquidity
run: |
cca --example provide-liquidity --name provide-liquidity
cia --example provide-liquidity --name provide-liquidity
cd provide-liquidity
yarn build

- name: nft
run: |
cca --example nft --name nft
cia --example nft --name nft
cd nft
touch yarn.lock
yarn install
yarn build

- name: authz
run: |
cca --example authz --name authz
cia --example authz --name authz
cd authz
yarn build

- name: connect-chain
run: |
cca --template connect-chain --name connect-chain
cia --template connect-chain --name connect-chain
cd connect-chain
yarn build

- name: connect-multi-chain
run: |
cca --template connect-multi-chain --name connect-multi-chain
cia --template connect-multi-chain --name connect-multi-chain
cd connect-multi-chain
yarn build

- name: website
run: |
cca --boilerplate website --name website
cia --boilerplate website --name website
cd website
yarn build
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ npm install -g create-interchain-app
Then, create your new Cosmos app by running the following command:

```sh
# you can also use `cca` instead of `create-interchain-app` for shortcut ;)
# you can also use `cia` instead of `create-interchain-app` for shortcut ;)
create-interchain-app
```

@@ -86,10 +86,10 @@ Then run the command:
create-interchain-app
```

we also made an alias `cca` if you don't want to type `create-interchain-app`:
we also made an alias `cia` if you don't want to type `create-interchain-app`:

```sh
cca
cia
```

### npx
@@ -115,19 +115,19 @@ yarn create cosmos-app
The `create-interchain-app` tool provides a range of examples to help you understand and test various features and integrations. By executing the examples, you can quickly see how to implement specific functionalities in your Cosmos app.

```
cca --example
cia --example
```

If you know the example name, you can do

```
cca --example <example-name>
cia --example <example-name>
```

Alternatively, you can use the shorthand `-e` flag to achieve the same:

```
cca -e <example-name>
cia -e <example-name>
```

This command will generate a new project configured with the selected example, allowing you to dive into the code and functionality right away.
@@ -142,7 +142,7 @@ Initiate and manage staking operations directly within your application, allowin


```
cca --name stake-example --example stake-tokens
cia --name stake-example --example stake-tokens
```

### Vote Proposal
@@ -154,7 +154,7 @@ cca --name stake-example --example stake-tokens
Facilitate on-chain governance by enabling users to vote on proposals, enhancing community engagement and decision-making.

```
cca --name vote-example --example vote-proposal
cia --name vote-example --example vote-proposal
```

### Authz
@@ -166,7 +166,7 @@ cca --name vote-example --example vote-proposal
Leverage the Authz module to grant and manage authorizations, allowing users to perform actions on behalf of others.

```
cca --name authz-example --example authz
cia --name authz-example --example authz
```

### grpc-web and grpc-gateway
@@ -178,7 +178,7 @@ cca --name authz-example --example authz
Integrate gRPC-web and gRPC-gateway in your app for robust and efficient communication between your Cosmos SDK blockchain and web clients.

```
cca --name grpc-example --example grpc-web-grpc-gateway
cia --name grpc-example --example grpc-web-grpc-gateway
```

### Swap Tokens
@@ -190,7 +190,7 @@ cca --name grpc-example --example grpc-web-grpc-gateway
Utilize [osmojs](https://github.com/osmosis-labs/osmojs) for streamlined token swapping capabilities within your Osmosis app.

```
cca --name swap-example --example swap-tokens
cia --name swap-example --example swap-tokens
```

### Provide Liquidity
@@ -202,7 +202,7 @@ cca --name swap-example --example swap-tokens
Use [osmojs](https://github.com/osmosis-labs/osmojs) to enable liquidity provision features, enhancing the DeFi experience in your app.

```
cca --name liquidity-example --example provide-liquidity
cia --name liquidity-example --example provide-liquidity
```

### Asset List
@@ -214,7 +214,7 @@ cca --name liquidity-example --example provide-liquidity
Create and manage an asset list, offering comprehensive insights into the available assets, and empower your application with Inter-Blockchain Communication (IBC) capabilities for transferring tokens across different chains.

```
cca --name asset-list-example --example asset-list
cia --name asset-list-example --example asset-list
```

### NFT
@@ -226,14 +226,14 @@ cca --name asset-list-example --example asset-list
Incorporate NFT functionalities into your Stargaze app using [stargazejs](https://github.com/cosmology-tech/stargazejs), enabling seamless NFT minting, transfer, and management.

```
cca --name nft-example --example nft
cia --name nft-example --example nft
```

## Options

| Argument | Description | Default |
|----------------------|------------------------------------------------|------------|
| `--repo` | Set custom repository for cca templates | None |
| `--repo` | Set custom repository for cia templates | None |
| `--install` | Automatically install dependencies | `true` |
| `--printCmd` | Print the command to run after setup | `true` |
| `-n`, `--name` | Provide a project name | None |
30 changes: 15 additions & 15 deletions packages/create-cosmos-app/README.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ npm install -g create-interchain-app
Then, create your new Cosmos app by running the following command:

```sh
# you can also use `cca` instead of `create-interchain-app` for shortcut ;)
# you can also use `cia` instead of `create-interchain-app` for shortcut ;)
create-interchain-app
```

@@ -86,10 +86,10 @@ Then run the command:
create-interchain-app
```

we also made an alias `cca` if you don't want to type `create-interchain-app`:
we also made an alias `cia` if you don't want to type `create-interchain-app`:

```sh
cca
cia
```

### npx
@@ -115,19 +115,19 @@ yarn create cosmos-app
The `create-interchain-app` tool provides a range of examples to help you understand and test various features and integrations. By executing the examples, you can quickly see how to implement specific functionalities in your Cosmos app.

```
cca --example
cia --example
```

If you know the example name, you can do

```
cca --example <example-name>
cia --example <example-name>
```

Alternatively, you can use the shorthand `-e` flag to achieve the same:

```
cca -e <example-name>
cia -e <example-name>
```

This command will generate a new project configured with the selected example, allowing you to dive into the code and functionality right away.
@@ -142,7 +142,7 @@ Initiate and manage staking operations directly within your application, allowin


```
cca --name stake-example --example stake-tokens
cia --name stake-example --example stake-tokens
```

### Vote Proposal
@@ -154,7 +154,7 @@ cca --name stake-example --example stake-tokens
Facilitate on-chain governance by enabling users to vote on proposals, enhancing community engagement and decision-making.

```
cca --name vote-example --example vote-proposal
cia --name vote-example --example vote-proposal
```

### Authz
@@ -166,7 +166,7 @@ cca --name vote-example --example vote-proposal
Leverage the Authz module to grant and manage authorizations, allowing users to perform actions on behalf of others.

```
cca --name authz-example --example authz
cia --name authz-example --example authz
```

### grpc-web and grpc-gateway
@@ -178,7 +178,7 @@ cca --name authz-example --example authz
Integrate gRPC-web and gRPC-gateway in your app for robust and efficient communication between your Cosmos SDK blockchain and web clients.

```
cca --name grpc-example --example grpc-web-grpc-gateway
cia --name grpc-example --example grpc-web-grpc-gateway
```

### Swap Tokens
@@ -190,7 +190,7 @@ cca --name grpc-example --example grpc-web-grpc-gateway
Utilize [osmojs](https://github.com/osmosis-labs/osmojs) for streamlined token swapping capabilities within your Osmosis app.

```
cca --name swap-example --example swap-tokens
cia --name swap-example --example swap-tokens
```

### Provide Liquidity
@@ -202,7 +202,7 @@ cca --name swap-example --example swap-tokens
Use [osmojs](https://github.com/osmosis-labs/osmojs) to enable liquidity provision features, enhancing the DeFi experience in your app.

```
cca --name liquidity-example --example provide-liquidity
cia --name liquidity-example --example provide-liquidity
```

### Asset List
@@ -214,7 +214,7 @@ cca --name liquidity-example --example provide-liquidity
Create and manage an asset list, offering comprehensive insights into the available assets, and empower your application with Inter-Blockchain Communication (IBC) capabilities for transferring tokens across different chains.

```
cca --name asset-list-example --example asset-list
cia --name asset-list-example --example asset-list
```

### NFT
@@ -226,14 +226,14 @@ cca --name asset-list-example --example asset-list
Incorporate NFT functionalities into your Stargaze app using [stargazejs](https://github.com/cosmology-tech/stargazejs), enabling seamless NFT minting, transfer, and management.

```
cca --name nft-example --example nft
cia --name nft-example --example nft
```

## Options

| Argument | Description | Default |
|----------------------|------------------------------------------------|------------|
| `--repo` | Set custom repository for cca templates | None |
| `--repo` | Set custom repository for cia templates | None |
| `--install` | Automatically install dependencies | `true` |
| `--printCmd` | Print the command to run after setup | `true` |
| `-n`, `--name` | Provide a project name | None |
2 changes: 1 addition & 1 deletion packages/create-cosmos-app/package.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"bin": {
"cca": "dist/create-interchain-app.js",
"cia": "dist/create-interchain-app.js",
"create-interchain-app": "dist/create-interchain-app.js"
},
"directories": {
2 changes: 1 addition & 1 deletion packages/create-cosmos-app/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CCA_URL } from "./constants";
import { createGitApp } from "./git-cca-template";
import { createGitApp } from "./git-cia-template";
export const cli = async (argv, version) => {
const repo = argv.repo ?? CCA_URL;
const createCosmosApp = createGitApp(repo, version);
2 changes: 1 addition & 1 deletion packages/create-cosmos-app/src/git-cca-template.ts
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ async function warnIfOutdated(repo, clonedRepoDir, version) {
const rootPkgPath = join(clonedRepoDir, 'packages/create-interchain-app/package.json');
const rootPkg = JSON.parse(fs.readFileSync(rootPkgPath, 'utf-8'));
if (semver.lt(rootPkg.version, version)) {
console.warn(c.yellow(`⚠️ You are using create-interchain-app version ${c.red(rootPkg.version)}, but version ${c.green(version)} is available. Run "${c.cyan('cca upgrade')}" or "${c.cyan('npm install -g create-interchain-app@latest')}" to upgrade.`));
console.warn(c.yellow(`⚠️ You are using create-interchain-app version ${c.red(rootPkg.version)}, but version ${c.green(version)} is available. Run "${c.cyan('cia upgrade')}" or "${c.cyan('npm install -g create-interchain-app@latest')}" to upgrade.`));
}
}
}
2 changes: 1 addition & 1 deletion packages/create-cosmos-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// noop

export * from './git-cca-template';
export * from './git-cia-template';
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
@@ -19460,7 +19460,7 @@ __metadata:
ts-jest: "npm:^29.0.3"
typescript: "npm:^5.1.6"
bin:
cca: dist/create-interchain-app.js
cia: dist/create-interchain-app.js
create-interchain-app: dist/create-interchain-app.js
languageName: unknown
linkType: soft