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

feature: change jsdjs to hyperwebjs #20

Merged
merged 2 commits into from
Oct 9, 2024
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ The test suite deploys the contracts, interacts with them, and validates state t

### Creating JSD Client

Once the contract is bundled, you need to create a client using `jsdjs` to interact with the Hyperweb chain.
Once the contract is bundled, you need to create a client using `hyperwebjs` to interact with the Hyperweb chain.

Example setup to create a `jsdjs` client:
Example setup to create a `hyperwebjs` client:

```ts
import { getSigningJsdClient, jsd } from 'jsdjs';
import { getSigningJsdClient, jsd } from 'hyperwebjs';

async function setupClient() {
const wallet = await DirectSecp256k1HdWallet.fromMnemonic("your-mnemonic");
Expand All @@ -121,7 +121,7 @@ async function setupClient() {

### Deploying and Interacting with the Contract

To deploy and instantiate the contract on the Hyperweb blockchain, read the bundled contract file and use the `jsdjs` client to broadcast it to the chain.
To deploy and instantiate the contract on the Hyperweb blockchain, read the bundled contract file and use the `hyperwebjs` client to broadcast it to the chain.

Example deployment process:

Expand All @@ -146,7 +146,7 @@ async function deployContract(signingClient, address) {

### Instantiating a Contract

To instantiate the contract, use the `instantiate` method of the `jsdjs` client. The contract index will be returned, which is used to interact with the contract.
To instantiate the contract, use the `instantiate` method of the `hyperwebjs` client. The contract index will be returned, which is used to interact with the contract.

```ts
const contractCode = fs.readFileSync('dist/contracts/bundle1.js', 'utf8');
Expand Down
2 changes: 1 addition & 1 deletion __tests__/contract1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { assertIsDeliverTxSuccess } from '@cosmjs/stargate';

import path from "path";
import fs from 'fs';
import { getSigningJsdClient, jsd } from 'jsdjs'
import { getSigningJsdClient, jsd } from 'hyperwebjs'
import { useChain, generateMnemonic } from 'starshipjs';
import { sleep } from '../test-utils/sleep';
import './setup.test';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/contract2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { assertIsDeliverTxSuccess } from '@cosmjs/stargate';

import path from "path";
import fs from 'fs';
import { getSigningJsdClient, jsd } from 'jsdjs'
import { getSigningJsdClient, jsd } from 'hyperwebjs'
import { useChain, generateMnemonic } from 'starshipjs';
import { sleep } from '../test-utils/sleep';
import './setup.test';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"jest": "^29.6.2",
"jsdjs": "1.5.0",
"hyperwebjs": "0.0.4",
"prettier": "^3.0.2",
"rimraf": "4.4.1",
"starshipjs": "^2.4.1",
Expand Down
Loading
Loading