Skip to content

Commit

Permalink
Merge pull request #889 from starknet-io/beta
Browse files Browse the repository at this point in the history
DIFF Beta -> Dev
  • Loading branch information
tabaktoni authored Feb 5, 2024
2 parents 50bb532 + 260e77a commit 64a664f
Show file tree
Hide file tree
Showing 103 changed files with 11,715 additions and 4,200 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ name: _ Run Tests
on:
workflow_call:
inputs:
use-rpc-devnet:
type: boolean
default: false
use-seq-devnet:
use-devnet:
type: boolean
default: false
secrets:
TEST_PROVIDER_BASE_URL:
required: false
TEST_RPC_URL:
required: false
TEST_ACCOUNT_PRIVATE_KEY:
Expand All @@ -26,20 +21,16 @@ jobs:
# TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822
services:
devnet:
image: ${{ inputs.use-rpc-devnet && 'shardlabs/starknet-devnet-rs:0c82d023f35bb77c4b5f4afd885ab14e44b73130-amd-seed0' || inputs.use-seq-devnet && 'shardlabs/starknet-devnet:0.6.3-seed0' || '' }}
# image: ${{ (inputs.use-rpc-devnet || inputs.use-seq-devnet) && 'shardlabs/starknet-devnet:0.6.3-seed0' || '' }}
# image: shardlabs/starknet-devnet-rs:0c82d023f35bb77c4b5f4afd885ab14e44b73130-amd-seed0
image: ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:85495efb71a37ad3921c8986474b7e78a9a9f5fc-amd-seed0' || '' }}
ports:
- 5050:5050

env:
TEST_PROVIDER_BASE_URL: ${{ secrets.TEST_PROVIDER_BASE_URL }}
TEST_RPC_URL: ${{ secrets.TEST_RPC_URL }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.TEST_ACCOUNT_PRIVATE_KEY }}
TEST_ACCOUNT_ADDRESS: ${{ secrets.TEST_ACCOUNT_ADDRESS }}

steps:
- run: echo ${{ secrets.TEST_PROVIDER_BASE_URL }}
- run: echo ${{ secrets.TEST_RPC_URL }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/manual-tests-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [sequencer-devnet, rpc-devnet]
include:
- name: sequencer-devnet
TEST_PROVIDER_BASE_URL: http://127.0.0.1:5050/
- name: rpc-devnet
TEST_RPC_URL: http://127.0.0.1:5050/rpc

uses: ./.github/workflows/_test.yml
with:
use-rpc-devnet: ${{ matrix.TEST_RPC_URL != '' }}
use-seq-devnet: ${{ matrix.TEST_PROVIDER_BASE_URL != '' }}
use-devnet: ${{ matrix.TEST_RPC_URL != '' }}
secrets:
TEST_PROVIDER_BASE_URL: ${{ matrix.TEST_PROVIDER_BASE_URL }}
TEST_RPC_URL: ${{ matrix.TEST_RPC_URL }}
14 changes: 3 additions & 11 deletions .github/workflows/manual-tests-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@ jobs:
tests:
name: Run test on ${{ matrix.name }}
strategy:
max-parallel: 1 # needed until we get a seperate account for the rpc provider, until then running them in parallel would result in a nonce issue
max-parallel: 1
matrix:
name: [sequencer-goerli, rpc-goerli]
include:
- name: sequencer-goerli
ENABLE_SEQUENCER: true
ENABLE_RPC: false
- name: rpc-goerli
ENABLE_SEQUENCER: false
ENABLE_RPC: true
name: [rpc-goerli]

uses: ./.github/workflows/_test.yml
secrets:
TEST_PROVIDER_BASE_URL: ${{ matrix.ENABLE_SEQUENCER && secrets.TEST_PROVIDER_BASE_URL || ''}}
TEST_RPC_URL: ${{ matrix.ENABLE_RPC && secrets.TEST_RPC_URL || ''}}
TEST_RPC_URL: ${{ secrets.TEST_RPC_URL }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.TEST_ACCOUNT_PRIVATE_KEY }}
TEST_ACCOUNT_ADDRESS: ${{ secrets.TEST_ACCOUNT_ADDRESS }}
7 changes: 1 addition & 6 deletions .github/workflows/pr-push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,14 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [sequencer-devnet, rpc-devnet]
include:
- name: sequencer-devnet
TEST_PROVIDER_BASE_URL: http://127.0.0.1:5050/
- name: rpc-devnet
TEST_RPC_URL: http://127.0.0.1:5050/rpc

