Skip to content

Commit

Permalink
Merge pull request #848 from starknet-io/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
tabaktoni authored Nov 21, 2023
2 parents 4661483 + cadc8c0 commit d72b1be
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [5.24.3](https://github.com/starknet-io/starknet.js/compare/v5.24.2...v5.24.3) (2023-11-20)

### Bug Fixes

- correct syncing type ([41f9d8a](https://github.com/starknet-io/starknet.js/commit/41f9d8a0d1b69c569e7a3aa55cec09f105c32356))

## [5.24.2](https://github.com/starknet-io/starknet.js/compare/v5.24.1...v5.24.2) (2023-11-17)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions __mocks__/cairo/helloCairo2/hellocairo
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ trait IHelloStarknet<TContractState> {
fn echo_array(self: @TContractState, data: Array<u8>) -> Array<u8>;
fn echo_array_u256(self: @TContractState, data: Array<u256>) -> Array<u256>;
fn echo_array_bool(self: @TContractState, data: Array<bool>) -> Array<bool>;
// unamed Tuple
// unnamed Tuple
fn echo_un_tuple(self: @TContractState, a: (felt252, u16)) -> (felt252, u16);
// echo Struct
fn echo_struct(self: @TContractState, tt: Foo) -> Foo;
Expand Down Expand Up @@ -362,7 +362,7 @@ mod HelloStarknet {
data
}

// unamed Tuple
// unnamed Tuple
fn echo_un_tuple(self: @ContractState, a: (felt252, u16)) -> (felt252, u16) {
a
}
Expand Down
2 changes: 1 addition & 1 deletion __mocks__/cairo/helloSierra/hello.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ mod HelloStarknet {
data
}

// unamed Tuple
// unnamed Tuple
#[view]
fn echo_un_tuple(a:(felt252, u16)) -> (felt252, u16) {
a
Expand Down
2 changes: 1 addition & 1 deletion __tests__/cairo1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describeIfDevnet('Cairo 1 Devnet', () => {
const status = await cairo1Contract.echo_array([123, 55, 77, 255]);
expect(status).toEqual([123n, 55n, 77n, 255n]);

// uint256 defiend as number
// uint256 defined as number
const status1 = await cairo1Contract.echo_array_u256([123, 55, 77, 255]);
expect(status1).toEqual([123n, 55n, 77n, 255n]);

Expand Down
2 changes: 1 addition & 1 deletion __tests__/cairo1v2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('Cairo 1', () => {
const status = await cairo1Contract.echo_array([123, 55, 77, 255]);
expect(status).toEqual([123n, 55n, 77n, 255n]);

// uint256 defiend as number
// uint256 defined as number
const status1 = await cairo1Contract.echo_array_u256([123, 55, 77, 255]);
expect(status1).toEqual([123n, 55n, 77n, 255n]);

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starknet",
"version": "5.24.2",
"version": "5.24.3",
"description": "JavaScript library for Starknet",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/provider/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CustomError extends Error {
// because typescript __extends implementation can't
// see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
fixProto(this, new.target.prototype);
// try to remove contructor from stack trace
// try to remove constructor from stack trace
fixStack(this);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/api/rpcspec/nonspec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export type StateUpdate = STATE_UPDATE | PENDING_STATE_UPDATE;
// response starknet_traceBlockTransactions
export type BlockTransactionsTraces = { transaction_hash: FELT; trace_root: TRANSACTION_TRACE }[];
// response starknet_syncing
export type Syncing = boolean | SYNC_STATUS;
export type Syncing = false | SYNC_STATUS;
// response starknet_getEvents
export type Events = EVENTS_CHUNK;
// response starknet_addInvokeTransaction
Expand Down
2 changes: 1 addition & 1 deletion src/utils/stark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function signatureToHexArray(sig?: Signature): ArraySignatureType {
* Convert estimated fee to max fee with overhead
*/
export function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead: number = 0.5): bigint {
// BN can only handle Integers, so we need to do all calulations with integers
// BN can only handle Integers, so we need to do all calculations with integers
const overHeadPercent = Math.round((1 + overhead) * 100);
return (toBigInt(estimatedFee) * toBigInt(overHeadPercent)) / 100n;
}

0 comments on commit d72b1be

Please sign in to comment.