Skip to content

Commit

Permalink
chore: update guides
Browse files Browse the repository at this point in the history
  • Loading branch information
badurinantun committed Jul 19, 2022
1 parent 7de58aa commit 4e33f86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 1 addition & 8 deletions www/guides/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,9 @@ Wait for the deployment transaction to be accepted and assign the address of the

```javascript
await defaultProvider.waitForTransaction(accountResponse.transaction_hash);
const accountContract = new Contract(
compiledAccount.abi,
accountResponse.address
);
const initializeResponse = await accountContract.initialize(starkKeyPub, "0");

await defaultProvider.waitForTransaction(initializeResponse.transaction_hash);
```

Once account contract is initialized [Account](../docs/API/account.md) instance can be created. Use your new account instance to sign transactions, messages or verify signatures!
Once account contract is deployed [Account](../docs/API/account.md) instance can be created. Use your new account instance to sign transactions, messages or verify signatures! Make sure your Account has enough funds to execute invocations.

```js
const account = new Account(
Expand Down
3 changes: 3 additions & 0 deletions www/guides/erc20.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ const erc20 = new Contract(compiledErc20.abi, erc20Address);
Make sure you created the `Account` instance following the [Creating an Account](./account.md) guide.

```javascript
erc20.connect(account);

const { transaction_hash: mintTxHash } = await erc20.mint(
account.address,
"1000"
);

console.log(`Waiting for Tx to be Accepted on Starknet - Minting...`);
await defaultProvider.waitForTransaction(mintTxHash);
```
Expand Down

0 comments on commit 4e33f86

Please sign in to comment.