uses: ./.github/workflows/_test.yml
with:
use-rpc-devnet: ${{ matrix.TEST_RPC_URL != '' }}
use-seq-devnet: ${{ matrix.TEST_PROVIDER_BASE_URL != '' }}
use-devnet: ${{ matrix.TEST_RPC_URL != '' }}
secrets:
TEST_PROVIDER_BASE_URL: ${{ matrix.TEST_PROVIDER_BASE_URL }}
TEST_RPC_URL: ${{ matrix.TEST_RPC_URL }}

release:
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/pr-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,13 @@ jobs:
needs: [skip_check]
if: needs.skip_check.outputs.should_skip != 'true'
strategy:
max-parallel: 1 # needed until we get a seperate account for the rpc provider, until then running them in parallel would result in a nonce issue
max-parallel: 1
matrix:
name: [sequencer-goerli, rpc-goerli]
include:
- name: sequencer-goerli
ENABLE_SEQUENCER: true
ENABLE_RPC: false
- name: rpc-goerli
ENABLE_SEQUENCER: false
ENABLE_RPC: true
name: [rpc-goerli]

uses: ./.github/workflows/_test.yml
secrets:
TEST_PROVIDER_BASE_URL: ${{ matrix.ENABLE_SEQUENCER && secrets.TEST_PROVIDER_BASE_URL || ''}}
TEST_RPC_URL: ${{ matrix.ENABLE_RPC && secrets.TEST_RPC_URL || ''}}
TEST_RPC_URL: ${{ secrets.TEST_RPC_URL }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.TEST_ACCOUNT_PRIVATE_KEY }}
TEST_ACCOUNT_ADDRESS: ${{ secrets.TEST_ACCOUNT_ADDRESS }}

Expand Down
141 changes: 141 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# [6.0.0-beta.15](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.14...v6.0.0-beta.15) (2024-02-05)

### Bug Fixes

