Skip to content

Commit

Permalink
fix: lib chainid test
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Dec 5, 2022
1 parent 897cd90 commit e820572
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions __tests__/account.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isBN } from 'bn.js';

import typedDataExample from '../__mocks__/typedDataExample.json';
import { Account, Contract, DeployContractPayload, Provider, number, stark } from '../src';
import { Account, Contract, Provider, number, stark } from '../src';
import { feeTransactionVersion } from '../src/utils/hash';
import { hexToDecimalString, toBN } from '../src/utils/number';
import { encodeShortString } from '../src/utils/shortString';
Expand Down Expand Up @@ -169,14 +169,18 @@ describe('deploy and test Wallet', () => {

test('Get the stark name of the account and account from stark name (using starknet.id)', async () => {
// Deploy naming contract
const namingPlayLoad: DeployContractPayload = { contract: compiledNamingContract };
const namingResponse = await provider.deployContract(namingPlayLoad);
const namingAddress = namingResponse.contract_address;
const namingResponse = await account.declareDeploy({
contract: compiledNamingContract,
classHash: '0x3f2f8c80ab2d404bcfb4182e8528708e4efa2c646dd711bdd7b721ecc6111f7',
});
const namingAddress = namingResponse.deploy.contract_address;

// Deploy Starknet id contract
const idPlayLoad: DeployContractPayload = { contract: compiledStarknetId };
const idResponse = await provider.deployContract(idPlayLoad);
const idAddress = idResponse.contract_address;
const idResponse = await account.declareDeploy({
contract: compiledStarknetId,
classHash: '0x1eb5a8308760d82321cb3ee8967581bb1d38348c7d2f082a07580040c52217c',
});
const idAddress = idResponse.deploy.contract_address;

const { transaction_hash } = await account.execute([
{
Expand Down

0 comments on commit e820572

Please sign in to comment.