Skip to content

Commit

Permalink
feat: rpc 0.6 implementation as superset of 0.5 tx
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Nov 25, 2023
1 parent ac8c763 commit 5b2b299
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 638 deletions.
5 changes: 2 additions & 3 deletions __tests__/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Account,
Contract,
DeclareDeployUDCResponse,
DeployTransactionReceiptResponse,
Provider,
TransactionType,
cairo,
Expand Down Expand Up @@ -559,7 +558,7 @@ describe('deploy and test Wallet', () => {

// check pre-calculated address
const txReceipt = await provider.waitForTransaction(deployment.transaction_hash);
const udcEvent = parseUDCEvent(txReceipt as DeployTransactionReceiptResponse);
const udcEvent = parseUDCEvent(txReceipt as any); // todo: when time fix types
expect(cleanHex(deployment.contract_address[0])).toBe(cleanHex(udcEvent.contract_address));
});

Expand All @@ -580,7 +579,7 @@ describe('deploy and test Wallet', () => {

// check pre-calculated address
const txReceipt = await provider.waitForTransaction(deployment.transaction_hash);
const udcEvent = parseUDCEvent(txReceipt as DeployTransactionReceiptResponse);
const udcEvent = parseUDCEvent(txReceipt as any); // todo: when time fix types
expect(cleanHex(deployment.contract_address[0])).toBe(cleanHex(udcEvent.contract_address));
});

Expand Down
2 changes: 1 addition & 1 deletion src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class Account extends Provider implements AccountInterface {
): Promise<DeployContractUDCResponse> {
const deployTx = await this.deploy(payload, details);
const txReceipt = await this.waitForTransaction(deployTx.transaction_hash);
return parseUDCEvent(txReceipt as DeployTransactionReceiptResponse);
return parseUDCEvent(txReceipt as unknown as DeployTransactionReceiptResponse);
}

public async declareAndDeploy(
Expand Down
1 change: 1 addition & 0 deletions src/channel/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './rpc_0_6';
Loading

0 comments on commit 5b2b299

Please sign in to comment.