- throw on negative param cairo.uint256 and bnToUint256 ([e1ead14](https://github.com/starknet-io/starknet.js/commit/e1ead1466984f26ff91d7fe6174fc87be8c3aede))

### Features

- new CairoUint256 cairo datatype model ([b64abcc](https://github.com/starknet-io/starknet.js/commit/b64abccf3888eba49460124a4d7aabbdca1592d1))

# [6.0.0-beta.14](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.13...v6.0.0-beta.14) (2024-02-02)

### Bug Fixes

- move abiwan from dev dependencies to regular dependencies ([#925](https://github.com/starknet-io/starknet.js/issues/925)) ([6b7ee49](https://github.com/starknet-io/starknet.js/commit/6b7ee49918d704f8143f51ab7a0360446ea4cf5e))

### Features

- abi-wan trigger ([c10150a](https://github.com/starknet-io/starknet.js/commit/c10150a328051054a7bba1260296c0c92fdd2051))
- add provider.decodeParameters ([39595f3](https://github.com/starknet-io/starknet.js/commit/39595f3303204b273fadd53764c59767ce6c5b36))
- expand structured data hashing in line with SNIP-12 ([#920](https://github.com/starknet-io/starknet.js/issues/920)) ([cb20590](https://github.com/starknet-io/starknet.js/commit/cb2059039e3b42501cdfefec7802da83eb73645b))
- trigger release ([fbf983f](https://github.com/starknet-io/starknet.js/commit/fbf983f7820768f919cddb2c5806178a20e38bdd))

# [5.29.0](https://github.com/starknet-io/starknet.js/compare/v5.28.0...v5.29.0) (2024-02-02)

### Features
Expand Down Expand Up @@ -28,12 +51,86 @@

- abi-wan trigger ([c10150a](https://github.com/starknet-io/starknet.js/commit/c10150a328051054a7bba1260296c0c92fdd2051))

# [6.0.0-beta.13](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.12...v6.0.0-beta.13) (2024-01-23)

### Bug Fixes

- solve wrong response for account.verifyMessage ([05f4095](https://github.com/starknet-io/starknet.js/commit/05f4095599f89dd508fac9316e1c24fc0dceaa8a))

### Features

- abiwan v2 intergation ([87d15d3](https://github.com/starknet-io/starknet.js/commit/87d15d3d4ada1138ed5b66620a4de56189195f4c))
- add string types of cairo v2.4.0 ([a8a73c1](https://github.com/starknet-io/starknet.js/commit/a8a73c1f5b0bc72bc42460f3735eeec6f95edcbe))
- make Abi and CONTRACT_ABI types compatible with abiwan ([9007816](https://github.com/starknet-io/starknet.js/commit/9007816689528a79bd8bb4267e0098be2e6d71d2))
- replace in verifyMessage : response by Error ([1abf91f](https://github.com/starknet-io/starknet.js/commit/1abf91f170c46d4f4cf5f493dc3d6717c6d3c1e7))
- sepolia ([26d7044](https://github.com/starknet-io/starknet.js/commit/26d70446edd7c098b7f257d9242cc9d9d220b11e))

# [5.25.0](https://github.com/starknet-io/starknet.js/compare/v5.24.5...v5.25.0) (2023-12-18)

### Features

- sepolia ([26d7044](https://github.com/starknet-io/starknet.js/commit/26d70446edd7c098b7f257d9242cc9d9d220b11e))

# [6.0.0-beta.12](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.11...v6.0.0-beta.12) (2024-01-23)

### Features

- add provider.decodeParameters ([be6eec9](https://github.com/starknet-io/starknet.js/commit/be6eec94c8ae5d92df631502c9a1d61663d80101))
- ethereum signer ([8473adb](https://github.com/starknet-io/starknet.js/commit/8473adbcfa5ef642297b8a7f448a0d789703037f))
- ethereum-signer ([f37bfb2](https://github.com/starknet-io/starknet.js/commit/f37bfb2788b7c6befc10efca8b102ee2a975ee55))

# [6.0.0-beta.11](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.10...v6.0.0-beta.11) (2024-01-04)

### Bug Fixes

- utilize provided resourceBounds value ([65bea53](https://github.com/starknet-io/starknet.js/commit/65bea53ab03a04fdd4c122ba2fecbb1010100e18))

# [6.0.0-beta.10](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.9...v6.0.0-beta.10) (2023-12-20)

### Features

- req id counter ([cedd1ea](https://github.com/starknet-io/starknet.js/commit/cedd1ea32cd58107c504d357a3dd5e9a40010a80))

# [6.0.0-beta.9](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.8...v6.0.0-beta.9) (2023-12-19)

### Bug Fixes

- acc deploy_acc ([732cd94](https://github.com/starknet-io/starknet.js/commit/732cd946f26c2b0fe893067f25c1fe712d72d49b))

# [6.0.0-beta.8](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.7...v6.0.0-beta.8) (2023-12-19)

### Bug Fixes

- estimateFeeBulk provided version ([da717be](https://github.com/starknet-io/starknet.js/commit/da717be8e656087eaba21c865a6dd0b648664491))

# [6.0.0-beta.7](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.6...v6.0.0-beta.7) (2023-12-14)

### Bug Fixes

- provider rpc 0.5-0.6 getTransactionReceipt response standardization ([76b6ab4](https://github.com/starknet-io/starknet.js/commit/76b6ab49f6721d1f76c3f30d3d88d6dbc8b80bda))

### Features

- curves ([405de46](https://github.com/starknet-io/starknet.js/commit/405de462032579ef0e8e434c62976dcb84ee1af8))
- **provider:** fix and clean provider response and response parser, removed seqeuncer api ([7ecb069](https://github.com/starknet-io/starknet.js/commit/7ecb069e3d2c37653cedc44dfbb635c5bc8eec7f))
- **provider:** pending response discrimination, pending type guards ([013a22b](https://github.com/starknet-io/starknet.js/commit/013a22bf4dd8cb6df817ccf6ff2d82837fe91693))

# [6.0.0-beta.6](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.5...v6.0.0-beta.6) (2023-12-11)

### Features

- def rpc 0_6, sepolia nodes ([4f59a8f](https://github.com/starknet-io/starknet.js/commit/4f59a8f01439662ae7eb785cafcf781c68b2cb04))
- default account UniversalDetails, rpc spec update, update interface ([8dc9b8a](https://github.com/starknet-io/starknet.js/commit/8dc9b8ab28a82a9a0eaa47e0271c12b79e8cff39))
- sepolia constants, rpc open change ([6de46b5](https://github.com/starknet-io/starknet.js/commit/6de46b59d22bfda959c083b3ac5570cb8d4c6d0a))

# [6.0.0-beta.5](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.4...v6.0.0-beta.5) (2023-12-10)

### Bug Fixes

- apply bound for contract address from hash calculation ([6d8c291](https://github.com/starknet-io/starknet.js/commit/6d8c291bce130d7b00ae6d81aff071c4986f04af))
- **Calldata.compile:** do not split long `entrypoint` names before calling `getSelectorFromName` ([89715da](https://github.com/starknet-io/starknet.js/commit/89715da3fdb4b497cc5771eb83a88460007740b6))
- prioritize error states in waitForTransaction evaluation ([ac54404](https://github.com/starknet-io/starknet.js/commit/ac544045e2079b68042d850a09b203fc5536c0d0))

## [5.24.5](https://github.com/starknet-io/starknet.js/compare/v5.24.4...v5.24.5) (2023-12-10)

### Bug Fixes
Expand All @@ -42,6 +139,50 @@
- **Calldata.compile:** do not split long `entrypoint` names before calling `getSelectorFromName` ([89715da](https://github.com/starknet-io/starknet.js/commit/89715da3fdb4b497cc5771eb83a88460007740b6))
- prioritize error states in waitForTransaction evaluation ([ac54404](https://github.com/starknet-io/starknet.js/commit/ac544045e2079b68042d850a09b203fc5536c0d0))

# [6.0.0-beta.4](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.3...v6.0.0-beta.4) (2023-12-08)

### Bug Fixes

- remove account_deployment_data from deploy Account ([ede83bf](https://github.com/starknet-io/starknet.js/commit/ede83bfda3c6fcfa9dd397c92bd709293c8dda9b))

### Features

- simulate skip validate by default, spec deploy acc fix ([1b3e7ae](https://github.com/starknet-io/starknet.js/commit/1b3e7aeadaba5b7d59377e249b535f6a8cb8862e))

# [6.0.0-beta.3](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.2...v6.0.0-beta.3) (2023-12-07)

### Bug Fixes

- **beta:** deploy account ([#880](https://github.com/starknet-io/starknet.js/issues/880)) ([00c58e3](https://github.com/starknet-io/starknet.js/commit/00c58e3c6d03b716b68c1b96b5a4adc1cff87dd0))

# [6.0.0-beta.2](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.1...v6.0.0-beta.2) (2023-12-07)

### Features

- v3 wip with est ([b95c462](https://github.com/starknet-io/starknet.js/commit/b95c462df0bd59293b7b42b5474311a3bbbfab1d))

# [6.0.0-beta.1](https://github.com/starknet-io/starknet.js/compare/v5.24.4...v6.0.0-beta.1) (2023-12-06)

### Features

- account preferred transaction version, setup v3 ([5652eb2](https://github.com/starknet-io/starknet.js/commit/5652eb211e1accaefbb2f24bcb756ccf9170c07a))
- dual specification with 0.6 implementation, not yet integrated ([ac8c763](https://github.com/starknet-io/starknet.js/commit/ac8c76383bb3f566164bc4f38c477e3e3dc45f31))
- hashes, signer, vip account, types, versions as string enum ([6ceb9e3](https://github.com/starknet-io/starknet.js/commit/6ceb9e31e51d51a6ce374144fd3ddb82a6ea01b3))
- pretty print rpc LibraryError params, make env.DEBUG usefull ([cca723f](https://github.com/starknet-io/starknet.js/commit/cca723f13009ce7048c7be6b8a6f466aca0d5e19))
- remove old version constants, default types api rpc ([ed9cb08](https://github.com/starknet-io/starknet.js/commit/ed9cb089460640af96a73eca66e9971ca5832041))
- rpc 0.6 implementation as superset of 0.5 tx ([5b2b299](https://github.com/starknet-io/starknet.js/commit/5b2b2997ee7e54144864315ed20175017e4218b4))
- rpc 0.6.0-rc3 implementation ([c2607ed](https://github.com/starknet-io/starknet.js/commit/c2607ed64f26d18ea66f2184acf34d3ca9ee4766))
- rpc provider ([0d9c2e5](https://github.com/starknet-io/starknet.js/commit/0d9c2e5ba0298af7b608ccbd9dd2eff3dc0bb69a))
- rpcChannel ([181eea3](https://github.com/starknet-io/starknet.js/commit/181eea3e4eabc52cdf46b796f0861e2641d59668))
- update default rpc nodes and version ([9b9fe0e](https://github.com/starknet-io/starknet.js/commit/9b9fe0e4c5d8d54323bb82ab7ceed3a78d6fc1bc))
- update verson ([5dfe445](https://github.com/starknet-io/starknet.js/commit/5dfe445a5ed09dd531d91156633321fdae4b70cd))
- v3 transaction hashes ([4fe40a1](https://github.com/starknet-io/starknet.js/commit/4fe40a1419031cd6328509e2439744d0ff98c8e7))
- v3 tx hashes calculation ([f0e760d](https://github.com/starknet-io/starknet.js/commit/f0e760d109e488b70b16eed24e94b889d708d257))

### BREAKING CHANGES

- v3 transactions

## [5.24.4](https://github.com/starknet-io/starknet.js/compare/v5.24.3...v5.24.4) (2023-12-06)

### Bug Fixes
Expand Down
39 changes: 39 additions & 0 deletions __mocks__/cairo/cairo240/string.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//Cairo 2.5.0

#[starknet::interface]
trait ITestReject<TContractState> {
fn proceed_bytes31(self: @TContractState, str: bytes31) -> bytes31;
fn get_string(self: @TContractState) -> ByteArray;
fn proceed_string(self: @TContractState, mess: ByteArray) -> ByteArray;
}

#[starknet::contract]
mod MyTestReject {
use core::option::OptionTrait;
use core::traits::TryInto;
use core::bytes_31::Bytes31Trait;
use core::byte_array::ByteArrayTrait;
#[storage]
struct Storage {}
// To be tested with special characters (!@#$%^&*_+{}|:";./,\[];'<>?~`)
#[abi(embed_v0)]
impl TestReject of super::ITestReject<ContractState> {
fn proceed_bytes31(self: @ContractState, str: bytes31) -> bytes31 {
let mut mess: ByteArray = "Cairo has become the most popular language for developers!@#$%^&*_+|:'<>?~`";
mess.append_byte(55_u8);
str
}

fn get_string(self: @ContractState) -> ByteArray {
let mess: ByteArray = "Cairo has become the most popular language for developers" + " + charizards !@#$%^&*_+|:'<>?~`";
mess
}

fn proceed_string(self: @ContractState, mess: ByteArray) -> ByteArray {
let mut res = mess;
let add: ByteArray = " Zorg is back";
res.append(@add);
res
}
}
}
Loading

0 comments on commit 64a664f

Please sign in to comment.