diff --git a/.github/actions/install-cairo/action.yml b/.github/actions/install-cairo/action.yml index 1fc97dcc5..427e7eabe 100644 --- a/.github/actions/install-cairo/action.yml +++ b/.github/actions/install-cairo/action.yml @@ -4,11 +4,11 @@ description: A composite action that installs cairo and scarb binaries inputs: cairo_version: description: Cairo release version - default: "v2.2.0" + default: "v2.4.3" required: false scarb_version: description: Scarb release version - default: "v0.7.0" + default: "v2.4.3" required: false runs: diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index 3800499bf..3cc470e0f 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -23,9 +23,6 @@ jobs: - name: Install Cairo uses: ./.github/actions/install-cairo - - name: Install starknet-devnet (via venv+pip) - run: nix develop -c pip install -r contracts/requirements.txt -c contracts/constraints.txt - - name: Test run: nix develop -c make test-ts-contracts diff --git a/.github/workflows/integration-tests-smoke.yml b/.github/workflows/integration-tests-smoke.yml index 8f7029d1f..7454a964d 100644 --- a/.github/workflows/integration-tests-smoke.yml +++ b/.github/workflows/integration-tests-smoke.yml @@ -124,7 +124,8 @@ jobs: TTL: 3h TEST_DURATION: 15m NODE_COUNT: 5 - INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + CHAINLINK_VERSION: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }} permissions: checks: write pull-requests: write @@ -147,9 +148,9 @@ jobs: with: nix_path: nixpkgs=channel:nixos-unstable - name: Run Tests ${{ matrix.image.name }} - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2c9f401149f6c25fb632067b7e6626aebeee5d69 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ea889b3133bd7f16ab19ba4ba130de5d9162c669 # v2.3.4 with: - test_command_to_run: nix develop -c make test-integration-smoke-ci + test_command_to_run: nix develop -c helm repo update && make test-integration-smoke-ci test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download cl_repo: ${{ env.CL_ECR }} cl_image_tag: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }} diff --git a/.github/workflows/integration-tests-soak.yml b/.github/workflows/integration-tests-soak.yml index 613ff9df0..20696281f 100644 --- a/.github/workflows/integration-tests-soak.yml +++ b/.github/workflows/integration-tests-soak.yml @@ -119,7 +119,7 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2c9f401149f6c25fb632067b7e6626aebeee5d69 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ea889b3133bd7f16ab19ba4ba130de5d9162c669 # v2.3.4 with: test_command_to_run: nix develop -c make test-integration-soak-ci test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download diff --git a/.github/workflows/integration_contracts.yml b/.github/workflows/integration_contracts.yml index 835082dd8..fa421a134 100644 --- a/.github/workflows/integration_contracts.yml +++ b/.github/workflows/integration_contracts.yml @@ -23,8 +23,5 @@ jobs: - name: Install Cairo uses: ./.github/actions/install-cairo - - name: Install starknet-devnet (via venv+pip) - run: nix develop -c pip install -r contracts/requirements.txt -c contracts/constraints.txt - - name: Test run: nix develop -c make test-integration-contracts diff --git a/.github/workflows/integration_gauntlet.yml b/.github/workflows/integration_gauntlet.yml index 5dc4bfe40..892c42002 100644 --- a/.github/workflows/integration_gauntlet.yml +++ b/.github/workflows/integration_gauntlet.yml @@ -49,9 +49,6 @@ jobs: - name: Install Cairo uses: ./.github/actions/install-cairo - - name: Install starknet-devnet (via venv+pip) - run: nix develop -c pip install -r contracts/requirements.txt -c contracts/constraints.txt - - name: Test run: nix develop -c make test-integration-gauntlet diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index 3227a9110..2bbbe0a63 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -35,8 +35,5 @@ jobs: ./relayer/coverage.txt ./relayer/race_coverage.txt - - name: Install starknet-devnet (via venv+pip) - run: nix develop -c pip install -r contracts/requirements.txt -c contracts/constraints.txt - - name: Integration Test run: nix develop -c make test-integration-go diff --git a/.gitignore b/.gitignore index 3f7d00c1a..ffd70d468 100644 --- a/.gitignore +++ b/.gitignore @@ -164,3 +164,5 @@ integration-tests/soak/logs remote.test ztarrepo.tar.gz eslint-report.json +.run.id +.local-mock-server diff --git a/Makefile b/Makefile index 911c3c140..22937f60b 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ format: format-go format-cairo format-ts format-check: format-cairo-check format-ts-check .PHONY: format-go -format-go: format-go-fmt format-go-mod-tidy +format-go: format-go-fmt gomodtidy .PHONY: format-go-fmt format-go-fmt: @@ -130,8 +130,8 @@ format-go-fmt: cd ./ops && go fmt ./... cd ./integration-tests && go fmt ./... -.PHONY: format-go-mod-tidy -format-go-mod-tidy: +.PHONY: gomodtidy +gomodtidy: cd ./relayer && go mod tidy cd ./monitoring && go mod tidy cd ./ops && go mod tidy @@ -180,14 +180,12 @@ test-unit-go: .PHONY: test-integration-go # only runs tests with TestIntegration_* + //go:build integration -test-integration-go: +test-integration-go: env-devnet-hardhat cd ./relayer && go test -v ./... -run TestIntegration -tags integration .PHONY: test-integration-prep test-integration-prep: - python -m venv ~/cairo_venv && \ - . ~/cairo_venv/bin/activate - cd ./contracts && pip install -r requirements.txt + cd ./contracts make build .PHONY: test-integration @@ -202,7 +200,7 @@ test-integration-smoke: test-integration-prep .PHONY: test-integration-smoke-ci test-integration-smoke-ci: cd integration-tests/ && \ - go test --timeout=2h -v -count=1 -json ./smoke + go test --timeout=2h -v -count=1 -json ./smoke 2>&1 | tee /tmp/gotest.log | gotestfmt .PHONY: test-integration-soak test-integration-soak: test-integration-prep @@ -221,17 +219,16 @@ test-integration-soak-ci: # cd examples/contracts/aggregator-consumer/ && \ # yarn test test-integration-contracts: build-ts env-devnet-hardhat - cd packages-ts/integration-multisig/ && \ - yarn test + echo "Tests currently broken because of starknet-hardhat-plugin" + exit 1 cd packages-ts/starknet/ && \ yarn test .PHONY: test-integration-gauntlet -# TODO: better network lifecycle setup - tests setup/run their own network (L1 + conflict w/ above if not cleaned up) # TODO: fix example # cd packages-ts/starknet-gauntlet-example/ && \ # yarn test -test-integration-gauntlet: build-ts env-devnet-hardhat-down +test-integration-gauntlet: build-ts env-devnet-hardhat cd packages-ts/starknet-gauntlet/ && \ yarn test cd packages-ts/starknet-gauntlet-argent/ && \ diff --git a/contracts/Scarb.lock b/contracts/Scarb.lock new file mode 100644 index 000000000..cc0bca5aa --- /dev/null +++ b/contracts/Scarb.lock @@ -0,0 +1,14 @@ +# Code generated by scarb DO NOT EDIT. +version = 1 + +[[package]] +name = "chainlink" +version = "0.1.0" +dependencies = [ + "openzeppelin", +] + +[[package]] +name = "openzeppelin" +version = "0.8.0" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.8.0#c23e8e96de60e6e3159b1ff8591a1187269c0eb7" diff --git a/contracts/Scarb.toml b/contracts/Scarb.toml index 8dad26bb7..a5fcf354b 100644 --- a/contracts/Scarb.toml +++ b/contracts/Scarb.toml @@ -11,8 +11,8 @@ sierra = "cairo-compile . -r" # Uncomment if you want to use dependencies # Note: currently testing doesn't work with dependencies [dependencies] -starknet = ">=1.0.0" -openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.7.0-rc.0" } +starknet = ">=1.3.0" +openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.8.0" } [lib] diff --git a/contracts/constraints.txt b/contracts/constraints.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/contracts/requirements.txt b/contracts/requirements.txt deleted file mode 100644 index a50aff25e..000000000 --- a/contracts/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -ecdsa -fastecdsa -sympy -cairo-lang>=0.12.1 -starknet-devnet>=0.6.0 diff --git a/contracts/src/access_control/access_controller.cairo b/contracts/src/access_control/access_controller.cairo index 075ac5fd6..4bf5c7f3c 100644 --- a/contracts/src/access_control/access_controller.cairo +++ b/contracts/src/access_control/access_controller.cairo @@ -1,107 +1,59 @@ -use starknet::ContractAddress; - #[starknet::contract] mod AccessController { use starknet::ContractAddress; use starknet::class_hash::ClassHash; - use chainlink::libraries::access_control::{AccessControl, IAccessController}; - use chainlink::libraries::ownable::{Ownable, IOwnable}; + use chainlink::libraries::access_control::{AccessControlComponent, IAccessController}; + use chainlink::libraries::ownable::{OwnableComponent, IOwnable}; + use chainlink::libraries::type_and_version::ITypeAndVersion; use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + component!(path: AccessControlComponent, storage: access_control, event: AccessControlEvent); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl InternalImpl = OwnableComponent::InternalImpl; + + #[abi(embed_v0)] + impl AccessControlImpl = + AccessControlComponent::AccessControlImpl; + impl AccessControlInternalImpl = AccessControlComponent::InternalImpl; + + #[event] + #[derive(Drop, starknet::Event)] + enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event, + #[flat] + AccessControlEvent: AccessControlComponent::Event, + } + #[storage] - struct Storage {} + struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage, + #[substorage(v0)] + access_control: AccessControlComponent::Storage, + } #[constructor] fn constructor(ref self: ContractState, owner_address: ContractAddress) { - let mut ownable = Ownable::unsafe_new_contract_state(); - Ownable::constructor(ref ownable, owner_address); - let mut access_control = AccessControl::unsafe_new_contract_state(); - AccessControl::constructor(ref access_control); + self.ownable.initializer(owner_address); + self.access_control.initializer(); } - #[external(v0)] - impl AccessControllerImpl of IAccessController { - fn has_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::has_access(@state, user, data) - } - - fn add_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::add_access(ref state, user); + #[abi(embed_v0)] + impl TypeAndVersionImpl of ITypeAndVersion { + fn type_and_version(self: @ContractState) -> felt252 { + 'AccessController 1.0.0' } - - fn remove_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::remove_access(ref state, user); - } - - fn enable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::enable_access_check(ref state); - } - - fn disable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::disable_access_check(ref state); - } - } - - /// - /// Ownable - /// - - #[external(v0)] - impl OwnableImpl of IOwnable { - fn owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::owner(@state) - } - - fn proposed_owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::proposed_owner(@state) - } - - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::transfer_ownership(ref state, new_owner) - } - - fn accept_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::accept_ownership(ref state) - } - - fn renounce_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::renounce_ownership(ref state) - } - } - - /// - /// Upgradeable - /// - - #[view] - fn type_and_version(self: @ContractState) -> felt252 { - 'AccessController 1.0.0' } #[external(v0)] impl UpgradeableImpl of IUpgradeable { fn upgrade(ref self: ContractState, new_impl: ClassHash) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); Upgradeable::upgrade(new_impl); } } diff --git a/contracts/src/account.cairo b/contracts/src/account.cairo new file mode 100644 index 000000000..f200c7dd4 --- /dev/null +++ b/contracts/src/account.cairo @@ -0,0 +1,57 @@ +// copied from https://github.com/OpenZeppelin/cairo-contracts/blob/v0.8.1/src/presets/account.cairo + +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts for Cairo v0.8.1 (presets/account.cairo) + +/// # Account Preset +/// +/// OpenZeppelin's basic account which can change its public key and declare, deploy, or call contracts. +#[starknet::contract(account)] +mod Account { + use openzeppelin::account::AccountComponent; + use openzeppelin::introspection::src5::SRC5Component; + + component!(path: AccountComponent, storage: account, event: AccountEvent); + component!(path: SRC5Component, storage: src5, event: SRC5Event); + + // Account + #[abi(embed_v0)] + impl SRC6Impl = AccountComponent::SRC6Impl; + #[abi(embed_v0)] + impl SRC6CamelOnlyImpl = AccountComponent::SRC6CamelOnlyImpl; + #[abi(embed_v0)] + impl PublicKeyImpl = AccountComponent::PublicKeyImpl; + #[abi(embed_v0)] + impl PublicKeyCamelImpl = AccountComponent::PublicKeyCamelImpl; + #[abi(embed_v0)] + impl DeclarerImpl = AccountComponent::DeclarerImpl; + #[abi(embed_v0)] + impl DeployableImpl = AccountComponent::DeployableImpl; + impl AccountInternalImpl = AccountComponent::InternalImpl; + + // SRC5 + #[abi(embed_v0)] + impl SRC5Impl = SRC5Component::SRC5Impl; + + #[storage] + struct Storage { + #[substorage(v0)] + account: AccountComponent::Storage, + #[substorage(v0)] + src5: SRC5Component::Storage + } + + #[event] + #[derive(Drop, starknet::Event)] + enum Event { + #[flat] + AccountEvent: AccountComponent::Event, + #[flat] + SRC5Event: SRC5Component::Event + } + + #[constructor] + fn constructor(ref self: ContractState, public_key: felt252) { + self.account.initializer(public_key); + } +} diff --git a/contracts/src/emergency/sequencer_uptime_feed.cairo b/contracts/src/emergency/sequencer_uptime_feed.cairo index df2420ee9..06d0a59c6 100644 --- a/contracts/src/emergency/sequencer_uptime_feed.cairo +++ b/contracts/src/emergency/sequencer_uptime_feed.cairo @@ -27,15 +27,33 @@ mod SequencerUptimeFeed { use option::OptionTrait; use zeroable::Zeroable; - use chainlink::libraries::ownable::{Ownable, IOwnable}; - use chainlink::libraries::access_control::{AccessControl, IAccessController}; + use chainlink::libraries::ownable::{OwnableComponent, IOwnable}; + use chainlink::libraries::access_control::{AccessControlComponent, IAccessController}; + use chainlink::libraries::access_control::AccessControlComponent::InternalTrait as AccessControlInternalTrait; + use chainlink::libraries::type_and_version::ITypeAndVersion; use chainlink::ocr2::aggregator::Round; use chainlink::ocr2::aggregator::IAggregator; use chainlink::ocr2::aggregator::{Transmission}; use chainlink::libraries::upgradeable::Upgradeable; + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + component!(path: AccessControlComponent, storage: access_control, event: AccessControlEvent); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl OwnableInternalImpl = OwnableComponent::InternalImpl; + + #[abi(embed_v0)] + impl AccessControlImpl = + AccessControlComponent::AccessControlImpl; + impl AccessControlInternalImpl = AccessControlComponent::InternalImpl; + #[storage] struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage, + #[substorage(v0)] + access_control: AccessControlComponent::Storage, // l1 sender is an starknet validator ethereum address _l1_sender: felt252, // maps round id to round transmission @@ -46,6 +64,10 @@ mod SequencerUptimeFeed { #[event] #[derive(Drop, starknet::Event)] enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event, + #[flat] + AccessControlEvent: AccessControlComponent::Event, RoundUpdated: RoundUpdated, NewRound: NewRound, AnswerUpdated: AnswerUpdated, @@ -87,6 +109,13 @@ mod SequencerUptimeFeed { to_address: EthAddress } + #[abi(embed_v0)] + impl TypeAndVersion of ITypeAndVersion { + fn type_and_version(self: @ContractState) -> felt252 { + 'SequencerUptimeFeed 1.0.0' + } + } + #[external(v0)] impl AggregatorImpl of IAggregator { fn latest_round_data(self: @ContractState) -> Round { @@ -122,10 +151,6 @@ mod SequencerUptimeFeed { fn decimals(self: @ContractState) -> u8 { 0_u8 } - - fn type_and_version(self: @ContractState) -> felt252 { - 'SequencerUptimeFeed 1.0.0' - } } #[constructor] @@ -167,8 +192,7 @@ mod SequencerUptimeFeed { #[external(v0)] impl SequencerUptimeFeedImpl of super::ISequencerUptimeFeed { fn set_l1_sender(ref self: ContractState, address: EthAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); assert(!address.is_zero(), '0 address not allowed'); @@ -198,85 +222,10 @@ mod SequencerUptimeFeed { #[external(v0)] fn upgrade(ref self: ContractState, new_impl: ClassHash) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); Upgradeable::upgrade(new_impl) } - /// - /// Ownership - /// - - #[external(v0)] - impl OwnableImpl of IOwnable { - fn owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::owner(@state) - } - - fn proposed_owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::proposed_owner(@state) - } - - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::transfer_ownership(ref state, new_owner) - } - - fn accept_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::accept_ownership(ref state) - } - - fn renounce_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::renounce_ownership(ref state) - } - } - - - /// - /// Access Control - /// - - #[external(v0)] - impl AccessControllerImpl of IAccessController { - fn has_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::has_access(@state, user, data) - } - - fn add_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::add_access(ref state, user) - } - - fn remove_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::remove_access(ref state, user) - } - - fn enable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::enable_access_check(ref state) - } - - fn disable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::disable_access_check(ref state) - } - } - - /// /// Internals /// @@ -285,17 +234,14 @@ mod SequencerUptimeFeed { impl Internals of InternalTrait { fn _require_read_access(self: @ContractState) { let sender = starknet::info::get_caller_address(); - let access_control = AccessControl::unsafe_new_contract_state(); - AccessControl::check_read_access(@access_control, sender); + self.access_control.check_read_access(sender); } fn _initializer( ref self: ContractState, initial_status: u128, owner_address: ContractAddress ) { - let mut ownable = Ownable::unsafe_new_contract_state(); - Ownable::constructor(ref ownable, owner_address); - let mut access_control = AccessControl::unsafe_new_contract_state(); - AccessControl::constructor(ref access_control); + self.ownable.initializer(owner_address); + self.access_control.initializer(); let round_id = 1_u128; let timestamp = starknet::info::get_block_timestamp(); self._record_round(round_id, initial_status, timestamp); diff --git a/contracts/src/lib.cairo b/contracts/src/lib.cairo index b1661658f..eef049d8c 100644 --- a/contracts/src/lib.cairo +++ b/contracts/src/lib.cairo @@ -1,5 +1,6 @@ // All modules must be present here +mod account; mod ocr2; mod libraries; mod utils; diff --git a/contracts/src/libraries.cairo b/contracts/src/libraries.cairo index 2fd5588af..dcfe47c1b 100644 --- a/contracts/src/libraries.cairo +++ b/contracts/src/libraries.cairo @@ -3,3 +3,4 @@ mod access_control; mod token; mod upgradeable; mod mocks; +mod type_and_version; diff --git a/contracts/src/libraries/access_control.cairo b/contracts/src/libraries/access_control.cairo index d3454d011..c5af14a78 100644 --- a/contracts/src/libraries/access_control.cairo +++ b/contracts/src/libraries/access_control.cairo @@ -2,18 +2,23 @@ use starknet::ContractAddress; #[starknet::interface] trait IAccessController { fn has_access(self: @TContractState, user: ContractAddress, data: Array) -> bool; + fn has_read_access(self: @TContractState, user: ContractAddress, data: Array) -> bool; fn add_access(ref self: TContractState, user: ContractAddress); fn remove_access(ref self: TContractState, user: ContractAddress); fn enable_access_check(ref self: TContractState); fn disable_access_check(ref self: TContractState); } -#[starknet::contract] -mod AccessControl { +// Requires Ownable subcomponent. +#[starknet::component] +mod AccessControlComponent { use starknet::ContractAddress; use starknet::class_hash::ClassHash; use zeroable::Zeroable; + use chainlink::libraries::ownable::{OwnableComponent}; + use OwnableComponent::InternalImpl as OwnableInternalImpl; + #[storage] struct Storage { _check_enabled: bool, @@ -45,83 +50,102 @@ mod AccessControl { #[derive(Drop, starknet::Event)] struct AccessControlDisabled {} - fn has_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let has_access = self._access_list.read(user); - if has_access { - return true; + #[embeddable_as(AccessControlImpl)] + impl AccessControl< + TContractState, + +HasComponent, + impl Ownable: OwnableComponent::HasComponent, + +Drop, + > of super::IAccessController> { + fn has_access( + self: @ComponentState, user: ContractAddress, data: Array + ) -> bool { + let has_access = self._access_list.read(user); + if has_access { + return true; + } + + let check_enabled = self._check_enabled.read(); + if !check_enabled { + return true; + } + + false } - let check_enabled = self._check_enabled.read(); - if !check_enabled { - return true; - } + fn has_read_access( + self: @ComponentState, user: ContractAddress, data: Array + ) -> bool { + let _has_access = self.has_access(user, data); + if _has_access { + return true; + } - false - } + // NOTICE: read access is granted to direct calls, to enable off-chain reads. + if user.is_zero() { + return true; + } - fn has_read_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let _has_access = has_access(self, user, data); - if _has_access { - return true; + false } - // NOTICE: read access is granted to direct calls, to enable off-chain reads. - if user.is_zero() { - return true; + fn add_access(ref self: ComponentState, user: ContractAddress) { + get_dep_component!(self, Ownable).assert_only_owner(); + let has_access = self._access_list.read(user); + if !has_access { + self._access_list.write(user, true); + self.emit(Event::AddedAccess(AddedAccess { user: user })); + } } - false - } - - fn check_access(self: @ContractState, user: ContractAddress) { - let allowed = has_access(self, user, ArrayTrait::new()); - assert(allowed, 'user does not have access'); - } - - fn check_read_access(self: @ContractState, user: ContractAddress) { - let allowed = has_read_access(self, user, ArrayTrait::new()); - assert(allowed, 'user does not have read access'); - } - - // - // Unprotected - // - - #[constructor] - fn constructor(ref self: ContractState) { - self._check_enabled.write(true); - self.emit(Event::AccessControlEnabled(AccessControlEnabled {})); - } + fn remove_access(ref self: ComponentState, user: ContractAddress) { + get_dep_component!(self, Ownable).assert_only_owner(); + let has_access = self._access_list.read(user); + if has_access { + self._access_list.write(user, false); + self.emit(Event::RemovedAccess(RemovedAccess { user: user })); + } + } - fn add_access(ref self: ContractState, user: ContractAddress) { - let has_access = self._access_list.read(user); - if !has_access { - self._access_list.write(user, true); - self.emit(Event::AddedAccess(AddedAccess { user: user })); + fn enable_access_check(ref self: ComponentState) { + get_dep_component!(self, Ownable).assert_only_owner(); + let check_enabled = self._check_enabled.read(); + if !check_enabled { + self._check_enabled.write(true); + self.emit(Event::AccessControlEnabled(AccessControlEnabled {})); + } } - } - fn remove_access(ref self: ContractState, user: ContractAddress) { - let has_access = self._access_list.read(user); - if has_access { - self._access_list.write(user, false); - self.emit(Event::RemovedAccess(RemovedAccess { user: user })); + fn disable_access_check(ref self: ComponentState) { + get_dep_component!(self, Ownable).assert_only_owner(); + let check_enabled = self._check_enabled.read(); + if check_enabled { + self._check_enabled.write(false); + self.emit(Event::AccessControlDisabled(AccessControlDisabled {})); + } } } - fn enable_access_check(ref self: ContractState) { - let check_enabled = self._check_enabled.read(); - if !check_enabled { + #[generate_trait] + impl InternalImpl< + TContractState, + +HasComponent, + impl Ownable: OwnableComponent::HasComponent, + +Drop, + > of InternalTrait { + fn initializer(ref self: ComponentState) { self._check_enabled.write(true); self.emit(Event::AccessControlEnabled(AccessControlEnabled {})); } - } - fn disable_access_check(ref self: ContractState) { - let check_enabled = self._check_enabled.read(); - if check_enabled { - self._check_enabled.write(false); - self.emit(Event::AccessControlDisabled(AccessControlDisabled {})); + fn check_access(self: @ComponentState, user: ContractAddress) { + let allowed = AccessControl::has_access(self, user, ArrayTrait::new()); + assert(allowed, 'user does not have access'); + } + + fn check_read_access(self: @ComponentState, user: ContractAddress) { + let allowed = AccessControl::has_read_access(self, user, ArrayTrait::new()); + assert(allowed, 'user does not have read access'); } } } diff --git a/contracts/src/libraries/ownable.cairo b/contracts/src/libraries/ownable.cairo index 6646d5cf9..d880eb672 100644 --- a/contracts/src/libraries/ownable.cairo +++ b/contracts/src/libraries/ownable.cairo @@ -1,110 +1,155 @@ use starknet::ContractAddress; +// TODO: consider replacing with OwnableTwoStep if https://github.com/OpenZeppelin/cairo-contracts/pull/809/ lands + #[starknet::interface] -trait IOwnable { - fn owner(self: @TContractState) -> ContractAddress; - fn proposed_owner(self: @TContractState) -> ContractAddress; - fn transfer_ownership(ref self: TContractState, new_owner: ContractAddress); - fn accept_ownership(ref self: TContractState); - fn renounce_ownership(ref self: TContractState); +trait IOwnable { + fn owner(self: @TState) -> ContractAddress; + fn proposed_owner(self: @TState) -> ContractAddress; + fn transfer_ownership(ref self: TState, new_owner: ContractAddress); + fn accept_ownership(ref self: TState); + fn renounce_ownership(ref self: TState); } -#[starknet::contract] -mod Ownable { +#[starknet::component] +mod OwnableComponent { use starknet::ContractAddress; - use starknet::contract_address_const; - use zeroable::Zeroable; + use starknet::get_caller_address; #[storage] struct Storage { - _owner: ContractAddress, - _proposed_owner: ContractAddress, + Ownable_owner: ContractAddress, + Ownable_proposed_owner: ContractAddress } - // - // Events - // - #[event] - fn OwnershipTransferred(previous_owner: ContractAddress, newOwner: ContractAddress) {} - - #[event] - fn OwnershipTransferRequested(from: starknet::ContractAddress, to: starknet::ContractAddress) {} + #[derive(Drop, starknet::Event)] + enum Event { + OwnershipTransferred: OwnershipTransferred, + OwnershipTransferRequested: OwnershipTransferRequested + } - // - // Constructor - // + #[derive(Drop, starknet::Event)] + struct OwnershipTransferred { + #[key] + previous_owner: ContractAddress, + #[key] + new_owner: ContractAddress, + } - #[constructor] - fn constructor(ref self: ContractState, owner: ContractAddress) { - assert(!owner.is_zero(), 'Ownable: transfer to 0'); - self._accept_ownership_transfer(owner); + #[derive(Drop, starknet::Event)] + struct OwnershipTransferRequested { + #[key] + previous_owner: ContractAddress, + #[key] + new_owner: ContractAddress, } - // - // Modifiers - // - fn assert_only_owner(self: @ContractState) { - let owner = self._owner.read(); - let caller = starknet::get_caller_address(); - assert(caller == owner, 'Ownable: caller is not owner'); + mod Errors { + const NOT_OWNER: felt252 = 'Caller is not the owner'; + const NOT_PROPOSED_OWNER: felt252 = 'Caller is not proposed owner'; + const ZERO_ADDRESS_CALLER: felt252 = 'Caller is the zero address'; + const ZERO_ADDRESS_OWNER: felt252 = 'New owner is the zero address'; } - #[external(v0)] - impl OwnableImpl of super::IOwnable { - // - // Getters - // - fn owner(self: @ContractState) -> ContractAddress { - self._owner.read() + /// Adds support for two step ownership transfer. + #[embeddable_as(OwnableImpl)] + impl Ownable< + TContractState, +HasComponent + > of super::IOwnable> { + /// Returns the address of the current owner. + fn owner(self: @ComponentState) -> ContractAddress { + self.Ownable_owner.read() } - fn proposed_owner(self: @ContractState) -> ContractAddress { - self._proposed_owner.read() + /// Returns the address of the pending owner. + fn proposed_owner(self: @ComponentState) -> ContractAddress { + self.Ownable_proposed_owner.read() } - // - // Setters - // + /// Finishes the two-step ownership transfer process by accepting the ownership. + /// Can only be called by the pending owner. + fn accept_ownership(ref self: ComponentState) { + let caller = get_caller_address(); + let proposed_owner = self.Ownable_proposed_owner.read(); + assert(caller == proposed_owner, Errors::NOT_PROPOSED_OWNER); + self._accept_ownership(); + } - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { + /// Starts the two-step ownership transfer process by setting the pending owner. + fn transfer_ownership( + ref self: ComponentState, new_owner: ContractAddress + ) { assert(!new_owner.is_zero(), 'Ownable: transfer to 0'); - assert_only_owner(@self); - - self._proposed_owner.write(new_owner); - let previous_owner = self._owner.read(); - OwnershipTransferRequested(previous_owner, new_owner); + self.assert_only_owner(); + self._propose_owner(new_owner); } - fn accept_ownership(ref self: ContractState) { - let proposed_owner = self._proposed_owner.read(); - let caller = starknet::get_caller_address(); - - assert(caller == proposed_owner, 'Ownable: not proposed_owner'); + /// Leaves the contract without owner. It will not be possible to call `assert_only_owner` + /// functions anymore. Can only be called by the current owner. + fn renounce_ownership(ref self: ComponentState) { + self.assert_only_owner(); + self._transfer_ownership(Zeroable::zero()); + } + } - self._accept_ownership_transfer(proposed_owner); + #[generate_trait] + impl InternalImpl< + TContractState, +HasComponent + > of InternalTrait { + /// Sets the contract's initial owner. + /// + /// This function should be called at construction time. + fn initializer(ref self: ComponentState, owner: ContractAddress) { + self._transfer_ownership(owner); } - fn renounce_ownership(ref self: ContractState) { - assert_only_owner(@self); - self._accept_ownership_transfer(starknet::contract_address_const::<0>()); + /// Panics if called by any account other than the owner. Use this + /// to restrict access to certain functions to the owner. + fn assert_only_owner(self: @ComponentState) { + let owner = self.Ownable_owner.read(); + let caller = get_caller_address(); + assert(!caller.is_zero(), Errors::ZERO_ADDRESS_CALLER); + assert(caller == owner, Errors::NOT_OWNER); } - } + /// Transfers ownership to the pending owner. + /// + /// Internal function without access restriction. + fn _accept_ownership(ref self: ComponentState) { + let proposed_owner = self.Ownable_proposed_owner.read(); + self.Ownable_proposed_owner.write(Zeroable::zero()); + self._transfer_ownership(proposed_owner); + } - // - // Internal - // + /// Sets a new pending owner. + /// + /// Internal function without access restriction. + fn _propose_owner(ref self: ComponentState, new_owner: ContractAddress) { + let previous_owner = self.Ownable_owner.read(); + self.Ownable_proposed_owner.write(new_owner); + self + .emit( + OwnershipTransferRequested { + previous_owner: previous_owner, new_owner: new_owner + } + ); + } - #[generate_trait] - impl InternalImpl of InternalTrait { - fn _accept_ownership_transfer( - ref self: ContractState, new_owner: starknet::ContractAddress + /// Transfers ownership of the contract to a new address. + /// + /// Internal function without access restriction. + /// + /// Emits an `OwnershipTransferred` event. + fn _transfer_ownership( + ref self: ComponentState, new_owner: ContractAddress ) { - let previous_owner = self._owner.read(); - self._owner.write(new_owner); - self._proposed_owner.write(starknet::contract_address_const::<0>()); - OwnershipTransferred(previous_owner, new_owner); + let previous_owner: ContractAddress = self.Ownable_owner.read(); + self.Ownable_owner.write(new_owner); + self + .emit( + OwnershipTransferred { previous_owner: previous_owner, new_owner: new_owner } + ); } } } diff --git a/contracts/src/libraries/token/erc677.cairo b/contracts/src/libraries/token/erc677.cairo index 630edf093..6b23abc77 100644 --- a/contracts/src/libraries/token/erc677.cairo +++ b/contracts/src/libraries/token/erc677.cairo @@ -1,5 +1,12 @@ use starknet::ContractAddress; +#[starknet::interface] +trait IERC677 { + fn transfer_and_call( + ref self: TContractState, to: ContractAddress, value: u256, data: Array + ) -> bool; +} + #[starknet::interface] trait IERC677Receiver { fn on_token_transfer( @@ -9,10 +16,10 @@ trait IERC677Receiver { fn supports_interface(ref self: TContractState, interface_id: u32) -> bool; } -#[starknet::contract] -mod ERC677 { +#[starknet::component] +mod ERC677Component { use starknet::ContractAddress; - use openzeppelin::token::erc20::ERC20; + use openzeppelin::token::erc20::interface::IERC20; use array::ArrayTrait; use array::SpanTrait; use clone::Clone; @@ -30,37 +37,48 @@ mod ERC677 { #[event] #[derive(Drop, starknet::Event)] enum Event { - Transfer: Transfer, + TransferAndCall: TransferAndCall, } #[derive(Drop, starknet::Event)] - struct Transfer { + struct TransferAndCall { from: ContractAddress, to: ContractAddress, value: u256, data: Array } - fn transfer_and_call( - ref self: ContractState, to: ContractAddress, value: u256, data: Array - ) -> bool { - let sender = starknet::info::get_caller_address(); + #[embeddable_as(ERC677Impl)] + impl ERC677< + TContractState, + +HasComponent, + +IERC20, + +Drop, + > of super::IERC677> { + fn transfer_and_call( + ref self: ComponentState, + to: ContractAddress, + value: u256, + data: Array + ) -> bool { + let sender = starknet::info::get_caller_address(); - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::transfer(ref state, to, value); - self - .emit( - Event::Transfer( - Transfer { from: sender, to: to, value: value, data: data.clone(), } - ) - ); + let mut contract = self.get_contract_mut(); + contract.transfer(to, value); + self + .emit( + Event::TransferAndCall( + TransferAndCall { from: sender, to: to, value: value, data: data.clone(), } + ) + ); - let receiver = IERC677ReceiverDispatcher { contract_address: to }; + let receiver = IERC677ReceiverDispatcher { contract_address: to }; - let supports = receiver.supports_interface(IERC677_RECEIVER_ID); - if supports { - receiver.on_token_transfer(sender, value, data); + let supports = receiver.supports_interface(IERC677_RECEIVER_ID); + if supports { + receiver.on_token_transfer(sender, value, data); + } + true } - true } } diff --git a/contracts/src/libraries/type_and_version.cairo b/contracts/src/libraries/type_and_version.cairo new file mode 100644 index 000000000..b0481055d --- /dev/null +++ b/contracts/src/libraries/type_and_version.cairo @@ -0,0 +1,4 @@ +#[starknet::interface] +trait ITypeAndVersion { + fn type_and_version(self: @TContractState) -> felt252; +} diff --git a/contracts/src/libraries/upgradeable.cairo b/contracts/src/libraries/upgradeable.cairo index 5978238d0..388581be6 100644 --- a/contracts/src/libraries/upgradeable.cairo +++ b/contracts/src/libraries/upgradeable.cairo @@ -1,5 +1,7 @@ use starknet::class_hash::ClassHash; +// TODO: drop for OZ upgradeable + #[starknet::interface] trait IUpgradeable { // note: any contract that uses this module will have a mutable reference to contract state @@ -23,7 +25,7 @@ mod Upgradeable { // this method assumes replace_class_syscall has a very low possibility of being deprecated // but if it does, we will either have upgraded the contract to be non-upgradeable by then // because the starknet ecosystem has stabilized or we will be able to upgrade the contract to the proxy pattern - #[internal] + // #[internal] fn upgrade(new_impl: ClassHash) { assert(!new_impl.is_zero(), 'Class hash cannot be zero'); replace_class_syscall(new_impl).unwrap_syscall(); diff --git a/contracts/src/multisig.cairo b/contracts/src/multisig.cairo index 3d6ffe6e1..1728d3bde 100644 --- a/contracts/src/multisig.cairo +++ b/contracts/src/multisig.cairo @@ -49,7 +49,6 @@ trait IMultisig { fn is_confirmed(self: @TContractState, nonce: u128, signer: ContractAddress) -> bool; fn is_executed(self: @TContractState, nonce: u128) -> bool; fn get_transaction(self: @TContractState, nonce: u128) -> (Transaction, Array::); - fn type_and_version(self: @TContractState) -> felt252; fn submit_transaction( ref self: TContractState, to: ContractAddress, @@ -92,6 +91,7 @@ mod Multisig { use starknet::storage_write_syscall; use starknet::class_hash::ClassHash; + use chainlink::libraries::type_and_version::ITypeAndVersion; use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; #[event] @@ -161,6 +161,13 @@ mod Multisig { self._set_threshold(threshold); } + #[abi(embed_v0)] + impl TypeAndVersionImpl of ITypeAndVersion { + fn type_and_version(self: @ContractState,) -> felt252 { + 'Multisig 1.0.0' + } + } + #[external(v0)] impl UpgradeableImpl of IUpgradeable { fn upgrade(ref self: ContractState, new_impl: ClassHash) { @@ -215,10 +222,6 @@ mod Multisig { (transaction, calldata) } - fn type_and_version(self: @ContractState,) -> felt252 { - 'Multisig 1.0.0' - } - /// Externals fn submit_transaction( diff --git a/contracts/src/ocr2/aggregator.cairo b/contracts/src/ocr2/aggregator.cairo index f23f07347..873585924 100644 --- a/contracts/src/ocr2/aggregator.cairo +++ b/contracts/src/ocr2/aggregator.cairo @@ -63,7 +63,6 @@ trait IAggregator { fn round_data(self: @TContractState, round_id: u128) -> Round; fn description(self: @TContractState) -> felt252; fn decimals(self: @TContractState) -> u8; - fn type_and_version(self: @TContractState) -> felt252; } #[derive(Copy, Drop, Serde)] @@ -195,15 +194,29 @@ mod Aggregator { use starknet::class_hash::ClassHash; use chainlink::utils::split_felt; - use chainlink::libraries::ownable::{Ownable, IOwnable}; - use chainlink::libraries::access_control::AccessControl; + use chainlink::libraries::ownable::{OwnableComponent, IOwnable}; + use chainlink::libraries::access_control::{AccessControlComponent, IAccessController}; + use chainlink::libraries::access_control::AccessControlComponent::InternalTrait as AccessControlInternalTrait; use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; use openzeppelin::token::erc20::interface::{IERC20, IERC20Dispatcher, IERC20DispatcherTrait}; use chainlink::libraries::access_control::{ - IAccessController, IAccessControllerDispatcher, IAccessControllerDispatcherTrait + IAccessControllerDispatcher, IAccessControllerDispatcherTrait }; + use chainlink::libraries::type_and_version::ITypeAndVersion; + + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + component!(path: AccessControlComponent, storage: access_control, event: AccessControlEvent); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl OwnableInternalImpl = OwnableComponent::InternalImpl; + + #[abi(embed_v0)] + impl AccessControlImpl = + AccessControlComponent::AccessControlImpl; + impl AccessControlInternalImpl = AccessControlComponent::InternalImpl; const GIGA: u128 = 1000000000_u128; @@ -212,6 +225,10 @@ mod Aggregator { #[event] #[derive(Drop, starknet::Event)] enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event, + #[flat] + AccessControlEvent: AccessControlComponent::Event, NewTransmission: NewTransmission, ConfigSet: ConfigSet, LinkTokenSet: LinkTokenSet, @@ -266,6 +283,10 @@ mod Aggregator { #[storage] struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage, + #[substorage(v0)] + access_control: AccessControlComponent::Storage, /// Maximum number of faulty oracles _f: u8, _latest_epoch_and_round: u64, // (u32, u32) @@ -292,20 +313,30 @@ mod Aggregator { _billing: BillingConfig, // payee management _payees: LegacyMap, // - _proposed_payees: LegacyMap // + _proposed_payees: LegacyMap< + ContractAddress, ContractAddress + > // } - fn _require_read_access() { - let caller = starknet::info::get_caller_address(); - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::check_read_access(@state, caller); + #[generate_trait] + impl AccessHelperImpl of AccessHelperTrait { + fn _require_read_access(self: @ContractState) { + let caller = starknet::info::get_caller_address(); + self.access_control.check_read_access(caller); + } + } + + #[abi(embed_v0)] + impl TypeAndVersionImpl of ITypeAndVersion { + fn type_and_version(self: @ContractState) -> felt252 { + 'ocr2/aggregator.cairo 1.0.0' + } } #[external(v0)] impl AggregatorImpl of super::IAggregator { fn latest_round_data(self: @ContractState) -> Round { - _require_read_access(); + self._require_read_access(); let latest_round_id = self._latest_aggregator_round_id.read(); let transmission = self._transmissions.read(latest_round_id); Round { @@ -318,7 +349,7 @@ mod Aggregator { } fn round_data(self: @ContractState, round_id: u128) -> Round { - _require_read_access(); + self._require_read_access(); let transmission = self._transmissions.read(round_id); Round { round_id: round_id.into(), @@ -330,18 +361,14 @@ mod Aggregator { } fn description(self: @ContractState) -> felt252 { - _require_read_access(); + self._require_read_access(); self._description.read() } fn decimals(self: @ContractState) -> u8 { - _require_read_access(); + self._require_read_access(); self._decimals.read() } - - fn type_and_version(self: @ContractState) -> felt252 { - 'ocr2/aggregator.cairo 1.0.0' - } } // --- @@ -357,10 +384,8 @@ mod Aggregator { decimals: u8, description: felt252 ) { - let mut ownable = Ownable::unsafe_new_contract_state(); - Ownable::constructor(ref ownable, owner); // Ownable::initializer(owner); - let mut access_control = AccessControl::unsafe_new_contract_state(); - AccessControl::constructor(ref access_control); + self.ownable.initializer(owner); + self.access_control.initializer(); self._link_token.write(link); self._billing_access_controller.write(billing_access_controller); @@ -377,80 +402,11 @@ mod Aggregator { #[external(v0)] impl UpgradeableImpl of IUpgradeable { fn upgrade(ref self: ContractState, new_impl: ClassHash) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); Upgradeable::upgrade(new_impl) } } - // --- Ownership --- - - #[external(v0)] - impl OwnableImpl of IOwnable { - fn owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::owner(@state) - } - - fn proposed_owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::proposed_owner(@state) - } - - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::transfer_ownership(ref state, new_owner) - } - - fn accept_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::accept_ownership(ref state) - } - - fn renounce_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::renounce_ownership(ref state) - } - } - - // -- Access Control -- - - #[external(v0)] - impl AccessControllerImpl of IAccessController { - fn has_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::has_access(@state, user, data) - } - - fn add_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::add_access(ref state, user) - } - - fn remove_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::remove_access(ref state, user) - } - - fn enable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::enable_access_check(ref state) - } - - fn disable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::disable_access_check(ref state) - } - } - // --- Validation --- // NOTE: Currently unimplemented: @@ -529,8 +485,7 @@ mod Aggregator { offchain_config_version: u64, offchain_config: Array, ) -> felt252 { // digest - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); assert(oracles.len() <= MAX_ORACLES, 'too many oracles'); assert((3_u8 * f).into() < oracles.len(), 'faulty-oracle f too high'); assert(f > 0_u8, 'f must be positive'); @@ -900,8 +855,7 @@ mod Aggregator { fn set_link_token( ref self: ContractState, link_token: ContractAddress, recipient: ContractAddress ) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); let old_token = self._link_token.read(); @@ -968,8 +922,7 @@ mod Aggregator { fn set_billing_access_controller( ref self: ContractState, access_controller: ContractAddress ) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); let old_controller = self._billing_access_controller.read(); if access_controller == old_controller { @@ -1068,8 +1021,7 @@ mod Aggregator { impl BillingHelperImpl of BillingHelperTrait { fn has_billing_access(self: @ContractState) { let caller = starknet::info::get_caller_address(); - let ownable = Ownable::unsafe_new_contract_state(); - let owner = Ownable::OwnableImpl::owner(@ownable); + let owner = self.ownable.owner(); // owner always has access if caller == owner { @@ -1228,8 +1180,7 @@ mod Aggregator { #[external(v0)] impl PayeeManagementImpl of super::PayeeManagement { fn set_payees(ref self: ContractState, mut payees: Array) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); loop { match payees.pop_front() { Option::Some(payee) => { diff --git a/contracts/src/ocr2/aggregator_proxy.cairo b/contracts/src/ocr2/aggregator_proxy.cairo index bbb06c881..4204dddfb 100644 --- a/contracts/src/ocr2/aggregator_proxy.cairo +++ b/contracts/src/ocr2/aggregator_proxy.cairo @@ -9,7 +9,6 @@ trait IAggregatorProxy { fn round_data(self: @TContractState, round_id: felt252) -> Round; fn description(self: @TContractState) -> felt252; fn decimals(self: @TContractState) -> u8; - fn type_and_version(self: @TContractState) -> felt252; } #[starknet::interface] @@ -49,9 +48,13 @@ mod AggregatorProxy { use chainlink::ocr2::aggregator::IAggregator; use chainlink::ocr2::aggregator::Round; - use chainlink::libraries::ownable::{Ownable, IOwnable}; - use chainlink::libraries::access_control::{AccessControl, IAccessController}; + use chainlink::libraries::ownable::{OwnableComponent, IOwnable}; + use chainlink::libraries::access_control::{AccessControlComponent, IAccessController}; + use chainlink::libraries::access_control::AccessControlComponent::InternalTrait as AccessControlInternalTrait; use chainlink::utils::split_felt; + use chainlink::libraries::type_and_version::{ + ITypeAndVersion, ITypeAndVersionDispatcher, ITypeAndVersionDispatcherTrait + }; use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; const SHIFT: felt252 = 0x100000000000000000000000000000000; @@ -63,13 +66,39 @@ mod AggregatorProxy { aggregator: ContractAddress } + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + component!(path: AccessControlComponent, storage: access_control, event: AccessControlEvent); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl OwnableInternalImpl = OwnableComponent::InternalImpl; + + #[abi(embed_v0)] + impl AccessControlImpl = + AccessControlComponent::AccessControlImpl; + impl AccessControlInternalImpl = AccessControlComponent::InternalImpl; + #[storage] struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage, + #[substorage(v0)] + access_control: AccessControlComponent::Storage, _current_phase: Phase, _proposed_aggregator: ContractAddress, _phases: LegacyMap } + #[event] + #[derive(Drop, starknet::Event)] + enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event, + #[flat] + AccessControlEvent: AccessControlComponent::Event, + } + + // TODO: refactor these events #[event] fn AggregatorProposed(current: ContractAddress, proposed: ContractAddress) {} @@ -121,111 +150,40 @@ mod AggregatorProxy { let aggregator = IAggregatorDispatcher { contract_address: phase.aggregator }; aggregator.decimals() } + } + #[abi(embed_v0)] + impl TypeAndVersion of ITypeAndVersion { fn type_and_version(self: @ContractState) -> felt252 { let phase = self._current_phase.read(); - let aggregator = IAggregatorDispatcher { contract_address: phase.aggregator }; + let aggregator = ITypeAndVersionDispatcher { contract_address: phase.aggregator }; aggregator.type_and_version() } } #[constructor] fn constructor(ref self: ContractState, owner: ContractAddress, address: ContractAddress) { - // TODO: ownable and access control need to share owners and update when needed - let mut ownable = Ownable::unsafe_new_contract_state(); - Ownable::constructor(ref ownable, owner); - let mut access_control = AccessControl::unsafe_new_contract_state(); - AccessControl::constructor(ref access_control); + self.ownable.initializer(owner); + self.access_control.initializer(); self._set_aggregator(address); } - // --- Ownership --- - - #[external(v0)] - impl OwnableImpl of IOwnable { - fn owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::owner(@state) - } - - fn proposed_owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::proposed_owner(@state) - } - - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::transfer_ownership(ref state, new_owner) - } - - fn accept_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::accept_ownership(ref state) - } - - fn renounce_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::renounce_ownership(ref state) - } - } - // -- Upgradeable -- #[external(v0)] impl UpgradeableImpl of IUpgradeable { fn upgrade(ref self: ContractState, new_impl: ClassHash) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); Upgradeable::upgrade(new_impl) } } - - // -- Access Control -- - - #[external(v0)] - impl AccessControllerImpl of IAccessController { - fn has_access(self: @ContractState, user: ContractAddress, data: Array) -> bool { - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::has_access(@state, user, data) - } - - fn add_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::add_access(ref state, user) - } - - fn remove_access(ref self: ContractState, user: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::remove_access(ref state, user) - } - - fn enable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::enable_access_check(ref state) - } - - fn disable_access_check(ref self: ContractState) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); - let mut state = AccessControl::unsafe_new_contract_state(); - AccessControl::disable_access_check(ref state) - } - } - // #[external(v0)] impl AggregatorProxyInternal of super::IAggregatorProxyInternal { fn propose_aggregator(ref self: ContractState, address: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); assert(!address.is_zero(), 'proposed address is 0'); self._proposed_aggregator.write(address); @@ -234,8 +192,7 @@ mod AggregatorProxy { } fn confirm_aggregator(ref self: ContractState, address: ContractAddress) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); assert(!address.is_zero(), 'confirm address is 0'); let phase = self._current_phase.read(); let previous = phase.aggregator; @@ -289,8 +246,7 @@ mod AggregatorProxy { fn _require_read_access(self: @ContractState) { let caller = starknet::info::get_caller_address(); - let state = AccessControl::unsafe_new_contract_state(); - AccessControl::check_read_access(@state, caller); + self.access_control.check_read_access(caller); } } } diff --git a/contracts/src/ocr2/mocks/mock_aggregator.cairo b/contracts/src/ocr2/mocks/mock_aggregator.cairo index 4a8ab2038..038a3ba18 100644 --- a/contracts/src/ocr2/mocks/mock_aggregator.cairo +++ b/contracts/src/ocr2/mocks/mock_aggregator.cairo @@ -18,6 +18,7 @@ mod MockAggregator { use chainlink::ocr2::aggregator::IAggregator; use chainlink::ocr2::aggregator::Aggregator::{Transmission, NewTransmission}; use chainlink::ocr2::aggregator::Round; + use chainlink::libraries::type_and_version::ITypeAndVersion; #[event] use chainlink::ocr2::aggregator::Aggregator::Event; @@ -83,6 +84,13 @@ mod MockAggregator { } } + #[abi(embed_v0)] + impl TypeAndVersionImpl of ITypeAndVersion { + fn type_and_version(self: @ContractState) -> felt252 { + 'mock_aggregator.cairo 1.0.0' + } + } + #[external(v0)] impl Aggregator of IAggregator { fn round_data(self: @ContractState, round_id: u128) -> Round { @@ -109,9 +117,5 @@ mod MockAggregator { fn description(self: @ContractState) -> felt252 { 'mock' } - - fn type_and_version(self: @ContractState) -> felt252 { - 'mock_aggregator.cairo 1.0.0' - } } } diff --git a/contracts/src/tests/test_access_controller.cairo b/contracts/src/tests/test_access_controller.cairo index b267d24f5..4b96b2f30 100644 --- a/contracts/src/tests/test_access_controller.cairo +++ b/contracts/src/tests/test_access_controller.cairo @@ -31,7 +31,7 @@ fn setup() -> ContractAddress { #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_upgrade_not_owner() { let sender = setup(); let mut state = STATE(); diff --git a/contracts/src/tests/test_aggregator.cairo b/contracts/src/tests/test_aggregator.cairo index fbda54ee6..6268c9071 100644 --- a/contracts/src/tests/test_aggregator.cairo +++ b/contracts/src/tests/test_aggregator.cairo @@ -67,7 +67,7 @@ use chainlink::libraries::access_control::{ }; #[starknet::interface] -trait ILinkToken {} +trait ILinkToken {} fn STATE() -> Aggregator::ContractState { Aggregator::contract_state_for_testing() @@ -107,7 +107,7 @@ fn setup() -> ( } #[test] -#[available_gas(2000000)] +#[available_gas(3000000)] fn test_ownable() { let (account, _, _, _) = setup(); // Deploy aggregator @@ -153,7 +153,7 @@ fn test_access_control() { #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_upgrade_non_owner() { let sender = setup(); let mut state = STATE(); @@ -165,7 +165,7 @@ fn test_upgrade_non_owner() { #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_set_billing_access_controller_not_owner() { let (owner, acc2, billingAccessController, _) = setup(); let mut state = STATE(); @@ -281,7 +281,7 @@ fn test_set_billing_config_as_acc_with_access() { #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_set_payees_caller_not_owner() { let (owner, acc2, _, _) = setup(); let mut state = STATE(); diff --git a/contracts/src/tests/test_aggregator_proxy.cairo b/contracts/src/tests/test_aggregator_proxy.cairo index 4ae15a1ee..29fcbb3a2 100644 --- a/contracts/src/tests/test_aggregator_proxy.cairo +++ b/contracts/src/tests/test_aggregator_proxy.cairo @@ -17,8 +17,9 @@ use chainlink::ocr2::mocks::mock_aggregator::{ // use chainlink::ocr2::aggregator::{IAggregator, IAggregatorDispatcher, IAggregatorDispatcherTrait}; use chainlink::ocr2::aggregator_proxy::AggregatorProxy; use chainlink::ocr2::aggregator_proxy::AggregatorProxy::{ - AggregatorProxyImpl, AggregatorProxyInternal, AccessControllerImpl, UpgradeableImpl + AggregatorProxyImpl, AggregatorProxyInternal, UpgradeableImpl }; +use chainlink::libraries::access_control::AccessControlComponent::AccessControlImpl; use chainlink::ocr2::aggregator::Round; use chainlink::utils::split_felt; use chainlink::tests::test_ownable::should_implement_ownable; @@ -91,7 +92,7 @@ fn test_access_control() { #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_upgrade_non_owner() { let (_, _, _, _, _) = setup(); let mut state = STATE(); @@ -103,7 +104,7 @@ fn test_query_latest_round_data() { let mut state = STATE(); // init aggregator proxy with mock aggregator AggregatorProxy::constructor(ref state, owner, mockAggregatorAddr); - AccessControllerImpl::add_access(ref state, owner); + state.add_access(owner); // insert round into mock aggregator mockAggregator.set_latest_round_data(10, 1, 9, 8); // query latest round @@ -125,7 +126,7 @@ fn test_query_latest_round_data_without_access() { let mut state = STATE(); // init aggregator proxy with mock aggregator AggregatorProxy::constructor(ref state, owner, mockAggregatorAddr); - AccessControllerImpl::add_access(ref state, owner); + state.add_access(owner); // insert round into mock aggregator mockAggregator.set_latest_round_data(10, 1, 9, 8); // set caller to non-owner address with no read access @@ -142,7 +143,7 @@ fn test_propose_new_aggregator() { let mut state = STATE(); // init aggregator proxy with mock aggregator 1 AggregatorProxy::constructor(ref state, owner, mockAggregatorAddr1); - AccessControllerImpl::add_access(ref state, owner); + state.add_access(owner); // insert rounds into mock aggregators mockAggregator1.set_latest_round_data(10, 1, 9, 8); mockAggregator2.set_latest_round_data(12, 2, 10, 11); @@ -171,7 +172,7 @@ fn test_confirm_new_aggregator() { let mut state = STATE(); // init aggregator proxy with mock aggregator 1 AggregatorProxy::constructor(ref state, owner, mockAggregatorAddr1); - AccessControllerImpl::add_access(ref state, owner); + state.add_access(owner); // insert rounds into mock aggregators mockAggregator1.set_latest_round_data(10, 1, 9, 8); mockAggregator2.set_latest_round_data(12, 2, 10, 11); diff --git a/contracts/src/tests/test_erc677.cairo b/contracts/src/tests/test_erc677.cairo index 77bef112d..15932e7b5 100644 --- a/contracts/src/tests/test_erc677.cairo +++ b/contracts/src/tests/test_erc677.cairo @@ -13,7 +13,8 @@ use core::result::ResultTrait; use chainlink::token::mock::valid_erc667_receiver::ValidReceiver; use chainlink::token::mock::invalid_erc667_receiver::InvalidReceiver; -use chainlink::libraries::token::erc677::ERC677; +use chainlink::libraries::token::erc677::ERC677Component; +use chainlink::libraries::token::erc677::ERC677Component::ERC677Impl; #[starknet::interface] trait MockInvalidReceiver { @@ -54,11 +55,14 @@ fn setup_invalid_receiver() -> (ContractAddress, MockInvalidReceiverDispatcher) (address, contract) } +type ComponentState = + ERC677Component::ComponentState; + fn transfer_and_call(receiver: ContractAddress) { let data = ArrayTrait::::new(); // have to send 0 because ERC20 is not initialized with starting supply when using this library by itself - let mut erc677 = ERC677::unsafe_new_contract_state(); - ERC677::transfer_and_call(ref erc677, receiver, u256 { high: 0, low: 0 }, data); + let mut state: ComponentState = ERC677Component::component_state_for_testing(); + state.transfer_and_call(receiver, u256 { high: 0, low: 0 }, data); } #[test] diff --git a/contracts/src/tests/test_link_token.cairo b/contracts/src/tests/test_link_token.cairo index fa78d4fd7..719c1eb66 100644 --- a/contracts/src/tests/test_link_token.cairo +++ b/contracts/src/tests/test_link_token.cairo @@ -13,7 +13,8 @@ use option::OptionTrait; use core::result::ResultTrait; use chainlink::token::link_token::LinkToken; -use chainlink::token::link_token::LinkToken::{MintableToken, ERC20Impl, UpgradeableImpl}; +use chainlink::token::link_token::LinkToken::{MintableToken, UpgradeableImpl}; +use openzeppelin::token::erc20::ERC20Component::{ERC20Impl, ERC20MetadataImpl}; use chainlink::tests::test_ownable::should_implement_ownable; // only tests link token specific functionality @@ -64,8 +65,8 @@ fn test_constructor() { LinkToken::constructor(ref state, sender, sender); assert(LinkToken::minter(@state) == sender, 'minter valid'); - assert(ERC20Impl::name(@state) == 'ChainLink Token', 'name valid'); - assert(ERC20Impl::symbol(@state) == 'LINK', 'symbol valid'); + assert(state.erc20.name() == 'ChainLink Token', 'name valid'); + assert(state.erc20.symbol() == 'LINK', 'symbol valid'); } #[test] @@ -81,7 +82,7 @@ fn test_permissioned_mint_from_minter() { assert(ERC20Impl::balance_of(@state, to) == zero.into(), 'zero balance'); let amount: felt252 = 3000; - MintableToken::permissionedMint(ref state, to, amount.into()); + MintableToken::permissioned_mint(ref state, to, amount.into()); assert(ERC20Impl::balance_of(@state, sender) == zero.into(), 'zero balance'); assert(ERC20Impl::balance_of(@state, to) == amount.into(), 'expect balance'); @@ -98,7 +99,7 @@ fn test_permissioned_mint_from_nonminter() { let to = contract_address_const::<908>(); let amount: felt252 = 3000; - MintableToken::permissionedMint(ref state, to, amount.into()); + MintableToken::permissioned_mint(ref state, to, amount.into()); } #[test] @@ -112,21 +113,21 @@ fn test_permissioned_burn_from_minter() { let to = contract_address_const::<908>(); let amount: felt252 = 3000; - MintableToken::permissionedMint(ref state, to, amount.into()); + MintableToken::permissioned_mint(ref state, to, amount.into()); assert(ERC20Impl::balance_of(@state, to) == amount.into(), 'expect balance'); // burn some let burn_amount: felt252 = 2000; let remaining_amount: felt252 = amount - burn_amount; - MintableToken::permissionedBurn(ref state, to, burn_amount.into()); + MintableToken::permissioned_burn(ref state, to, burn_amount.into()); assert(ERC20Impl::balance_of(@state, to) == remaining_amount.into(), 'remaining balance'); // burn remaining - MintableToken::permissionedBurn(ref state, to, remaining_amount.into()); + MintableToken::permissioned_burn(ref state, to, remaining_amount.into()); assert(ERC20Impl::balance_of(@state, to) == zero.into(), 'no balance'); // burn too much - MintableToken::permissionedBurn(ref state, to, amount.into()); + MintableToken::permissioned_burn(ref state, to, amount.into()); } @@ -141,12 +142,12 @@ fn test_permissioned_burn_from_nonminter() { let to = contract_address_const::<908>(); let amount: felt252 = 3000; - MintableToken::permissionedBurn(ref state, to, amount.into()); + MintableToken::permissioned_burn(ref state, to, amount.into()); } #[test] #[available_gas(2000000)] -#[should_panic(expected: ('Ownable: caller is not owner',))] +#[should_panic(expected: ('Caller is not the owner',))] fn test_upgrade_non_owner() { let sender = setup(); let mut state = STATE(); diff --git a/contracts/src/tests/test_multisig.cairo b/contracts/src/tests/test_multisig.cairo index 8976eafa5..40c87a8e1 100644 --- a/contracts/src/tests/test_multisig.cairo +++ b/contracts/src/tests/test_multisig.cairo @@ -1,3 +1,5 @@ +use chainlink::multisig::IMultisigDispatcherTrait; +use core::traits::Into; use starknet::class_hash_const; use starknet::contract_address_const; use starknet::syscalls::deploy_syscall; @@ -13,6 +15,7 @@ use traits::TryInto; use chainlink::multisig::assert_unique_values; use chainlink::multisig::Multisig; use chainlink::multisig::Multisig::{MultisigImpl, UpgradeableImpl}; +use chainlink::multisig::{IMultisigDispatcher}; #[starknet::contract] mod MultisigTest { @@ -27,9 +30,6 @@ mod MultisigTest { } } -// TODO: test set_threshold with recursive call -// TODO: test set_signers with recursive call -// TODO: test set_signers_and_thershold with recursive call fn STATE() -> Multisig::ContractState { Multisig::contract_state_for_testing() @@ -434,3 +434,293 @@ fn test_execute_after_set_threshold() { set_caller_address(signer1); MultisigImpl::execute_transaction(ref state, nonce: 0); } + +// test set_threshold (non-recursive) +#[test] +fn test_set_threshold() { + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let s3 = contract_address_const::<3>(); + let signers = array![s1, s2, s3]; + let init_threshold: usize = 3; + let new_threshold: usize = 2; + + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@signers, ref deploy_calldata); + Serde::serialize(@init_threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + assert(multisig.get_threshold() == init_threshold, 'invalid init threshold'); + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.set_threshold(new_threshold); + assert(multisig.get_threshold() == new_threshold, 'threshold was not updated'); +} + +// test set_threshold with recursive call +#[test] +fn test_recursive_set_threshold() { + // Defines helper variables + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let signers = array![s1, s2]; + let init_threshold: usize = 2; + let new_threshold: usize = 1; + + // Deploys the contract + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@signers, ref deploy_calldata); + Serde::serialize(@init_threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + // Gets a dispatcher (so we can call methods on the deployed contract) + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + + // Checks that the threshold was correctly initialized on deployment + assert(multisig.get_threshold() == init_threshold, 'invalid init threshold'); + + // Recursive call occurs here - this code proposes a transaction to the + // multisig contract that calls the set_threshold function on the multisig + // contract. + let mut set_threshold_calldata = ArrayTrait::new(); + Serde::serialize(@new_threshold, ref set_threshold_calldata); + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig + .submit_transaction(multisig_address, selector!("set_threshold"), set_threshold_calldata); + + // Signer 1 confirms the transaction + set_caller_address(s1); + set_contract_address(s1); + multisig.confirm_transaction(0); + + // Signer 2 confirms the transaction + set_caller_address(s2); + set_contract_address(s2); + multisig.confirm_transaction(0); + + // Once we have enough confirmations, we execute the transaction + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.execute_transaction(0); + + // Now we check that the threshold was actually updated + assert(multisig.get_threshold() == new_threshold, 'threshold was not updated'); +} + +// test set_signers (non-recursive) +#[test] +fn test_set_signers() { + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let init_signers = array![s1, s2]; + let new_signers = array![s1]; + let threshold: usize = 2; + + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@init_signers, ref deploy_calldata); + Serde::serialize(@threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + + let returned_signers = multisig.get_signers(); + assert(returned_signers.len() == 2, 'should match signers length'); + assert(*returned_signers.at(0) == s1, 'should match signer 1'); + assert(*returned_signers.at(1) == s2, 'should match signer 2'); + assert(multisig.get_threshold() == 2, 'wrong init threshold'); + + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.set_signers(new_signers); + + let updated_signers = multisig.get_signers(); + assert(updated_signers.len() == 1, 'should match signers length'); + assert(*updated_signers.at(0) == s1, 'should match signer 1'); + assert(multisig.get_threshold() == 1, 'threshold not updated'); +} + +// test set_signers with recursive call +#[test] +fn test_recursive_set_signers() { + // Defines helper variables + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let init_signers = array![s1, s2]; + let new_signers = array![s1]; + let init_threshold: usize = 2; + + // Deploys the contract + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@init_signers, ref deploy_calldata); + Serde::serialize(@init_threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + // Gets a dispatcher (so we can call methods on the deployed contract) + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + + // Checks that the signers were correctly initialized on deployment + let returned_signers = multisig.get_signers(); + assert(returned_signers.len() == 2, 'should match signers length'); + assert(*returned_signers.at(0) == s1, 'should match signer 1'); + assert(*returned_signers.at(1) == s2, 'should match signer 2'); + assert(multisig.get_threshold() == 2, 'wrong init threshold'); + + // Recursive call occurs here - this code proposes a transaction to the + // multisig contract that calls the set_signers function on the multisig + // contract. + let mut set_signers_calldata = ArrayTrait::new(); + Serde::serialize(@new_signers, ref set_signers_calldata); + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.submit_transaction(multisig_address, selector!("set_signers"), set_signers_calldata); + + // Signer 1 confirms the transaction + set_caller_address(s1); + set_contract_address(s1); + multisig.confirm_transaction(0); + + // Signer 2 confirms the transaction + set_caller_address(s2); + set_contract_address(s2); + multisig.confirm_transaction(0); + + // Once we have enough confirmations, we execute the transaction + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.execute_transaction(0); + + // Now we check that the signers were actually updated + let updated_signers = multisig.get_signers(); + assert(updated_signers.len() == 1, 'should match signers length'); + assert(*updated_signers.at(0) == s1, 'should match signer 1'); + assert(multisig.get_threshold() == 1, 'wrong threshold'); +} + +// test set_signers_and_threshold (non-recursive) +#[test] +fn test_set_signers_and_threshold() { + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let s3 = contract_address_const::<3>(); + let init_signers = array![s1, s2, s3]; + let new_signers = array![s1, s2]; + let init_threshold: usize = 3; + let new_threshold: usize = 1; + + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@init_signers, ref deploy_calldata); + Serde::serialize(@init_threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + + let returned_signers = multisig.get_signers(); + assert(returned_signers.len() == 3, 'should match signers length'); + assert(*returned_signers.at(0) == s1, 'should match signer 1'); + assert(*returned_signers.at(1) == s2, 'should match signer 2'); + assert(*returned_signers.at(2) == s3, 'should match signer 3'); + assert(multisig.get_threshold() == init_threshold, 'wrong init threshold'); + + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.set_signers_and_threshold(new_signers, new_threshold); + + let updated_signers = multisig.get_signers(); + assert(updated_signers.len() == 2, 'should match signers length'); + assert(*updated_signers.at(0) == s1, 'should match signer 1'); + assert(*updated_signers.at(1) == s2, 'should match signer 2'); + assert(multisig.get_threshold() == new_threshold, 'threshold not updated'); +} + +// test set_signers_and_threshold with recursive call +#[test] +fn test_recursive_set_signers_and_threshold() { + // Defines helper variables + let s1 = contract_address_const::<1>(); + let s2 = contract_address_const::<2>(); + let s3 = contract_address_const::<3>(); + let init_signers = array![s1, s2, s3]; + let new_signers = array![s1, s2]; + let init_threshold: usize = 3; + let new_threshold: usize = 1; + + // Deploys the contract + let mut deploy_calldata = ArrayTrait::new(); + Serde::serialize(@init_signers, ref deploy_calldata); + Serde::serialize(@init_threshold, ref deploy_calldata); + let (multisig_address, _) = deploy_syscall( + Multisig::TEST_CLASS_HASH.try_into().unwrap(), 0, deploy_calldata.span(), false + ) + .unwrap(); + + // Gets a dispatcher (so we can call methods on the deployed contract) + let multisig = IMultisigDispatcher { contract_address: multisig_address }; + + // Checks that the initial state is correct + let returned_signers = multisig.get_signers(); + assert(returned_signers.len() == 3, 'should match signers length'); + assert(*returned_signers.at(0) == s1, 'should match signer 1'); + assert(*returned_signers.at(1) == s2, 'should match signer 2'); + assert(*returned_signers.at(2) == s3, 'should match signer 3'); + assert(multisig.get_threshold() == 3, 'wrong init threshold'); + + // Recursive call occurs here - this code proposes a transaction to the + // multisig contract that calls the set_signers_and_threshold function + // on the multisig contract. + let mut set_signers_and_threshold_calldata = ArrayTrait::new(); + Serde::serialize(@new_signers, ref set_signers_and_threshold_calldata); + Serde::serialize(@new_threshold, ref set_signers_and_threshold_calldata); + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig + .submit_transaction( + multisig_address, + selector!("set_signers_and_threshold"), + set_signers_and_threshold_calldata + ); + + // Signer 1 confirms the transaction + set_caller_address(s1); + set_contract_address(s1); + multisig.confirm_transaction(0); + + // Signer 2 confirms the transaction + set_caller_address(s2); + set_contract_address(s2); + multisig.confirm_transaction(0); + + // Signer 3 confirms the transaction + set_caller_address(s3); + set_contract_address(s3); + multisig.confirm_transaction(0); + + // Once we have enough confirmations, we execute the transaction + set_caller_address(multisig_address); + set_contract_address(multisig_address); + multisig.execute_transaction(0); + + // Now we check that the signers were actually updated + let updated_signers = multisig.get_signers(); + assert(updated_signers.len() == 2, 'should match signers length'); + assert(*updated_signers.at(0) == s1, 'should match signer 1'); + assert(*updated_signers.at(1) == s2, 'should match signer 2'); + assert(multisig.get_threshold() == 1, 'wrong threshold'); +} + diff --git a/contracts/src/tests/test_ownable.cairo b/contracts/src/tests/test_ownable.cairo index 63593fda3..54d543bc6 100644 --- a/contracts/src/tests/test_ownable.cairo +++ b/contracts/src/tests/test_ownable.cairo @@ -3,11 +3,45 @@ use starknet::ContractAddress; use starknet::testing::set_caller_address; use starknet::testing::set_contract_address; use zeroable::Zeroable; -use chainlink::libraries::ownable::{Ownable, IOwnable, IOwnableDispatcher, IOwnableDispatcherTrait}; -use chainlink::libraries::ownable::Ownable::OwnableImpl; +use chainlink::libraries::ownable::{ + OwnableComponent, IOwnable, IOwnableDispatcher, IOwnableDispatcherTrait +}; +use OwnableComponent::InternalTrait; + +#[starknet::contract] +mod OwnableMock { + use super::OwnableComponent; + use starknet::ContractAddress; + + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl InternalImpl = OwnableComponent::InternalImpl; + + #[storage] + struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage + } + + #[event] + #[derive(Drop, starknet::Event)] + enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event + } + + #[constructor] + fn constructor(ref self: ContractState, owner: ContractAddress) { + self.ownable.initializer(owner); + } +} + +type ComponentState = OwnableComponent::ComponentState; -fn STATE() -> Ownable::ContractState { - Ownable::contract_state_for_testing() +fn STATE() -> ComponentState { + OwnableComponent::component_state_for_testing() } fn setup() -> (ContractAddress, ContractAddress) { @@ -23,8 +57,8 @@ fn test_assert_only_owner() { let (owner, _) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); - Ownable::assert_only_owner(@state); + state.initializer(owner); + state.assert_only_owner(); } #[test] @@ -34,9 +68,9 @@ fn test_assert_only_owner_panics_if_not_owner() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); + state.initializer(owner); set_caller_address(other_user); - Ownable::assert_only_owner(@state); + state.assert_only_owner(); } #[test] @@ -45,9 +79,9 @@ fn test_owner() { let (owner, _) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); + state.initializer(owner); - assert(owner == OwnableImpl::owner(@state), 'should equal owner'); + assert(owner == state.owner(), 'should equal owner'); } #[test] @@ -56,10 +90,10 @@ fn test_transfer_ownership() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); - OwnableImpl::transfer_ownership(ref state, other_user); + state.initializer(owner); + state.transfer_ownership(other_user); - assert(other_user == OwnableImpl::proposed_owner(@state), 'should equal proposed owner'); + assert(other_user == state.proposed_owner(), 'should equal proposed owner'); } #[test] @@ -69,8 +103,8 @@ fn test_transfer_ownership_panics_if_zero_address() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); - OwnableImpl::transfer_ownership(ref state, Zeroable::zero()); + state.initializer(owner); + state.transfer_ownership(Zeroable::zero()); } #[test] @@ -80,9 +114,9 @@ fn test_transfer_ownership_panics_if_not_owner() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); + state.initializer(owner); set_caller_address(other_user); - OwnableImpl::transfer_ownership(ref state, other_user); + state.transfer_ownership(other_user); } #[test] @@ -91,12 +125,12 @@ fn test_accept_ownership() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); - OwnableImpl::transfer_ownership(ref state, other_user); + state.initializer(owner); + state.transfer_ownership(other_user); set_caller_address(other_user); - OwnableImpl::accept_ownership(ref state); + state.accept_ownership(); - assert(OwnableImpl::owner(@state) == other_user, 'failed to accept ownership'); + assert(state.owner() == other_user, 'failed to accept ownership'); } #[test] @@ -106,11 +140,11 @@ fn test_accept_ownership_panics_if_not_proposed_owner() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); - OwnableImpl::transfer_ownership(ref state, other_user); + state.initializer(owner); + state.transfer_ownership(other_user); set_caller_address(contract_address_const::<3>()); - OwnableImpl::accept_ownership(ref state); + state.accept_ownership(); } #[test] @@ -120,10 +154,10 @@ fn test_renounce_ownership() { let mut state = STATE(); set_caller_address(owner); - Ownable::constructor(ref state, owner); - OwnableImpl::renounce_ownership(ref state); + state.initializer(owner); + state.renounce_ownership(); - assert(OwnableImpl::owner(@state).is_zero(), 'owner not 0 after renounce'); + assert(state.owner().is_zero(), 'owner not 0 after renounce'); } #[test] @@ -133,9 +167,9 @@ fn test_renounce_ownership_panics_if_not_owner() { let (owner, other_user) = setup(); let mut state = STATE(); - Ownable::constructor(ref state, owner); + state.initializer(owner); set_caller_address(other_user); - OwnableImpl::renounce_ownership(ref state); + state.renounce_ownership(); } // // General ownable contract tests diff --git a/contracts/src/tests/test_upgradeable.cairo b/contracts/src/tests/test_upgradeable.cairo index 1605b0439..c7cd16f8c 100644 --- a/contracts/src/tests/test_upgradeable.cairo +++ b/contracts/src/tests/test_upgradeable.cairo @@ -7,7 +7,6 @@ use starknet::class_hash::class_hash_const; use starknet::syscalls::deploy_syscall; use chainlink::libraries::upgradeable::Upgradeable; -use chainlink::libraries::ownable::Ownable; use chainlink::libraries::mocks::mock_upgradeable::{ MockUpgradeable, IMockUpgradeableDispatcher, IMockUpgradeableDispatcherTrait, IMockUpgradeableDispatcherImpl @@ -23,15 +22,6 @@ fn setup() -> ContractAddress { account } -#[test] -#[available_gas(2000000)] -fn test_upgrade() { - let sender = setup(); - - // doesn't error - Upgradeable::upgrade(class_hash_const::<1>()); -} - #[test] #[available_gas(2000000)] fn test_upgrade_and_call() { diff --git a/contracts/src/token/link_token.cairo b/contracts/src/token/link_token.cairo index 0d793c9ea..c3e139c89 100644 --- a/contracts/src/token/link_token.cairo +++ b/contracts/src/token/link_token.cairo @@ -1,11 +1,10 @@ use starknet::ContractAddress; +// https://github.com/starknet-io/starkgate-contracts/blob/v2.0/src/cairo/mintable_token_interface.cairo #[starknet::interface] trait IMintableToken { - #[external(v0)] - fn permissionedMint(ref self: TContractState, account: ContractAddress, amount: u256); - #[external(v0)] - fn permissionedBurn(ref self: TContractState, account: ContractAddress, amount: u256); + fn permissioned_mint(ref self: TContractState, account: ContractAddress, amount: u256); + fn permissioned_burn(ref self: TContractState, account: ContractAddress, amount: u256); } #[starknet::contract] @@ -14,21 +13,56 @@ mod LinkToken { use zeroable::Zeroable; + use openzeppelin::token::erc20::interface::{IERC20, IERC20Dispatcher, IERC20DispatcherTrait}; + use chainlink::libraries::token::erc677::ERC677Component; + use chainlink::libraries::ownable::{OwnableComponent, IOwnable}; + use chainlink::libraries::type_and_version::ITypeAndVersion; + use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; + + use openzeppelin::token::erc20::ERC20Component; use starknet::ContractAddress; use starknet::class_hash::ClassHash; - use openzeppelin::token::erc20::ERC20; - use openzeppelin::token::erc20::interface::{IERC20, IERC20Dispatcher, IERC20DispatcherTrait}; - use chainlink::libraries::token::erc677::ERC677; - use chainlink::libraries::ownable::{Ownable, IOwnable}; - use chainlink::libraries::upgradeable::{Upgradeable, IUpgradeable}; + component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); + component!(path: ERC20Component, storage: erc20, event: ERC20Event); + component!(path: ERC677Component, storage: erc677, event: ERC677Event); + + #[abi(embed_v0)] + impl OwnableImpl = OwnableComponent::OwnableImpl; + impl InternalImpl = OwnableComponent::InternalImpl; + + #[abi(embed_v0)] + impl ERC20Impl = ERC20Component::ERC20Impl; + #[abi(embed_v0)] + impl ERC20MetadataImpl = ERC20Component::ERC20MetadataImpl; + impl ERC20InternalImpl = ERC20Component::InternalImpl; + + #[abi(embed_v0)] + impl ERC677Impl = ERC677Component::ERC677Impl; const NAME: felt252 = 'ChainLink Token'; const SYMBOL: felt252 = 'LINK'; #[storage] struct Storage { + #[substorage(v0)] + ownable: OwnableComponent::Storage, _minter: ContractAddress, + #[substorage(v0)] + erc20: ERC20Component::Storage, + #[substorage(v0)] + erc677: ERC677Component::Storage + } + + #[event] + #[derive(Drop, starknet::Event)] + enum Event { + #[flat] + OwnableEvent: OwnableComponent::Event, + #[flat] + ERC20Event: ERC20Component::Event, + #[flat] + ERC677Event: ERC677Component::Event } // @@ -36,155 +70,46 @@ mod LinkToken { // #[external(v0)] impl MintableToken of IMintableToken { - fn permissionedMint(ref self: ContractState, account: ContractAddress, amount: u256) { + fn permissioned_mint(ref self: ContractState, account: ContractAddress, amount: u256) { only_minter(@self); - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::InternalImpl::_mint(ref state, account, amount); + self.erc20._mint(account, amount); } - fn permissionedBurn(ref self: ContractState, account: ContractAddress, amount: u256) { + fn permissioned_burn(ref self: ContractState, account: ContractAddress, amount: u256) { only_minter(@self); - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::InternalImpl::_burn(ref state, account, amount); + self.erc20._burn(account, amount); } } #[constructor] fn constructor(ref self: ContractState, minter: ContractAddress, owner: ContractAddress) { - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::InternalImpl::initializer(ref state, NAME, SYMBOL); + self.erc20.initializer(NAME, SYMBOL); assert(!minter.is_zero(), 'minter is 0'); self._minter.write(minter); - let mut ownable = Ownable::unsafe_new_contract_state(); - Ownable::constructor(ref ownable, owner); // Ownable::initializer(owner); + self.ownable.initializer(owner); } - #[view] + // TODO #[view] fn minter(self: @ContractState) -> ContractAddress { self._minter.read() } - #[view] - fn type_and_version(self: @ContractState) -> felt252 { - 'LinkToken 1.0.0' - } - - // - // ERC677 - // - - #[external(v0)] - fn transfer_and_call( - ref self: ContractState, to: ContractAddress, value: u256, data: Array - ) -> bool { - let mut erc677 = ERC677::unsafe_new_contract_state(); - ERC677::transfer_and_call(ref erc677, to, value, data) + #[abi(embed_v0)] + impl TypeAndVersionImpl of ITypeAndVersion { + fn type_and_version(self: @ContractState) -> felt252 { + 'LinkToken 1.0.0' + } } - // - // Upgradeable - // #[external(v0)] impl UpgradeableImpl of IUpgradeable { fn upgrade(ref self: ContractState, new_impl: ClassHash) { - let ownable = Ownable::unsafe_new_contract_state(); - Ownable::assert_only_owner(@ownable); + self.ownable.assert_only_owner(); Upgradeable::upgrade(new_impl) } } - // - // Ownership - // - - #[external(v0)] - impl OwnableImpl of IOwnable { - fn owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::owner(@state) - } - - fn proposed_owner(self: @ContractState) -> ContractAddress { - let state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::proposed_owner(@state) - } - - fn transfer_ownership(ref self: ContractState, new_owner: ContractAddress) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::transfer_ownership(ref state, new_owner) - } - - fn accept_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::accept_ownership(ref state) - } - - fn renounce_ownership(ref self: ContractState) { - let mut state = Ownable::unsafe_new_contract_state(); - Ownable::OwnableImpl::renounce_ownership(ref state) - } - } - - // - // ERC20 - // - - #[external(v0)] - impl ERC20Impl of IERC20 { - fn name(self: @ContractState) -> felt252 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::name(@state) - } - - fn symbol(self: @ContractState) -> felt252 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::symbol(@state) - } - - fn decimals(self: @ContractState) -> u8 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::decimals(@state) - } - - fn total_supply(self: @ContractState) -> u256 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::total_supply(@state) - } - - fn balance_of(self: @ContractState, account: ContractAddress) -> u256 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::balance_of(@state, account) - } - - fn allowance( - self: @ContractState, owner: ContractAddress, spender: ContractAddress - ) -> u256 { - let state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::allowance(@state, owner, spender) - } - - fn transfer(ref self: ContractState, recipient: ContractAddress, amount: u256) -> bool { - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::transfer(ref state, recipient, amount) - } - - fn transfer_from( - ref self: ContractState, - sender: ContractAddress, - recipient: ContractAddress, - amount: u256 - ) -> bool { - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::transfer_from(ref state, sender, recipient, amount) - } - - fn approve(ref self: ContractState, spender: ContractAddress, amount: u256) -> bool { - let mut state = ERC20::unsafe_new_contract_state(); - ERC20::ERC20Impl::approve(ref state, spender, amount) - } - } - // fn increase_allowance(ref self: ContractState, spender: ContractAddress, added_value: u256) -> bool { // let mut state = ERC20::unsafe_new_contract_state(); // ERC20::ERC20Impl::increase_allowance(ref state, spender, added_value) diff --git a/contracts/test/ocr2/aggregator.test.ts b/contracts/test/ocr2/aggregator.test.ts index 42fc89c95..3d53e7ccd 100644 --- a/contracts/test/ocr2/aggregator.test.ts +++ b/contracts/test/ocr2/aggregator.test.ts @@ -36,8 +36,6 @@ describe('Aggregator', function () { let oracles: Oracle[] = [] let config_digest: number - let answer: string - before(async () => { aggregatorFactory = await starknet.getContractFactory('aggregator') @@ -56,7 +54,7 @@ describe('Aggregator', function () { owner: owner.starknetContract.address, }) - await owner.invoke(token, 'permissionedMint', { + await owner.invoke(token, 'permissioned_mint', { account: owner.starknetContract.address, amount: 100_000_000_000, }) diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts deleted file mode 100644 index da5e03a5e..000000000 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ /dev/null @@ -1,275 +0,0 @@ -import { expect } from 'chai' -import { StarknetContract, Account } from 'hardhat/types/runtime' -import { uint256, num } from 'starknet' -import { TIMEOUT } from '../../../constants' -import { expectInvokeError } from '@chainlink/starknet/src/utils' - -export type BeforeFn = () => Promise -export type TestData = { - token: StarknetContract - owner: Account - alice: Account - bob: Account -} - -const addresses = (t: TestData) => ({ - owner: t.owner.starknetContract.address, - bob: t.bob.starknetContract.address, - alice: t.alice.starknetContract.address, -}) - -const expectERC20Balance = async (token: StarknetContract, acc: Account, expected: number) => { - const { balance: raw } = await token.call('balanceOf', { - account: acc.starknetContract.address, - }) - const balance = uint256.uint256ToBN(raw) - expect(balance).to.deep.equal(num.toBigInt(expected)) -} - -const expectERC20TotalSupply = async (token: StarknetContract, expected: number) => { - const { totalSupply: raw } = await token.call('totalSupply', {}) - const totalSupply = uint256.uint256ToBN(raw) - expect(totalSupply).to.deep.equal(num.toBigInt(expected)) -} - -export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { - describe('StarkGate.ERC20 behavior', function () { - this.timeout(TIMEOUT) - - let t: TestData - - before(async () => { - t = await beforeFn() - }) - - it(`should 'permissionedMint' successfully (2x)`, async () => { - const { alice, bob } = addresses(t) - - await t.owner.invoke(t.token, 'permissionedMint', { - account: alice, - amount: uint256.bnToUint256(15), - }) - - await expectERC20Balance(t.token, t.alice, 15) - - await t.owner.invoke(t.token, 'permissionedMint', { - account: bob, - amount: uint256.bnToUint256(12), - }) - - await expectERC20TotalSupply(t.token, 27) - await expectERC20Balance(t.token, t.bob, 12) - }) - - it(`should 'permissionedBurn' successfully (2x)`, async () => { - const { alice, bob } = addresses(t) - - await t.owner.invoke(t.token, 'permissionedBurn', { - account: alice, - amount: uint256.bnToUint256(3), - }) - - await expectERC20TotalSupply(t.token, 24) - await expectERC20Balance(t.token, t.alice, 12) - - await t.owner.invoke(t.token, 'permissionedBurn', { - account: bob, - amount: uint256.bnToUint256(10), - }) - - await expectERC20TotalSupply(t.token, 14) - await expectERC20Balance(t.token, t.bob, 2) - }) - - it(`reverts on 'permissionedBurn' (amount > balance)`, async () => { - const { alice, bob } = addresses(t) - - await expectInvokeError( - t.owner.invoke(t.token, 'permissionedBurn', { - account: bob, - amount: uint256.bnToUint256(103), - }), - ) - - await expectInvokeError( - t.owner.invoke(t.token, 'permissionedBurn', { - account: alice, - amount: uint256.bnToUint256(189), - }), - ) - }) - - it(`reverts on 'permissionedBurn' without permission`, async () => { - const { alice, bob } = addresses(t) - - await expectInvokeError( - t.alice.invoke(t.token, 'permissionedBurn', { - account: bob, - amount: uint256.bnToUint256(103), - }), - ) - - await expectInvokeError( - t.bob.invoke(t.token, 'permissionedBurn', { - account: alice, - amount: uint256.bnToUint256(189), - }), - ) - }) - - it(`should 'permissionedMint' and 'transfer' successfully`, async () => { - const { alice, bob } = addresses(t) - - await t.owner.invoke(t.token, 'permissionedMint', { - account: bob, - amount: uint256.bnToUint256(3), - }) - await t.alice.invoke(t.token, 'transfer', { - recipient: bob, - amount: uint256.bnToUint256(3), - }) - - await expectERC20Balance(t.token, t.alice, 9) - await expectERC20Balance(t.token, t.bob, 8) - - await t.bob.invoke(t.token, 'transfer', { - recipient: alice, - amount: uint256.bnToUint256(4), - }) - - await expectERC20Balance(t.token, t.alice, 13) - await expectERC20Balance(t.token, t.bob, 4) - }) - - it(`reverts on 'transfer' (amount > balance)`, async () => { - const { alice, bob } = addresses(t) - - await expectInvokeError( - t.bob.invoke(t.token, 'transfer', { - recipient: alice, - amount: uint256.bnToUint256(12), - }), - 'ERC20: transfer amount exceeds balance', - ) - - await expectInvokeError( - t.alice.invoke(t.token, 'transfer', { - recipient: bob, - amount: uint256.bnToUint256(17), - }), - 'ERC20: transfer amount exceeds balance', - ) - }) - - it(`should 'increaseAllowance' and 'transferFrom' successfully - #1`, async () => { - const { owner, alice, bob } = addresses(t) - - await t.bob.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(7), - }) - await t.alice.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(7), - }) - - await t.owner.invoke(t.token, 'transferFrom', { - sender: alice, - recipient: bob, - amount: uint256.bnToUint256(3), - }) - - await expectERC20Balance(t.token, t.alice, 10) - await expectERC20Balance(t.token, t.bob, 7) - - await t.owner.invoke(t.token, 'transferFrom', { - sender: bob, - recipient: alice, - amount: uint256.bnToUint256(4), - }) - - await expectERC20Balance(t.token, t.alice, 14) - await expectERC20Balance(t.token, t.bob, 3) - }) - - it(`should 'increaseAllowance' and 'transferFrom' successfully - #2`, async () => { - const { owner, alice, bob } = addresses(t) - - await t.bob.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(7), - }) - await t.alice.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(7), - }) - - await t.owner.invoke(t.token, 'transferFrom', { - sender: alice, - recipient: bob, - amount: uint256.bnToUint256(3), - }) - - await expectERC20Balance(t.token, t.alice, 11) - await expectERC20Balance(t.token, t.bob, 6) - - await t.bob.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(15), - }) - await t.alice.invoke(t.token, 'increaseAllowance', { - spender: owner, - added_value: uint256.bnToUint256(15), - }) - - await t.owner.invoke(t.token, 'transferFrom', { - sender: alice, - recipient: bob, - amount: uint256.bnToUint256(11), - }) - - await expectERC20Balance(t.token, t.alice, 0) - await expectERC20Balance(t.token, t.bob, 17) - }) - - it(`should 'decreaseAllowance' and 'transferFrom' successfully`, async () => { - const { owner, alice, bob } = addresses(t) - - await t.bob.invoke(t.token, 'decreaseAllowance', { - spender: owner, - subtracted_value: uint256.bnToUint256(10), - }) - - await t.owner.invoke(t.token, 'transferFrom', { - sender: bob, - recipient: alice, - amount: uint256.bnToUint256(1), - }) - - await expectERC20Balance(t.token, t.alice, 1) - await expectERC20Balance(t.token, t.bob, 16) - }) - - it(`reverts on 'transferFrom' (amount > allowance)`, async () => { - const { alice, bob } = addresses(t) - - await expectInvokeError( - t.owner.invoke(t.token, 'transferFrom', { - sender: bob, - recipient: alice, - amount: { low: 8n, high: 10n }, - }), - 'ERC20: insufficient allowance', - ) - - await expectInvokeError( - t.owner.invoke(t.token, 'transferFrom', { - sender: alice, - recipient: bob, - amount: uint256.bnToUint256(208), - }), - 'ERC20: insufficient allowance', - ) - }) - }) -} diff --git a/examples/contracts/proxy-consumer/package.json b/examples/contracts/proxy-consumer/package.json index 431231eff..676bed3ef 100644 --- a/examples/contracts/proxy-consumer/package.json +++ b/examples/contracts/proxy-consumer/package.json @@ -10,6 +10,6 @@ }, "license": "MIT", "dependencies": { - "starknet": "^5.2.0" + "starknet": "^6.0.0-beta.11" } } diff --git a/flake.lock b/flake.lock index 99fbfe931..d21fabcde 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1697456312, - "narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=", + "lastModified": 1704538339, + "narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ca012a02bf8327be9e488546faecae5e05d7d749", + "rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701", "type": "github" }, "original": { @@ -81,11 +81,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1692238117, - "narHash": "sha256-gOoxig/GBuGOYWqE3+7OMrgPVduxjjsbo4qikRb1h3s=", + "lastModified": 1704680242, + "narHash": "sha256-5bD6iSPDgVTLly2gy2oJVwzuyuFZOz2p4qt8c8UoYIE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3e0e4ec062706ebba759795ad18ad72ad69d41f3", + "rev": "2037779e018ebc2d381001a891e2a793fce7a74f", "type": "github" }, "original": { diff --git a/integration-tests/README.md b/integration-tests/README.md index 4fb7efdfa..cbf5276b5 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -1,7 +1,38 @@ -# Local k8s run +# Local e2e testing -See [there](../docs/integration-tests/README.md) +Make sure to have `psql` installed locally. We use it to create a new database for each node. -# Integration Tests +Create a new network for containers (only needs to be done once). A custom network allows containers to DNS resolve each other using container names. + +``` +docker network create chainlink +``` + +Build a custom core image with starknet relayer bumped to some commit. + +``` +cd ../core +go get github.com/smartcontractkit/chainlink-starknet/relayer@ +docker build . -t smartcontract/chainlink:starknet -f ./core/chainlink.Dockerfile +``` + +Compile contracts and gauntlet: + +``` +yarn build +cd contracts +scarb --profile release build +``` + +Run the tests! + +``` +cd integration-tests +go test -count 1 -v -timeout 30m --run OCRBasic ./smoke +``` + +Use `something.down.sh` scripts to teardown everything afterwards if the tests don't properly clean up. + +# Old docs For more information, see the [Chainlink Starknet Documentation | Integration Tests](../docs/integration-tests). diff --git a/integration-tests/common/common.go b/integration-tests/common/common.go index 64d4248d8..29a79054f 100644 --- a/integration-tests/common/common.go +++ b/integration-tests/common/common.go @@ -1,8 +1,12 @@ package common import ( + "bytes" "fmt" + "io" "os" + "os/exec" + "regexp" "strconv" "strings" "testing" @@ -11,15 +15,11 @@ import ( "github.com/google/uuid" "github.com/lib/pq" "github.com/rs/zerolog/log" + "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/caigo/gateway" - - "github.com/smartcontractkit/chainlink-starknet/ops/devnet" "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/alias" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - mock_adapter "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mock-adapter" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/relay" @@ -27,10 +27,11 @@ import ( var ( serviceKeyL1 = "Hardhat" - serviceKeyL2 = "starknet-dev" + serviceKeyL2 = "chainlink-starknet.starknet-devnet" serviceKeyChainlink = "chainlink" chainName = "starknet" - chainId = gateway.GOERLI_ID + chainId = "SN_GOERLI" + defaultNodeUrl = "http://127.0.0.1:5050" ) type Common struct { @@ -45,119 +46,310 @@ type Common struct { TestDuration time.Duration Testnet bool L2RPCUrl string + MockUrl string PrivateKey string Account string - ClConfig map[string]interface{} - K8Config *environment.Config + ChainlinkConfig string Env *environment.Environment } -func New() *Common { - var err error - c := &Common{ - ChainName: chainName, - ChainId: chainId, - ServiceKeyChainlink: serviceKeyChainlink, - ServiceKeyL1: serviceKeyL1, - ServiceKeyL2: serviceKeyL2, +// getEnv gets the environment variable if it exists and sets it for the remote runner +func getEnv(v string) string { + val := os.Getenv(v) + if val != "" { + os.Setenv(fmt.Sprintf("TEST_%s", v), val) } + return val +} + +func getNodeCount() int { // Checking if count of OCR nodes is defined in ENV nodeCountSet := getEnv("NODE_COUNT") - if nodeCountSet != "" { - c.NodeCount, err = strconv.Atoi(nodeCountSet) - if err != nil { - panic(fmt.Sprintf("Please define a proper node count for the test: %v", err)) - } - } else { - panic("Please define NODE_COUNT") + if nodeCountSet == "" { + nodeCountSet = "4" + } + nodeCount, err := strconv.Atoi(nodeCountSet) + if err != nil { + panic(fmt.Sprintf("Please define a proper node count for the test: %v", err)) } + return nodeCount +} - // Checking if TTL env var is set in ENV +func getTTL() time.Duration { ttlValue := getEnv("TTL") - if ttlValue != "" { - duration, err := time.ParseDuration(ttlValue) - if err != nil { - panic(fmt.Sprintf("Please define a proper duration for the namespace: %v", err)) - } - c.TTL, err = time.ParseDuration(*alias.ShortDur(duration)) - if err != nil { - panic(fmt.Sprintf("Please define a proper duration for the namespace: %v", err)) - } - } else { - panic("Please define TTL of env") + if ttlValue == "" { + ttlValue = "72h" + } + duration, err := time.ParseDuration(ttlValue) + if err != nil { + panic(fmt.Sprintf("Please define a proper TTL for the test: %v", err)) + } + t, err := time.ParseDuration(*alias.ShortDur(duration)) + if err != nil { + panic(fmt.Sprintf("Please define a proper TTL for the test: %v", err)) } + return t +} - // Setting optional parameters +func getTestDuration() time.Duration { testDurationValue := getEnv("TEST_DURATION") - if testDurationValue != "" { - duration, err := time.ParseDuration(testDurationValue) - if err != nil { - panic(fmt.Sprintf("Please define a proper duration for the test: %v", err)) - } - c.TestDuration, err = time.ParseDuration(*alias.ShortDur(duration)) - if err != nil { - panic(fmt.Sprintf("Please define a proper duration for the test: %v", err)) - } - } else { - c.TestDuration = time.Duration(time.Minute * 15) + if testDurationValue == "" { + return time.Duration(time.Minute * 15) + } + duration, err := time.ParseDuration(testDurationValue) + if err != nil { + panic(fmt.Sprintf("Please define a proper duration for the test: %v", err)) + } + t, err := time.ParseDuration(*alias.ShortDur(duration)) + if err != nil { + panic(fmt.Sprintf("Please define a proper duration for the test: %v", err)) + } + return t +} + +func New(t *testing.T) *Common { + c := &Common{ + ChainName: chainName, + ChainId: chainId, + NodeCount: getNodeCount(), + TTL: getTTL(), + TestDuration: getTestDuration(), + ServiceKeyChainlink: serviceKeyChainlink, + ServiceKeyL1: serviceKeyL1, + ServiceKeyL2: serviceKeyL2, + L2RPCUrl: getEnv("L2_RPC_URL"), // Fetch L2 RPC url if defined + MockUrl: "http://host.containers.internal:6060", + PrivateKey: getEnv("PRIVATE_KEY"), + Account: getEnv("ACCOUNT"), + // P2PPort: "6690", } - c.L2RPCUrl = getEnv("L2_RPC_URL") // Fetch L2 RPC url if defined c.Testnet = c.L2RPCUrl != "" - c.PrivateKey = getEnv("PRIVATE_KEY") - c.Account = getEnv("ACCOUNT") + // TODO: HAXX: we force the URL to a local docker container + c.L2RPCUrl = defaultNodeUrl + + starknetUrl := fmt.Sprintf("http://%s:%d/rpc", serviceKeyL2, 5050) + if c.Testnet { + starknetUrl = c.L2RPCUrl + } + + chainlinkConfig := fmt.Sprintf(`[[Starknet]] +Enabled = true +ChainID = '%s' +[[Starknet.Nodes]] +Name = 'primary' +URL = '%s' + +[OCR2] +Enabled = true + +[P2P] +[P2P.V2] +Enabled = true +DeltaDial = '5s' +DeltaReconcile = '5s' +ListenAddresses = ['0.0.0.0:6690'] + +[WebServer] +HTTPPort = 6688 +[WebServer.TLS] +HTTPSPort = 0 +`, c.ChainId, starknetUrl) + + c.ChainlinkConfig = chainlinkConfig + log.Debug().Str("toml", chainlinkConfig).Msg("Created chainlink config") + + c.Env = &environment.Environment{} return c } -// getEnv gets the environment variable if it exists and sets it for the remote runner -func getEnv(v string) string { - val := os.Getenv(v) - if val != "" { - os.Setenv(fmt.Sprintf("TEST_%s", v), val) +// CapturingPassThroughWriter is a writer that remembers +// data written to it and passes it to w +type CapturingPassThroughWriter struct { + buf bytes.Buffer + w io.Writer +} + +// NewCapturingPassThroughWriter creates new CapturingPassThroughWriter +func NewCapturingPassThroughWriter(w io.Writer) *CapturingPassThroughWriter { + return &CapturingPassThroughWriter{ + w: w, } - return val } -// CreateKeys Creates node keys and defines chain and nodes for each node -func (c *Common) CreateKeys(env *environment.Environment) ([]client.NodeKeysBundle, []*client.ChainlinkK8sClient, error) { - chainlinkK8Nodes, err := client.ConnectChainlinkNodes(env) +func (w *CapturingPassThroughWriter) Write(d []byte) (int, error) { + w.buf.Write(d) + return w.w.Write(d) +} + +// Bytes returns bytes written to the writer +func (w *CapturingPassThroughWriter) Bytes() []byte { + return w.buf.Bytes() +} + +func debug(cmd *exec.Cmd) error { + stdout, err := cmd.StdoutPipe() if err != nil { - return nil, nil, err + panic(err) + } + stderr, err := cmd.StderrPipe() + if err != nil { + panic(err) + } + + if err := cmd.Start(); err != nil { + panic(err) + } + + doneStdOut := make(chan any) + doneStdErr := make(chan any) + osstdout := NewCapturingPassThroughWriter(os.Stdout) + osstderr := NewCapturingPassThroughWriter(os.Stderr) + go handleOutput(osstdout, stdout, doneStdOut) + go handleOutput(osstderr, stderr, doneStdErr) + + err = cmd.Wait() + + errStdOut := <-doneStdOut + if errStdOut != nil { + fmt.Println("error writing to standard out") } - // extract client from k8s client - ChainlinkNodes := []*client.ChainlinkClient{} - for i := range chainlinkK8Nodes { - ChainlinkNodes = append(ChainlinkNodes, chainlinkK8Nodes[i].ChainlinkClient) + errStdErr := <-doneStdErr + if errStdErr != nil { + fmt.Println("error writing to standard in") } - NKeys, _, err := client.CreateNodeKeysBundle(ChainlinkNodes, c.ChainName, c.ChainId) if err != nil { - return nil, nil, err + fmt.Printf("Command finished with error: %v\n", err) } - for _, n := range ChainlinkNodes { - _, _, err = n.CreateStarkNetChain(&client.StarkNetChainAttributes{ - Type: c.ChainName, - ChainID: c.ChainId, - Config: client.StarkNetChainConfig{}, - }) - if err != nil { - return nil, nil, err - } - _, _, err = n.CreateStarkNetNode(&client.StarkNetNodeAttributes{ - Name: c.ChainName, - ChainID: c.ChainId, - Url: env.URLs[c.ServiceKeyL2][1], + + return err +} + +func handleOutput(dst io.Writer, src io.Reader, done chan<- any) { + _, err := io.Copy(dst, src) + done <- err +} + +func (c *Common) SetLocalEnvironment(t *testing.T) { + // Run scripts to set up local test environment + log.Info().Msg("Starting starknet-devnet container...") + err := exec.Command("../../scripts/devnet.sh").Run() + require.NoError(t, err, "Could not start devnet container") + // TODO: add hardhat too + log.Info().Msg("Starting postgres container...") + err = exec.Command("../../scripts/postgres.sh").Run() + require.NoError(t, err, "Could not start postgres container") + log.Info().Msg("Starting mock adapter...") + err = exec.Command("../../scripts/mock-adapter.sh").Run() + require.NoError(t, err, "Could not start mock adapter") + log.Info().Msg("Starting core nodes...") + cmd := exec.Command("../../scripts/core.sh") + cmd.Env = append(os.Environ(), fmt.Sprintf("CL_CONFIG=%s", c.ChainlinkConfig)) + // easy debug + err = debug(cmd) + require.NoError(t, err, "Could not start core nodes") + log.Info().Msg("Set up local stack complete.") + + // Set ChainlinkNodeDetails + var nodeDetails []*environment.ChainlinkNodeDetail + var basePort = 50100 + for i := 0; i < c.NodeCount; i++ { + dbLocalIP := fmt.Sprintf("postgresql://postgres:postgres@chainlink.postgres:5432/starknet_test_%d?sslmode=disable", i+1) + nodeDetails = append(nodeDetails, &environment.ChainlinkNodeDetail{ + ChartName: "unused", + PodName: "unused", + LocalIP: "http://127.0.0.1:" + strconv.Itoa(basePort+i), + // InternalIP: "http://host.container.internal:" + strconv.Itoa(basePort+i), // TODO: chainlink.core.${i}:6688 + InternalIP: fmt.Sprintf("http://chainlink.core.%d:6688", i+1), // TODO: chainlink.core.1:6688 + DBLocalIP: dbLocalIP, }) + } + c.Env.ChainlinkNodeDetails = nodeDetails +} + +func (c *Common) TearDownLocalEnvironment(t *testing.T) { + log.Info().Msg("Tearing down core nodes...") + err := exec.Command("../../scripts/core.down.sh").Run() + require.NoError(t, err, "Could not tear down core nodes") + log.Info().Msg("Tearing down mock adapter...") + err = exec.Command("../../scripts/mock-adapter.down.sh").Run() + require.NoError(t, err, "Could not tear down mock adapter") + log.Info().Msg("Tearing down postgres container...") + err = exec.Command("../../scripts/postgres.down.sh").Run() + require.NoError(t, err, "Could not tear down postgres container") + log.Info().Msg("Tearing down devnet container...") + err = exec.Command("../../scripts/devnet.down.sh").Run() + require.NoError(t, err, "Could not tear down devnet container") + log.Info().Msg("Tear down local stack complete.") +} + +// connectChainlinkNodes creates a chainlink client for each node in the environment +// This is a non k8s version of the function in chainlink_k8s.go +// https://github.com/smartcontractkit/chainlink/blob/cosmos-test-keys/integration-tests/client/chainlink_k8s.go#L77 +func connectChainlinkNodes(e *environment.Environment) ([]*client.ChainlinkClient, error) { + var clients []*client.ChainlinkClient + for _, nodeDetails := range e.ChainlinkNodeDetails { + c, err := client.NewChainlinkClient(&client.ChainlinkConfig{ + URL: nodeDetails.LocalIP, + Email: "notreal@fakeemail.ch", + Password: "fj293fbBnlQ!f9vNs", + InternalIP: parseHostname(nodeDetails.InternalIP), + }, log.Logger) if err != nil { - return nil, nil, err + return nil, err } + log.Debug(). + Str("URL", c.Config.URL). + Str("Internal IP", c.Config.InternalIP). + Str("Chart Name", nodeDetails.ChartName). + Str("Pod Name", nodeDetails.PodName). + Msg("Connected to Chainlink node") + clients = append(clients, c) + } + return clients, nil +} + +func parseHostname(s string) string { + r := regexp.MustCompile(`://(?P.*):`) + return r.FindStringSubmatch(s)[1] +} + +// CreateKeys Creates node keys and defines chain and nodes for each node +func (c *Common) CreateKeys(env *environment.Environment) ([]client.NodeKeysBundle, []*client.ChainlinkClient, error) { + nodes, err := connectChainlinkNodes(env) + if err != nil { + return nil, nil, err + } + + NKeys, _, err := client.CreateNodeKeysBundle(nodes, c.ChainName, c.ChainId) + if err != nil { + return nil, nil, err } - return NKeys, chainlinkK8Nodes, nil + // for _, n := range nodes { + // _, _, err = n.CreateStarkNetChain(&client.StarkNetChainAttributes{ + // Type: c.ChainName, + // ChainID: c.ChainId, + // Config: client.StarkNetChainConfig{}, + // }) + // if err != nil { + // return nil, nil, err + // } + // _, _, err = n.CreateStarkNetNode(&client.StarkNetNodeAttributes{ + // Name: c.ChainName, + // ChainID: c.ChainId, + // Url: "http://", // TODO: + // }) + // if err != nil { + // return nil, nil, err + // } + // } + return NKeys, nodes, nil } // CreateJobsForContract Creates and sets up the boostrap jobs as well as OCR jobs -func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource string, juelsPerFeeCoinSource string, ocrControllerAddress string, accountAddresses []string) error { +func (c *Common) CreateJobsForContract(cc *ChainlinkClient, mockUrl string, observationSource string, juelsPerFeeCoinSource string, ocrControllerAddress string, accountAddresses []string) error { // Define node[0] as bootstrap node cc.bootstrapPeers = []client.P2PData{ { @@ -169,9 +361,9 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st // Defining relay config bootstrapRelayConfig := job.JSONConfig{ - "nodeName": fmt.Sprintf("\"starknet-OCRv2-%s-%s\"", "node", uuid.New().String()), - "accountAddress": fmt.Sprintf("\"%s\"", accountAddresses[0]), - "chainID": fmt.Sprintf("\"%s\"", c.ChainId), + "nodeName": fmt.Sprintf("starknet-OCRv2-%s-%s", "node", uuid.New().String()), + "accountAddress": fmt.Sprintf("%s", accountAddresses[0]), + "chainID": fmt.Sprintf("%s", c.ChainId), } oracleSpec := job.OCR2OracleSpec{ @@ -198,18 +390,24 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st p2pBootstrappers = append(p2pBootstrappers, cc.bootstrapPeers[i].P2PV2Bootstrapper()) } + sourceValueBridge := &client.BridgeTypeAttributes{ + Name: "mockserver-bridge", + URL: fmt.Sprintf("%s/%s", mockUrl, "five"), + RequestData: "{}", + } + // Setting up job specs for nIdx, n := range cc.ChainlinkNodes { if nIdx == 0 { continue } - _, err := n.CreateBridge(cc.bTypeAttr) + _, err := n.CreateBridge(sourceValueBridge) if err != nil { return err } relayConfig := job.JSONConfig{ "nodeName": bootstrapRelayConfig["nodeName"], - "accountAddress": fmt.Sprintf("\"%s\"", accountAddresses[nIdx]), + "accountAddress": fmt.Sprintf("%s", accountAddresses[nIdx]), "chainID": bootstrapRelayConfig["chainID"], } @@ -240,40 +438,3 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st } return nil } - -func (c *Common) Default(t *testing.T) { - c.K8Config = &environment.Config{NamespacePrefix: "chainlink-ocr-starknet", TTL: c.TTL, Test: t} - starknetUrl := fmt.Sprintf("http://%s:%d/rpc", serviceKeyL2, 5000) - if c.Testnet { - starknetUrl = c.L2RPCUrl - } - baseTOML := fmt.Sprintf(`[[Starknet]] -Enabled = true -ChainID = '%s' -[[Starknet.Nodes]] -Name = 'primary' -URL = '%s' - -[OCR2] -Enabled = true - -[P2P] -[P2P.V2] -Enabled = true -DeltaDial = '5s' -DeltaReconcile = '5s' -ListenAddresses = ['0.0.0.0:6690'] -`, c.ChainId, starknetUrl) - log.Debug().Str("toml", baseTOML).Msg("TOML") - c.ClConfig = map[string]interface{}{ - "replicas": c.NodeCount, - "toml": baseTOML, - "db": map[string]any{ - "stateful": true, - }, - } - c.Env = environment.New(c.K8Config). - AddHelm(devnet.New(nil)). - AddHelm(mock_adapter.New(nil)). - AddHelm(chainlink.New(0, c.ClConfig)) -} diff --git a/integration-tests/common/test_common.go b/integration-tests/common/test_common.go index d3ec5d8c2..81cced561 100644 --- a/integration-tests/common/test_common.go +++ b/integration-tests/common/test_common.go @@ -2,23 +2,21 @@ package common import ( "context" - "encoding/hex" "fmt" "math/big" "os" - "strings" "testing" "time" - "github.com/smartcontractkit/caigo" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetdevnet "github.com/NethermindEth/starknet.go/devnet" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/ocr2" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/starkkey" "github.com/smartcontractkit/chainlink-starknet/ops" "github.com/smartcontractkit/chainlink-starknet/ops/devnet" @@ -29,48 +27,10 @@ import ( ) var ( - // These are one of the default addresses based on the seed we pass to devnet which is 0 - defaultWalletPrivKey = ops.PrivateKeys0Seed[0] - defaultWalletAddress string // derived in init() - rpcRequestTimeout = time.Second * 300 - dumpPath = "/dumps/dump.pkl" + rpcRequestTimeout = time.Second * 300 + dumpPath = "/dumps/dump.pkl" ) -func init() { - // wallet contract derivation - var keyBytes []byte - keyBytes, err := hex.DecodeString(strings.TrimPrefix(defaultWalletPrivKey, "0x")) - if err != nil { - panic(err) - } - accountBytes, err := pubKeyToDevnetAccount(starkkey.Raw(keyBytes).Key().PublicKey()) - if err != nil { - panic(err) - } - defaultWalletAddress = "0x" + hex.EncodeToString(accountBytes) -} - -func pubKeyToDevnetAccount(pubkey starkkey.PublicKey) ([]byte, error) { - xHash, err := caigo.Curve.ComputeHashOnElements([]*big.Int{pubkey.X}) - if err != nil { - return nil, err - } - elements := []*big.Int{ - new(big.Int).SetBytes([]byte("STARKNET_CONTRACT_ADDRESS")), - big.NewInt(0), - ops.DevnetSalt, - ops.DevnetClassHash, - xHash, - } - hash, err := caigo.Curve.ComputeHashOnElements(elements) - if err != nil { - return nil, err - } - - // pad big.Int to 32 bytes if needed - return starknet.PadBytes(hash.Bytes(), 32), nil -} - type Test struct { Devnet *devnet.StarknetDevnetClient Cc *ChainlinkClient @@ -91,7 +51,7 @@ type Test struct { type ChainlinkClient struct { NKeys []client.NodeKeysBundle - ChainlinkNodes []*client.ChainlinkK8sClient + ChainlinkNodes []*client.ChainlinkClient bTypeAttr *client.BridgeTypeAttributes bootstrapPeers []client.P2PData } @@ -112,7 +72,7 @@ func (testState *Test) DeployCluster() { } var err error testState.Cc.NKeys, testState.Cc.ChainlinkNodes, err = testState.Common.CreateKeys(testState.Common.Env) - require.NoError(testState.T, err, "Creating chains and keys should not fail") + require.NoError(testState.T, err, "Creating chains and keys should not fail") // TODO; fails here baseURL := testState.Common.L2RPCUrl if !testState.Common.Testnet { // devnet! // chainlink starknet client needs the RPC API url which is at /rpc on devnet @@ -123,9 +83,15 @@ func (testState *Test) DeployCluster() { testState.OCR2Client, err = ocr2.NewClient(testState.Starknet, lggr) require.NoError(testState.T, err, "Creating ocr2 client should not fail") if !testState.Common.Testnet { - err = os.Setenv("PRIVATE_KEY", testState.GetDefaultPrivateKey()) + // fetch predeployed account 0 to use as funder + devnet := starknetdevnet.NewDevNet(testState.Common.L2RPCUrl) + accounts, err := devnet.Accounts() + require.NoError(testState.T, err) + account := accounts[0] + + err = os.Setenv("PRIVATE_KEY", account.PrivateKey) require.NoError(testState.T, err, "Setting private key should not fail") - err = os.Setenv("ACCOUNT", testState.GetDefaultWalletAddress()) + err = os.Setenv("ACCOUNT", account.Address) require.NoError(testState.T, err, "Setting account address should not fail") testState.Devnet.AutoDumpState() // Auto dumping devnet state to avoid losing contracts on crash } @@ -133,11 +99,10 @@ func (testState *Test) DeployCluster() { // DeployEnv Deploys the environment func (testState *Test) DeployEnv() { - err := testState.Common.Env.Run() - require.NoError(testState.T, err) - if testState.Common.Env.WillUseRemoteRunner() { - return // short circuit here if using a remote runner - } + testState.Common.SetLocalEnvironment(testState.T) + // if testState.Common.Env.WillUseRemoteRunner() { + // return // short circuit here if using a remote runner + // } } // SetupClients Sets up the starknet client @@ -146,10 +111,11 @@ func (testState *Test) SetupClients() { if testState.Common.Testnet { l.Debug().Msg(fmt.Sprintf("Overriding L2 RPC: %s", testState.Common.L2RPCUrl)) } else { - testState.Common.L2RPCUrl = testState.Common.Env.URLs[testState.Common.ServiceKeyL2][0] // For local runs setting local ip - if testState.Common.Env.Cfg.InsideK8s { - testState.Common.L2RPCUrl = testState.Common.Env.URLs[testState.Common.ServiceKeyL2][1] // For remote runner setting remote IP - } + // TODO: HAXX: + // testState.Common.L2RPCUrl = testState.Common.Env.URLs[testState.Common.ServiceKeyL2][0] // For local runs setting local ip + // if testState.Common.Env.Cfg.InsideK8s { + // testState.Common.L2RPCUrl = testState.Common.Env.URLs[testState.Common.ServiceKeyL2][1] // For remote runner setting remote IP + // } l.Debug().Msg(fmt.Sprintf("L2 RPC: %s", testState.Common.L2RPCUrl)) testState.Devnet = testState.Devnet.NewStarknetDevnetClient(testState.Common.L2RPCUrl, dumpPath) } @@ -181,44 +147,17 @@ func (testState *Test) LoadOCR2Config() (*ops.OCR2Config, error) { } func (testState *Test) SetUpNodes() { - testState.SetBridgeTypeAttrs(&client.BridgeTypeAttributes{ - Name: "bridge-mockserver", - URL: fmt.Sprintf("%s/%s", testState.Common.Env.URLs["qa_mock_adapter_internal"][0], "five"), - }) - err := testState.Common.CreateJobsForContract(testState.GetChainlinkClient(), testState.ObservationSource, testState.JuelsPerFeeCoinSource, testState.OCRAddr, testState.AccountAddresses) + err := testState.Common.CreateJobsForContract(testState.GetChainlinkClient(), testState.Common.MockUrl, testState.ObservationSource, testState.JuelsPerFeeCoinSource, testState.OCRAddr, testState.AccountAddresses) require.NoError(testState.T, err, "Creating jobs should not fail") } -// GetStarknetAddress Returns the local StarkNET address -func (testState *Test) GetStarknetAddress() string { - return testState.Common.Env.URLs[testState.Common.ServiceKeyL2][0] -} - -// GetStarknetAddressRemote Returns the remote StarkNET address -func (testState *Test) GetStarknetAddressRemote() string { - return testState.Common.Env.URLs[testState.Common.ServiceKeyL2][1] -} - // GetNodeKeys Returns the node key bundles func (testState *Test) GetNodeKeys() []client.NodeKeysBundle { return testState.Cc.NKeys } func (testState *Test) GetChainlinkNodes() []*client.ChainlinkClient { - // retrieve client from K8s client - chainlinkNodes := []*client.ChainlinkClient{} - for i := range testState.Cc.ChainlinkNodes { - chainlinkNodes = append(chainlinkNodes, testState.Cc.ChainlinkNodes[i].ChainlinkClient) - } - return chainlinkNodes -} - -func (testState *Test) GetDefaultPrivateKey() string { - return defaultWalletPrivKey -} - -func (testState *Test) GetDefaultWalletAddress() string { - return defaultWalletAddress + return testState.Cc.ChainlinkNodes } func (testState *Test) GetChainlinkClient() *ChainlinkClient { @@ -241,7 +180,7 @@ func (testState *Test) ConfigureL1Messaging() { func (testState *Test) GetDefaultObservationSource() string { return ` - val [type = "bridge" name="bridge-mockserver"] + val [type = "bridge" name="mockserver-bridge"] parse [type="jsonparse" path="data,result"] val -> parse ` @@ -266,20 +205,28 @@ func (testState *Test) ValidateRounds(rounds int, isSoak bool) error { var positive bool // validate balance in aggregator + linkContractAddress, err := starknetutils.HexToFelt(testState.LinkTokenAddr) + if err != nil { + return err + } + contractAddress, err := starknetutils.HexToFelt(testState.OCRAddr) + if err != nil { + return err + } resLINK, errLINK := testState.Starknet.CallContract(ctx, starknet.CallOps{ - ContractAddress: caigotypes.StrToFelt(testState.LinkTokenAddr), - Selector: "balance_of", - Calldata: []string{testState.OCRAddr}, + ContractAddress: linkContractAddress, + Selector: starknetutils.GetSelectorFromNameFelt("balance_of"), + Calldata: []*felt.Felt{contractAddress}, }) - require.NoError(testState.T, errLINK, "Reader balance from LINK contract should not fail") + require.NoError(testState.T, errLINK, "Reader balance from LINK contract should not fail", "err", errLINK) resAgg, errAgg := testState.Starknet.CallContract(ctx, starknet.CallOps{ - ContractAddress: caigotypes.StrToFelt(testState.OCRAddr), - Selector: "link_available_for_payment", + ContractAddress: contractAddress, + Selector: starknetutils.GetSelectorFromNameFelt("link_available_for_payment"), }) - require.NoError(testState.T, errAgg, "Reader balance from LINK contract should not fail") - balLINK, _ := new(big.Int).SetString(resLINK[0], 0) - balAgg, _ := new(big.Int).SetString(resAgg[1], 0) - isNegative, _ := new(big.Int).SetString(resAgg[0], 0) + require.NoError(testState.T, errAgg, "link_available_for_payment should not fail", "err", errAgg) + balLINK := resLINK[0].BigInt(big.NewInt(0)) + balAgg := resAgg[1].BigInt(big.NewInt(0)) + isNegative := resAgg[0].BigInt(big.NewInt(0)) if isNegative.Sign() > 0 { balAgg = new(big.Int).Neg(balAgg) } @@ -289,8 +236,8 @@ func (testState *Test) ValidateRounds(rounds int, isSoak bool) error { for start := time.Now(); time.Since(start) < testState.Common.TestDuration; { l.Info().Msg(fmt.Sprintf("Elapsed time: %s, Round wait: %s ", time.Since(start), testState.Common.TestDuration)) - res, err := testState.OCR2Client.LatestTransmissionDetails(ctx, caigotypes.StrToFelt(testState.OCRAddr)) - require.NoError(testState.T, err, "Failed to get latest transmission details") + res, err2 := testState.OCR2Client.LatestTransmissionDetails(ctx, contractAddress) + require.NoError(testState.T, err2, "Failed to get latest transmission details") // end condition: enough rounds have occurred if !isSoak && increasing >= rounds && positive { break @@ -361,15 +308,20 @@ func (testState *Test) ValidateRounds(rounds int, isSoak bool) error { // Test proxy reading // TODO: would be good to test proxy switching underlying feeds + + proxyAddress, err := starknetutils.HexToFelt(testState.ProxyAddr) + if err != nil { + return err + } roundDataRaw, err := testState.Starknet.CallContract(ctx, starknet.CallOps{ - ContractAddress: caigotypes.StrToFelt(testState.ProxyAddr), - Selector: "latest_round_data", + ContractAddress: proxyAddress, + Selector: starknetutils.GetSelectorFromNameFelt("latest_round_data"), }) if !isSoak { require.NoError(testState.T, err, "Reading round data from proxy should not fail") assert.Equal(testState.T, len(roundDataRaw), 5, "Round data from proxy should match expected size") } - valueBig, err := starknet.HexToUnsignedBig(roundDataRaw[1]) + valueBig := roundDataRaw[1].BigInt(big.NewInt(0)) require.NoError(testState.T, err) value := valueBig.Int64() if value < 0 { diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 5624fa82c..89ec2a6b5 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -3,21 +3,28 @@ module github.com/smartcontractkit/chainlink-starknet/integration-tests go 1.21.4 require ( + github.com/NethermindEth/juno v0.3.1 + github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 github.com/google/uuid v1.4.0 github.com/lib/pq v1.10.9 github.com/rs/zerolog v1.30.0 - github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 github.com/smartcontractkit/chainlink-starknet/ops v0.0.0-20231205180940-ea2e3e916725 - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231221191127-1f32389044ea - github.com/smartcontractkit/chainlink-testing-framework v1.22.4 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119021513-7acd8a5ce4cb - github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119021513-7acd8a5ce4cb + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 + github.com/smartcontractkit/chainlink-testing-framework v1.23.2 + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240215151806-009c99876c4c + github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240215151806-009c99876c4c github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.26.0 gopkg.in/guregu/null.v4 v4.0.0 ) +require ( + github.com/bits-and-blooms/bitset v1.10.0 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/test-go/testify v1.1.4 // indirect +) + require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect @@ -39,8 +46,8 @@ require ( github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect - github.com/K-Phoen/grabana v0.21.17 // indirect - github.com/K-Phoen/sdk v0.12.2 // indirect + github.com/K-Phoen/grabana v0.22.1 // indirect + github.com/K-Phoen/sdk v0.12.4 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect @@ -58,9 +65,9 @@ require ( github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect github.com/aws/jsii-runtime-go v1.75.0 // indirect github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect + github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/buger/jsonparser v1.1.1 // indirect @@ -85,7 +92,6 @@ require ( github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/containerd v1.7.7 // indirect github.com/containerd/continuity v0.4.3 // indirect github.com/containerd/log v0.1.0 // indirect @@ -215,20 +221,22 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/consul/api v1.25.1 // indirect + github.com/hashicorp/consul/sdk v0.14.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-envparse v0.1.0 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/memberlist v0.5.0 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect @@ -249,6 +257,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -339,22 +348,23 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/slack-go/slack v0.12.2 // indirect + github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240214203158-47dae5de1336 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231222220348-c7d81beaf8fd // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240213161921-c4d342b761b0 // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect - github.com/smartcontractkit/wasp v0.4.0 // indirect + github.com/smartcontractkit/wasp v0.4.2 // indirect github.com/smartcontractkit/wsrpc v0.7.2 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect @@ -411,18 +421,18 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect - golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/arch v0.7.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.18.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -430,7 +440,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/guregu/null.v2 v2.1.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 7ec9b5876..f417cf27b 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -114,10 +114,10 @@ github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/K-Phoen/grabana v0.21.17 h1:mO/9DvJWC/qpTF/X5jQDm5eKgCBaCGypP/tEfXAvKfg= -github.com/K-Phoen/grabana v0.21.17/go.mod h1:vbASQt9UiQhX4lC3/opLpJMJ8m+hsTUU2FwkQMytHK4= -github.com/K-Phoen/sdk v0.12.2 h1:0QofDlKE+lloyBOzhjEEMW21061zts/WIpfpQ5NLLAs= -github.com/K-Phoen/sdk v0.12.2/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= +github.com/K-Phoen/grabana v0.22.1 h1:b/O+C3H2H6VNYSeMCYUO4X4wYuwFXgBcRkvYa+fjpQA= +github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3iX00R5bU= +github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= +github.com/K-Phoen/sdk v0.12.4/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -132,6 +132,10 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -195,6 +199,8 @@ github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9 github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= +github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= +github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -343,8 +349,8 @@ github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHf github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= @@ -843,6 +849,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdmPSDFPY= +github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= @@ -894,8 +902,8 @@ github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23q github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce h1:7UnVY3T/ZnHUrfviiAgIUjg2PXxsQfs5bphsG8F7Keo= -github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= @@ -995,6 +1003,8 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -1391,24 +1401,24 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww= github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce h1:+6MzHiHMPBddiR9tnkXA7pjgd2mNaboPck8cNsSfYrs= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce/go.mod h1:05rRF84QKlIOF5LfTBPkHdw4UpBI2G3zxRcuZ65bPjk= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 h1:Ju0cxdrzGFwHGDPp16IzkOyX87LZ/kKDFG1A+VSEJHY= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71/go.mod h1:Ppv5X8MTUkkpKdb270dLefjio724vMkCWmSSaWo7CzI= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1/go.mod h1:GuPvyXryvbiUZIHmPeLBz4L+yJKeyGUjrDfd1KNne+o= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 h1:Yk0RK9WV59ISOZZMsdtxZBAKaBfdgb05oXyca/qSqcw= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4/go.mod h1:pRlQrvcizMmuHAUV4N96oO2e3XbA99JCQELLc6ES160= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240214203158-47dae5de1336 h1:j00D0/EqE9HRu+63v7KwUOe4ZxLc4AN5SOJFiinkkH0= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240214203158-47dae5de1336/go.mod h1:umLyYLRGqyIuFfGpEREZP3So6+O8iL35cCCqW+OxX5w= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231222220348-c7d81beaf8fd h1:9xSwDgRJDIfDw6171PQEyn5IQ1JKpaJnG5NX6KfCaHQ= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231222220348-c7d81beaf8fd/go.mod h1:kY435jBtHbyzhe+ImAxZ6G229uHbB0ablA+A0tJkDn8= -github.com/smartcontractkit/chainlink-testing-framework v1.22.4 h1:617FyrN/wQNFLsGDofqKAQ5/P+swmIPo8sIJZqBPvsQ= -github.com/smartcontractkit/chainlink-testing-framework v1.22.4/go.mod h1:FBRC6elqaqO8jiMZMfa3UKrvwzZhMGUtYqVTGYmfFrA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240213161921-c4d342b761b0 h1:9IxmR+1NH1WxaX44+t553fOrrZRfxwMVvnDuBIy0tgs= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240213161921-c4d342b761b0/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= +github.com/smartcontractkit/chainlink-testing-framework v1.23.2 h1:haXPd9Pg++Zs5/QIZnhFd9RElmz/d0+4nNeletUg9ZM= +github.com/smartcontractkit/chainlink-testing-framework v1.23.2/go.mod h1:StIOdxvwd8AMO6xuBtmD6FQfJXktEn/mJJEr7728BTc= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119021513-7acd8a5ce4cb h1:Y/tBuPVFQtOc3JbHmxsG0McGmbb1JVzdcfwP6WPxtxo= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119021513-7acd8a5ce4cb/go.mod h1:imtCUoCwM4wvcFtm/sScfqL4TrOSFtmL2h6ri4MtM5k= -github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119021513-7acd8a5ce4cb h1:6sV6/nt9XQrcW5lnnu08gaJkftakf1C80bKBrnrZM34= -github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119021513-7acd8a5ce4cb/go.mod h1:rOElv51j/0ZcDXirOb7hWe+fotGmr2hW01kPbqU3Xlk= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240215151806-009c99876c4c h1:070mhqNwH8If8ATp63bdDz3HMDd55gTuw+ErCQmKvAI= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240215151806-009c99876c4c/go.mod h1:ZJBD7Bdej6Fxd+mMU0Ladko7JV7W5xh5W8Ta353J8Nc= +github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240215151806-009c99876c4c h1:AFVbokAZMozAZqEKrnjF5aNd7c8nm6rEyM/sPCY6By0= +github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240215151806-009c99876c4c/go.mod h1:sqR4SHIgd6ZnWaglMTG4qwQWOM6z58bu1lmq/KgwmSg= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= @@ -1419,8 +1429,8 @@ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= -github.com/smartcontractkit/wasp v0.4.0 h1:N8yPxlBvoJiyE6HaDkTkwRbuOHkGgQFGEHbw36oh4jA= -github.com/smartcontractkit/wasp v0.4.0/go.mod h1:3qiofyI3pkbrc48a3CVshbMfgl74SiuPL/tm30d9Wb4= +github.com/smartcontractkit/wasp v0.4.2 h1:MPErzwcOW84MKnA6/BjMnlsspQ0681XfoanGsJHOI7c= +github.com/smartcontractkit/wasp v0.4.2/go.mod h1:eVhBVLbVv0qORUlN7aR5C4aTN/lTYO3KnN1erO4ROOI= github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ= github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1443,8 +1453,8 @@ github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cA github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1668,8 +1678,8 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f/go.mod h1:tgPU4N2u9RByaTN3NC2p9xOzyFpte4jYwsIIRF7XlSc= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= -golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= +golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1699,8 +1709,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1711,8 +1721,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1739,8 +1749,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1803,8 +1813,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1816,8 +1826,8 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1832,8 +1842,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1930,8 +1940,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1941,8 +1952,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2032,8 +2043,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2067,8 +2078,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= -google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= +google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= +google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2170,8 +2181,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/integration-tests/infra_deployments/deployer_test.go b/integration-tests/infra_deployments/deployer_test.go index 90fc93e25..e356c6e9a 100644 --- a/integration-tests/infra_deployments/deployer_test.go +++ b/integration-tests/infra_deployments/deployer_test.go @@ -15,7 +15,7 @@ import ( const ( L2RpcUrl = "https://alpha4-2.starknet.io" - P2pPort = "5001" + P2pPort = "6691" ) var ( @@ -61,8 +61,7 @@ func createKeys(testState *testing.T) ([]*client.ChainlinkK8sClient, error) { func TestOCRBasic(testState *testing.T) { var err error t := &common.Test{} - t.Common = common.New() - t.Common.Default(testState) + t.Common = common.New(testState) t.Cc = &common.ChainlinkClient{} t.Common.P2PPort = P2pPort t.Cc.ChainlinkNodes, err = createKeys(testState) diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index b0b04060b..9a25fbc5f 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -5,15 +5,11 @@ import ( "fmt" "testing" - "go.uber.org/zap/zapcore" - "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-starknet/integration-tests/common" "github.com/smartcontractkit/chainlink-starknet/ops/gauntlet" "github.com/smartcontractkit/chainlink-starknet/ops/utils" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" ) var ( @@ -34,17 +30,16 @@ func TestOCRBasic(t *testing.T) { testState = &common.Test{ T: t, } - testState.Common = common.New() - testState.Common.Default(t) + testState.Common = common.New(t) // Setting this to the root of the repo for cmd exec func for Gauntlet testState.Sg, err = gauntlet.NewStarknetGauntlet(fmt.Sprintf("%s/", utils.ProjectRoot)) require.NoError(t, err, "Could not get a new gauntlet struct") testState.DeployCluster() require.NoError(t, err, "Deploying cluster should not fail") - if testState.Common.Env.WillUseRemoteRunner() { - return // short circuit here if using a remote runner - } + // if testState.Common.Env.WillUseRemoteRunner() { + // return // short circuit here if using a remote runner + // } err = testState.Sg.SetupNetwork(testState.Common.L2RPCUrl) require.NoError(t, err, "Setting up gauntlet network should not fail") err = testState.DeployGauntlet(0, 100000000000, decimals, "auto", 1, 1) @@ -58,7 +53,9 @@ func TestOCRBasic(t *testing.T) { require.NoError(t, err, "Validating round should not fail") t.Cleanup(func() { - err = actions.TeardownSuite(t, testState.Common.Env, testState.Cc.ChainlinkNodes, nil, zapcore.ErrorLevel) - require.NoError(t, err, "Error tearing down environment") + testState.Common.TearDownLocalEnvironment(t) + // TODO: + // err = actions.TeardownSuite(t, testState.Common.Env, testState.Cc.ChainlinkNodes, nil, zapcore.ErrorLevel, nil, nil) + // require.NoError(t, err, "Error tearing down environment") }) } diff --git a/integration-tests/soak/ocr2_test.go b/integration-tests/soak/ocr2_test.go index 605faddef..56758cfea 100644 --- a/integration-tests/soak/ocr2_test.go +++ b/integration-tests/soak/ocr2_test.go @@ -29,8 +29,7 @@ func TestOCRSoak(t *testing.T) { testState = &common.Test{ T: t, } - testState.Common = common.New() - testState.Common.Default(t) + testState.Common = common.New(t) // Setting this to the root of the repo for cmd exec func for Gauntlet testState.Sg, err = gauntlet.NewStarknetGauntlet(fmt.Sprintf("%s/", utils.ProjectRoot)) require.NoError(t, err, "Could not get a new gauntlet struct") @@ -49,7 +48,7 @@ func TestOCRSoak(t *testing.T) { err = testState.ValidateRounds(99999999, true) require.NoError(t, err, "Validating round should not fail") t.Cleanup(func() { - err = actions.TeardownSuite(t, testState.Common.Env, testState.Cc.ChainlinkNodes, nil, zapcore.ErrorLevel) + err = actions.TeardownSuite(t, testState.Common.Env, testState.Cc.ChainlinkNodes, nil, zapcore.ErrorLevel, nil, nil) require.NoError(t, err, "Error tearing down environment") }) } diff --git a/monitoring/go.mod b/monitoring/go.mod index ed2a395aa..ddefc692d 100644 --- a/monitoring/go.mod +++ b/monitoring/go.mod @@ -5,9 +5,10 @@ go 1.21.3 toolchain go1.21.5 require ( + github.com/NethermindEth/juno v0.3.1 + github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 github.com/prometheus/client_golang v1.17.0 - github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230508053614-9f2fd5fd4ff1 github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 github.com/stretchr/testify v1.8.4 @@ -41,7 +42,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.4.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect @@ -70,8 +70,10 @@ require ( github.com/riferrei/srclient v0.5.4 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/supranational/blst v0.3.11 // indirect + github.com/test-go/testify v1.1.4 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -85,12 +87,12 @@ require ( go.opentelemetry.io/otel/trace v1.21.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect diff --git a/monitoring/go.sum b/monitoring/go.sum index f9f723ec8..a340c6dab 100644 --- a/monitoring/go.sum +++ b/monitoring/go.sum @@ -46,6 +46,10 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -169,6 +173,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -199,12 +205,9 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -345,18 +348,20 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 h1:WCcC4vZDS1tYNxjWlwRJZQy28r8CM github.com/santhosh-tekuri/jsonschema/v5 v5.2.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce h1:+6MzHiHMPBddiR9tnkXA7pjgd2mNaboPck8cNsSfYrs= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce/go.mod h1:05rRF84QKlIOF5LfTBPkHdw4UpBI2G3zxRcuZ65bPjk= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 h1:Yk0RK9WV59ISOZZMsdtxZBAKaBfdgb05oXyca/qSqcw= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4/go.mod h1:pRlQrvcizMmuHAUV4N96oO2e3XbA99JCQELLc6ES160= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 h1:3y9WsXkZ5lxFrmfH7DQHs/q308lylKId5l/3VC0QAdM= github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -377,6 +382,8 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= +github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/testcontainers/testcontainers-go v0.14.0 h1:h0D5GaYG9mhOWr2qHdEKDXpkce/VlvaYOCzTRi6UBi8= github.com/testcontainers/testcontainers-go v0.14.0/go.mod h1:hSRGJ1G8Q5Bw2gXgPulJOLlEBaYJHeBSOkQM5JLG+JQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -427,8 +434,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -494,8 +501,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -514,8 +521,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -559,8 +566,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/monitoring/pkg/monitoring/source_envelope.go b/monitoring/pkg/monitoring/source_envelope.go index 85c7322d3..323bdf788 100644 --- a/monitoring/pkg/monitoring/source_envelope.go +++ b/monitoring/pkg/monitoring/source_envelope.go @@ -6,7 +6,8 @@ import ( "math/big" "sync" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/libocr/offchainreporting2/types" "go.uber.org/multierr" @@ -37,9 +38,17 @@ func (s *envelopeSourceFactory) NewSource( if !ok { return nil, fmt.Errorf("expected feedConfig to be of type StarknetFeedConfig not %T", feedConfig) } + contractAddress, err := starknetutils.HexToFelt(feedConfig.GetContractAddress()) + if err != nil { + return nil, err + } + linkTokenAddress, err := starknetutils.HexToFelt(starknetChainConfig.GetLinkTokenAddress()) + if err != nil { + return nil, err + } return &envelopeSource{ - caigotypes.StrToFelt(feedConfig.GetContractAddress()), - caigotypes.StrToFelt(starknetChainConfig.GetLinkTokenAddress()), + contractAddress, + linkTokenAddress, s.ocr2Reader, }, nil } @@ -49,8 +58,8 @@ func (s *envelopeSourceFactory) GetType() string { } type envelopeSource struct { - contractAddress caigotypes.Felt - linkTokenAddress caigotypes.Felt + contractAddress *felt.Felt + linkTokenAddress *felt.Felt ocr2Reader ocr2.OCR2Reader } @@ -116,7 +125,7 @@ func (s *envelopeSource) Fetch(ctx context.Context) (interface{}, error) { return envelope, envelopeErr } -func (s *envelopeSource) fetchLatestNewTransmissionEvent(ctx context.Context, contractAddress caigotypes.Felt) ( +func (s *envelopeSource) fetchLatestNewTransmissionEvent(ctx context.Context, contractAddress *felt.Felt) ( latestRound ocr2.RoundData, transmission ocr2.NewTransmissionEvent, err error, @@ -142,7 +151,7 @@ func (s *envelopeSource) fetchLatestNewTransmissionEvent(ctx context.Context, co return latestRound, transmission, fmt.Errorf("no new_trasmission event found to correspond with the round id %d in block %d", latestRound.RoundID, latestRound.BlockNumber) } -func (s *envelopeSource) fetchContractConfig(ctx context.Context, contractAddress caigotypes.Felt) (config ocr2.ContractConfig, err error) { +func (s *envelopeSource) fetchContractConfig(ctx context.Context, contractAddress *felt.Felt) (config ocr2.ContractConfig, err error) { configDetails, err := s.ocr2Reader.LatestConfigDetails(ctx, contractAddress) if err != nil { return config, fmt.Errorf("couldn't fetch latest config details for contract '%s': %w", contractAddress, err) @@ -156,11 +165,11 @@ func (s *envelopeSource) fetchContractConfig(ctx context.Context, contractAddres var zeroBigInt = big.NewInt(0) -func (s *envelopeSource) fetchLinkBalance(ctx context.Context, linkTokenAddress, contractAddress caigotypes.Felt) (*big.Int, error) { +func (s *envelopeSource) fetchLinkBalance(ctx context.Context, linkTokenAddress, contractAddress *felt.Felt) (*big.Int, error) { results, err := s.ocr2Reader.BaseReader().CallContract(ctx, starknet.CallOps{ ContractAddress: linkTokenAddress, - Selector: "balanceOf", - Calldata: []string{contractAddress.String()}, + Selector: starknetutils.GetSelectorFromNameFelt("balanceOf"), + Calldata: []*felt.Felt{contractAddress}, }) if err != nil { return nil, fmt.Errorf("failed call to ECR20 contract, balanceOf method: %w", err) @@ -168,7 +177,7 @@ func (s *envelopeSource) fetchLinkBalance(ctx context.Context, linkTokenAddress, if len(results) < 1 { return nil, fmt.Errorf("insufficient data from balanceOf '%v': %w", results, err) } - linkBalance := caigotypes.HexToBN(results[0]) + linkBalance := results[0].BigInt(big.NewInt(0)) if linkBalance.Cmp(zeroBigInt) == 0 { return nil, fmt.Errorf("contract's LINK balance should not be zero") } diff --git a/monitoring/pkg/monitoring/source_envelope_test.go b/monitoring/pkg/monitoring/source_envelope_test.go index 6d60c5437..0833f37c5 100644 --- a/monitoring/pkg/monitoring/source_envelope_test.go +++ b/monitoring/pkg/monitoring/source_envelope_test.go @@ -6,8 +6,7 @@ import ( "testing" "time" - "github.com/smartcontractkit/caigo" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -66,7 +65,7 @@ func TestEnvelopeSource(t *testing.T) { ContractAddress: chainConfig.GetLinkTokenAddress(), Selector: "balanceOf", Calldata: []string{ - caigo.HexToBN(feedConfig.ContractAddress).String(), + starknetutils.HexToBN(feedConfig.ContractAddress).String(), }, }, ).Return(starknetReaderCallContractBalanceOfResponse, nil) @@ -94,7 +93,7 @@ var ( { RoundId: 0xf5b, LatestAnswer: bigIntFromString("-900000000"), - Transmitter: caigotypes.StrToFelt("634447934223750826572902672583054702307815157196919304685470566142330202833"), + Transmitter: starknetutils.StrToFelt("634447934223750826572902672583054702307815157196919304685470566142330202833"), LatestTimestamp: time.Date(2022, time.September, 27, 18, 51, 0, 0, time.Local), Observers: []uint8{0x1, 0x2, 0x3, 0x4}, ObservationsLen: 0x4, diff --git a/monitoring/pkg/monitoring/source_proxy.go b/monitoring/pkg/monitoring/source_proxy.go index 15d0bce6e..9b3d15657 100644 --- a/monitoring/pkg/monitoring/source_proxy.go +++ b/monitoring/pkg/monitoring/source_proxy.go @@ -5,7 +5,8 @@ import ( "fmt" "math/big" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetutils "github.com/NethermindEth/starknet.go/utils" relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" @@ -32,8 +33,12 @@ func (s *proxySourceFactory) NewSource( _ relayMonitoring.ChainConfig, feedConfig relayMonitoring.FeedConfig, ) (relayMonitoring.Source, error) { + contractAddress, err := starknetutils.HexToFelt(feedConfig.GetContractAddress()) + if err != nil { + return nil, err + } return &proxySource{ - caigotypes.HexToHash(feedConfig.GetContractAddress()), + contractAddress, s.ocr2Reader, }, nil } @@ -43,7 +48,7 @@ func (s *proxySourceFactory) GetType() string { } type proxySource struct { - contractAddress caigotypes.Hash + contractAddress *felt.Felt ocr2Reader ocr2.OCR2Reader } diff --git a/monitoring/pkg/monitoring/source_txresults.go b/monitoring/pkg/monitoring/source_txresults.go index 352c30b60..19ca6a885 100644 --- a/monitoring/pkg/monitoring/source_txresults.go +++ b/monitoring/pkg/monitoring/source_txresults.go @@ -5,7 +5,8 @@ import ( "fmt" "sync" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetutils "github.com/NethermindEth/starknet.go/utils" relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" @@ -28,8 +29,12 @@ func (s *txResultsSourceFactory) NewSource( _ relayMonitoring.ChainConfig, feedConfig relayMonitoring.FeedConfig, ) (relayMonitoring.Source, error) { + contractAddress, err := starknetutils.HexToFelt(feedConfig.GetContractAddress()) + if err != nil { + return nil, err + } return &txResultsSource{ - caigotypes.HexToHash(feedConfig.GetContractAddress()), + contractAddress, s.ocr2Reader, 0, sync.Mutex{}, @@ -41,7 +46,7 @@ func (s *txResultsSourceFactory) GetType() string { } type txResultsSource struct { - contractAddress caigotypes.Hash + contractAddress *felt.Felt ocr2Reader ocr2.OCR2Reader prevRoundID uint32 diff --git a/ops/charts/devnet/templates/deployment.yaml b/ops/charts/devnet/templates/deployment.yaml index 3e920911d..802df4466 100644 --- a/ops/charts/devnet/templates/deployment.yaml +++ b/ops/charts/devnet/templates/deployment.yaml @@ -21,22 +21,6 @@ spec: - name: vol hostPath: path: /dumps - - name: cairo-build - emptyDir: {} - initContainers: - - name: cairo-download - image: appropriate/curl - command: ["/bin/sh"] - args: - - "-c" - - | - mkdir -p cairo-build - curl -L --output release.tgz https://github.com/starkware-libs/cairo/releases/download/v2.0.2/release-x86_64-unknown-linux-musl.tar.gz - tar xzf release.tgz - mv cairo/* cairo-build/ - volumeMounts: - - name: cairo-build - mountPath: /cairo-build containers: - name: {{ .Chart.Name }} volumeMounts: @@ -45,10 +29,8 @@ spec: {{- if eq .Values.real_node true }} image: "{{ .Values.repository | default "eqlabs/pathfinder"}}:{{ .Values.tag | default "v0.1.8-alpha"}}" {{- else }} - - name: cairo-build - mountPath: /cairo-build - image: "{{ .Values.repository | default "shardlabs/starknet-devnet"}}:{{ .Values.tag | default "0.6.0"}}" - args: ["--sierra-compiler-path", "/cairo-build/bin/starknet-sierra-compile", "--lite-mode", "--port", {{ .Values.service.internalPort | quote}}, "--seed", {{ .Values.seed | quote}}] + image: "{{ .Values.repository | default "shardlabs/starknet-devnet-rs"}}:{{ .Values.tag | default "d7c168ac53da3e9d717ed3ff8dad665ccade43e0"}}" + args: ["--port", {{ .Values.service.internalPort | quote}}, "--seed", {{ .Values.seed | quote}}, "--account-class", "cairo1", "--gas-price", "1"] {{- end }} imagePullPolicy: IfNotPresent {{- if eq .Values.real_node true }} diff --git a/ops/devnet/devnet.go b/ops/devnet/devnet.go index 8b886b54f..fca7437e0 100644 --- a/ops/devnet/devnet.go +++ b/ops/devnet/devnet.go @@ -6,7 +6,7 @@ import ( "strings" "time" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/ocr2" "github.com/go-resty/resty/v2" @@ -74,6 +74,7 @@ func (devnet *StarknetDevnetClient) AutoDumpState() { // AutoLoadState auto loads last saved devnet state on contract not found func (devnet *StarknetDevnetClient) AutoLoadState(client *ocr2.Client, ocrAddress string) { + addr, _ := starknetutils.HexToFelt(ocrAddress) t := time.NewTicker(15 * time.Second) go func() { for { @@ -83,7 +84,8 @@ func (devnet *StarknetDevnetClient) AutoLoadState(client *ocr2.Client, ocrAddres return case <-t.C: log.Debug().Msg("Checking for devnet OCR contract errors") - _, err := client.LatestTransmissionDetails(devnet.ctx, caigotypes.StrToFelt(ocrAddress)) + + _, err := client.LatestTransmissionDetails(devnet.ctx, addr) if err != nil && strings.Contains(err.Error(), "is not deployed") { _, err = devnet.client.R().SetBody(map[string]any{ "path": devnet.dumpPath, @@ -103,7 +105,7 @@ func (devnet *StarknetDevnetClient) FundAccounts(l2AccList []string) error { for _, key := range l2AccList { res, err := devnet.client.R().SetBody(map[string]any{ "address": key, - "amount": 1e21, + "amount": 900000000000000000, }).Post("/mint") if err != nil { return err diff --git a/ops/devnet/environment.go b/ops/devnet/environment.go index 082754a49..c1ef5aa6c 100644 --- a/ops/devnet/environment.go +++ b/ops/devnet/environment.go @@ -72,8 +72,8 @@ func defaultProps() map[string]any { "replicas": "1", "starknet-dev": map[string]any{ "image": map[string]any{ - "image": "shardlabs/starknet-devnet", - "version": "v0.6.0", + "image": "shardlabs/starknet-devnet-rs", + "version": "latest", }, "resources": map[string]any{ "requests": map[string]any{ diff --git a/ops/go.mod b/ops/go.mod index 5266c779f..916e9a4fb 100644 --- a/ops/go.mod +++ b/ops/go.mod @@ -5,11 +5,11 @@ go 1.21.3 toolchain go1.21.5 require ( + github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 github.com/go-resty/resty/v2 v2.7.0 github.com/rs/zerolog v1.30.0 - github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 github.com/smartcontractkit/chainlink-env v0.3.29 - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230530233948-90c8af98011e + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240122062216-46e109a03936 github.com/smartcontractkit/chainlink-testing-framework v1.19.1 ) @@ -20,6 +20,7 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/NethermindEth/juno v0.3.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect @@ -70,7 +71,6 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.4.0 // indirect @@ -125,13 +125,15 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce // indirect + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 // indirect github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/supranational/blst v0.3.11 // indirect + github.com/test-go/testify v1.1.4 // indirect github.com/testcontainers/testcontainers-go v0.23.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect @@ -150,15 +152,15 @@ require ( go.starlark.net v0.0.0-20220817180228-f738f5508c12 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect + golang.org/x/net v0.20.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.16.0 // indirect diff --git a/ops/go.sum b/ops/go.sum index 468aeccde..0fb1a6a99 100644 --- a/ops/go.sum +++ b/ops/go.sum @@ -54,6 +54,10 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= @@ -240,6 +244,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -274,13 +280,10 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -474,12 +477,12 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce h1:+6MzHiHMPBddiR9tnkXA7pjgd2mNaboPck8cNsSfYrs= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce/go.mod h1:05rRF84QKlIOF5LfTBPkHdw4UpBI2G3zxRcuZ65bPjk= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 h1:Yk0RK9WV59ISOZZMsdtxZBAKaBfdgb05oXyca/qSqcw= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4/go.mod h1:pRlQrvcizMmuHAUV4N96oO2e3XbA99JCQELLc6ES160= github.com/smartcontractkit/chainlink-env v0.3.29 h1:hcIw/BeuB0wKiiE3umAUNBZzWkHO24XF3OW9xSrlMbI= github.com/smartcontractkit/chainlink-env v0.3.29/go.mod h1:9c0Czq4a6wZKY20BcoAlK29DnejQIiLo/MwKYtSFnHk= github.com/smartcontractkit/chainlink-testing-framework v1.19.1 h1:MdGM5jIrBi858Cv7qzfl1Qon93YW8InohAlDQqFoIb4= @@ -517,6 +520,8 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= +github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/testcontainers/testcontainers-go v0.23.0 h1:ERYTSikX01QczBLPZpqsETTBO7lInqEP349phDOVJVs= github.com/testcontainers/testcontainers-go v0.23.0/go.mod h1:3gzuZfb7T9qfcH2pHpV4RLlWrPjeWNQah6XlYQ32c4I= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -576,8 +581,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -651,8 +656,8 @@ golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -672,8 +677,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -723,12 +728,12 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/ops/localenv/main.go b/ops/localenv/main.go index 687b0c54c..09a971f1d 100644 --- a/ops/localenv/main.go +++ b/ops/localenv/main.go @@ -28,10 +28,10 @@ func main() { switch strings.ToLower(os.Args[1]) { // create k8s cluster + resources - case "create": - run("create registry", "k3d", "registry", "create", "registry.localhost", "--port", "127.0.0.1:12345") - run("create k8s cluster", "k3d", "cluster", "create", "local", "--api-port", "127.0.0.1:12346", "--registry-use", "k3d-registry.localhost:12345") - run("switch k8s context", "kubectl", "config", "use-context", "k3d-local") + // case "create": + // run("create registry", "k3d", "registry", "create", "registry.localhost", "--port", "127.0.0.1:12345", "--default-network", "chainlink") + // run("create k8s cluster", "k3d", "cluster", "create", "local", "--api-port", "127.0.0.1:12346", "--registry-use", "k3d-registry.localhost:12345") + // run("switch k8s context", "kubectl", "config", "use-context", "k3d-local") // build and upload image to local registry case "build": context := "../../../chainlink" // TODO: make this an arg @@ -52,15 +52,15 @@ func main() { setEnvIfNotExists("TTL", "900h") run("start environment", "go", "test", "-count", "1", "-v", "-timeout", "30m", "--run", "^TestOCRBasic$", "./smoke") // stop k8s namespace from environment - case "stop": - if len(os.Args) < 3 { - panic("missing namespace argument") - } - run("stopping environment", "kubectl", "delete", "namespaces", os.Args[2]) + // case "stop": + // if len(os.Args) < 3 { + // panic("missing namespace argument") + // } + // run("stopping environment", "kubectl", "delete", "namespaces", os.Args[2]) // delete removes the k8s cluster - case "delete": - run("remove k8s cluster", "k3d", "cluster", "delete", "local") - run("remove registry", "k3d", "registry", "delete", "k3d-registry.localhost") + // case "delete": + // run("remove k8s cluster", "k3d", "cluster", "delete", "local") + // run("remove registry", "k3d", "registry", "delete", "k3d-registry.localhost") default: panic("unrecognized command") } diff --git a/ops/scripts/devnet-hardhat-down.sh b/ops/scripts/devnet-hardhat-down.sh index 193628820..31bd6970d 100755 --- a/ops/scripts/devnet-hardhat-down.sh +++ b/ops/scripts/devnet-hardhat-down.sh @@ -1,28 +1,28 @@ #!/usr/bin/env bash # TODO: this script needs to be replaced with a predefined K8s enviroment -echo "Cleaning up Starknet Devnet container..." +echo "Cleaning up Hardhat container..." -dpid=`docker ps | grep chainlink-starknet.starknet-devnet | awk '{print $1}'`; -echo "Checking for existing 'chainlink-starknet.starknet-devnet' docker container..." +dpid=`docker ps | grep chainlink-starknet.hardhat | awk '{print $1}'`; +echo "Checking for existing 'chainlink-starknet.hardhat' docker container..." if [ -z "$dpid" ] then - echo "No docker Starknet Devnet container running."; + echo "No docker Hardhat container running."; else docker kill $dpid; - docker rm $dpid; fi +docker rm "chainlink-starknet.hardhat"; -echo "Cleaning up Hardhat container..." +echo "Cleaning up Starknet Devnet container..." -dpid=`docker ps | grep chainlink-starknet.hardhat | awk '{print $1}'`; -echo "Checking for existing 'chainlink-starknet.hardhat' docker container..." +dpid=`docker ps | grep chainlink-starknet.starknet-devnet | awk '{print $1}'`; +echo "Checking for existing 'chainlink-starknet.starknet-devnet' docker container..." if [ -z "$dpid" ] then - echo "No docker Hardhat container running."; + echo "No docker Starknet Devnet container running."; else docker kill $dpid; - docker rm $dpid; fi +docker rm "chainlink-starknet.starknet-devnet"; echo "Cleanup finished." diff --git a/ops/scripts/devnet-hardhat.sh b/ops/scripts/devnet-hardhat.sh index 39ae970ba..80e728984 100755 --- a/ops/scripts/devnet-hardhat.sh +++ b/ops/scripts/devnet-hardhat.sh @@ -3,26 +3,9 @@ set -euo pipefail -cpu_struct=`arch`; -echo $cpu_struct; - -git_root="$(git rev-parse --show-toplevel)" -cairo_build_path="${git_root}/cairo-build" -cairo_sierra_compile_path="${cairo_build_path}/bin/starknet-sierra-compile" - -cairo_checkout_path="${git_root}/vendor/cairo" -cairo_compiler_manifest="${cairo_checkout_path}/Cargo.toml" - -if [ -f "${cairo_sierra_compile_path}" ]; then - docker_volume="${cairo_build_path}:/cairo-build" - startup_args="starknet-devnet --lite-mode --host 0.0.0.0 --sierra-compiler-path /cairo-build/bin/starknet-sierra-compile" -elif [ -f "${cairo_compiler_manifest}" ]; then - docker_volume="${cairo_checkout_path}:/cairo" - startup_args="(wget https://sh.rustup.rs -O - | sh -s -- -y) && apk add gmp-dev g++ gcc libffi-dev && PATH=\"/root/.cargo/bin:\${PATH}\" starknet-devnet --lite-mode --host 0.0.0.0 --cairo-compiler-manifest /cairo/Cargo.toml" -else - echo "No Cargo.toml; did you checkout the cairo git submodule?" - exit 1 -fi +# cpu_struct=`arch`; +# echo $cpu_struct; +cpu_struct="linux"; # Clean up first bash "$(dirname -- "$0";)/devnet-hardhat-down.sh" @@ -31,24 +14,25 @@ echo "Checking CPU structure..." if [[ $cpu_struct == *"arm"* ]] then echo "Starting arm devnet container..." - container_version="0.6.0-arm" + container_version="d7c168ac53da3e9d717ed3ff8dad665ccade43e0-arm" else echo "Starting i386 devnet container..." - container_version="0.6.0" + container_version="d7c168ac53da3e9d717ed3ff8dad665ccade43e0" fi -echo "Starting starknet-devnet: ${startup_args}" +echo "Starting starknet-devnet" # we need to replace the entrypoint because starknet-devnet's docker builds at 0.5.1 don't include cargo or gcc. docker run \ -p 127.0.0.1:5050:5050 \ -p 127.0.0.1:8545:8545 \ -d \ + -e RUST_LOG=debug \ --name chainlink-starknet.starknet-devnet \ - --volume "${docker_volume}" \ - --entrypoint sh \ - "shardlabs/starknet-devnet:${container_version}" \ - -c "${startup_args}" + "shardlabs/starknet-devnet-rs:${container_version}" \ + --seed 0 \ + --gas-price 1 \ + --account-class cairo1 echo "Starting hardhat..." docker run --net container:chainlink-starknet.starknet-devnet -d --name chainlink-starknet.hardhat ethereumoptimism/hardhat-node:nightly @@ -65,7 +49,7 @@ do prev_output="${output}" fi - if [[ $output == *"Listening"* ]]; then + if [[ $output == *"listening"* ]]; then echo "" echo "starknet-devnet is ready." exit 0 diff --git a/ops/test_helpers.go b/ops/test_helpers.go index 6819b7aba..8641e1739 100644 --- a/ops/test_helpers.go +++ b/ops/test_helpers.go @@ -1,21 +1,5 @@ package ops -import ( - "math/big" - - "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/txm" -) - -var ( - // seed = 0 keys for starknet-devnet - PrivateKeys0Seed = txm.PrivateKeys0Seed - - // devnet key derivation - // https://github.com/Shard-Labs/starknet-devnet/blob/master/starknet_devnet/account.py - DevnetClassHash, _ = new(big.Int).SetString("1803505466663265559571280894381905521939782500874858933595227108099796801620", 10) - DevnetSalt = big.NewInt(20) -) - // OCR2Config Default config for OCR2 for starknet type OCR2Config struct { F int `json:"f"` diff --git a/package.json b/package.json index 2f5a03f28..521a67c19 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,6 @@ "typescript": "4.7.2" }, "dependencies": { - "starknet": "^5.17.0" + "starknet": "^6.0.0-beta.11" } } diff --git a/packages-ts/integration-multisig/hardhat.config.ts b/packages-ts/integration-multisig/hardhat.config.ts deleted file mode 100644 index 88fe0f990..000000000 --- a/packages-ts/integration-multisig/hardhat.config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import path from 'path' -import { HardhatUserConfig } from 'hardhat/types' -import '@shardlabs/starknet-hardhat-plugin' -import { prepareHardhatArtifacts } from '../../contracts/test/setup' - -/** - * @type import('hardhat/config').HardhatUserConfig - */ -const config: HardhatUserConfig = { - starknet: { - venv: 'active', - network: 'devnet', - wallets: { - OpenZeppelin: { - accountName: 'OpenZeppelin', - modulePath: 'starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount', - accountPath: '~/.starknet_accounts', - }, - }, - }, - networks: { - devnet: { - url: 'http://127.0.0.1:5050/', - args: ['--cairo-compiler-manifest', '../../vendor/cairo/Cargo.toml'], - }, - }, - mocha: { - timeout: 10000000, - rootHooks: { - beforeAll: prepareHardhatArtifacts, - }, - }, - paths: { - sources: './solidity', - starknetSources: '../../contracts/src', - starknetArtifacts: '../../contracts/target/release', - cairoPaths: [], - }, -} - -export default config diff --git a/packages-ts/integration-multisig/package.json b/packages-ts/integration-multisig/package.json deleted file mode 100644 index bd2b8aeeb..000000000 --- a/packages-ts/integration-multisig/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@chainlink/starknet-integration-tests-multisig", - "version": "1.0.0", - "description": "Multisig integration test", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "npx hardhat --network localhost test" - }, - "devDependencies": { - "@changesets/cli": "^2.22.0", - "@nomiclabs/hardhat-ethers": "^2.0.5", - "@shardlabs/starknet-hardhat-plugin": "^0.8.0-alpha.2", - "@types/chai": "^4.3.3", - "@types/elliptic": "^6.4.14", - "@types/mocha": "^9.1.1", - "chai": "^4.3.6", - "ethers": "^5.6.8", - "hardhat": "^2.16.1", - "starsign-multisig": "^0.3.0" - } -} diff --git a/packages-ts/integration-multisig/test/Multisig.test.ts b/packages-ts/integration-multisig/test/Multisig.test.ts deleted file mode 100644 index 47bb825ab..000000000 --- a/packages-ts/integration-multisig/test/Multisig.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { expect } from 'chai' -import { starknet } from 'hardhat' -import { StarknetContract, Account } from 'hardhat/types/runtime' -import { num, hash } from 'starknet' -import { account, expectSuccessOrDeclared } from '@chainlink/starknet' - -describe('Multisig integration tests', function () { - this.timeout(300_000) - - const opts = account.makeFunderOptsFromEnv() - const funder = new account.Funder(opts) - - let account1: Account - let account2: Account - let account3: Account - - let multisig: StarknetContract - - before(async function () { - account1 = await starknet.OpenZeppelinAccount.createAccount() - account2 = await starknet.OpenZeppelinAccount.createAccount() - account3 = await starknet.OpenZeppelinAccount.createAccount() - - await funder.fund([ - { account: account1.address, amount: 1e21 }, - { account: account2.address, amount: 1e21 }, - { account: account3.address, amount: 1e21 }, - ]) - await account1.deployAccount() - await account2.deployAccount() - await account3.deployAccount() - }) - - it('Deploy contract', async () => { - let multisigFactory = await starknet.getContractFactory('multisig') - await expectSuccessOrDeclared(account1.declare(multisigFactory, { maxFee: 1e20 })) - - multisig = await account1.deploy(multisigFactory, { - signers: [ - num.toBigInt(account1.starknetContract.address), - num.toBigInt(account2.starknetContract.address), - num.toBigInt(account3.starknetContract.address), - ], - threshold: 2, - }) - - expect(multisig).to.be.ok - }) - - it('should submit & confirm transaction', async () => { - const nonce = 0 - const newThreshold = 1n - const selector = hash.getSelectorFromName('set_threshold') - - const payload = { - to: multisig.address, - function_selector: selector, - calldata: [newThreshold], - } - - { - const res = await account1.invoke(multisig, 'submit_transaction', payload) - const txReciept = await starknet.getTransactionReceipt(res) - - expect(txReciept.events.length).to.equal(2) - expect(txReciept.events[0].data.length).to.equal(3) - expect(txReciept.events[0].data[1]).to.equal(num.toHex(num.toBigInt(nonce, 'hex'))) - } - - await account1.invoke(multisig, 'confirm_transaction', { - nonce, - }) - - await account2.invoke(multisig, 'confirm_transaction', { - nonce, - }) - - await account3.invoke(multisig, 'execute_transaction', { - nonce, - }) - - { - const res = await multisig.call('get_threshold') - expect(res.response).to.equal(newThreshold) - } - }) -}) diff --git a/packages-ts/integration-multisig/tsconfig.json b/packages-ts/integration-multisig/tsconfig.json deleted file mode 100644 index 8ac80569b..000000000 --- a/packages-ts/integration-multisig/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["./test"], - "files": ["./hardhat.config.ts"] - } - \ No newline at end of file diff --git a/packages-ts/starknet-gauntlet-cli/networks/.env.testnet b/packages-ts/starknet-gauntlet-cli/networks/.env.testnet index c845be4b6..1011ef7a1 100644 --- a/packages-ts/starknet-gauntlet-cli/networks/.env.testnet +++ b/packages-ts/starknet-gauntlet-cli/networks/.env.testnet @@ -1 +1 @@ -NODE_URL=https://alpha4.starknet.io +NODE_URL=https://starknet-testnet.public.blastapi.io diff --git a/packages-ts/starknet-gauntlet-emergency-protocol/test/commands/sequencerUptimeFeed.test.ts b/packages-ts/starknet-gauntlet-emergency-protocol/test/commands/sequencerUptimeFeed.test.ts index 23c4eede6..e565045a3 100644 --- a/packages-ts/starknet-gauntlet-emergency-protocol/test/commands/sequencerUptimeFeed.test.ts +++ b/packages-ts/starknet-gauntlet-emergency-protocol/test/commands/sequencerUptimeFeed.test.ts @@ -5,18 +5,11 @@ import { registerExecuteCommand, registerInspectCommand, TIMEOUT, - startNetwork, - IntegratedDevnet, } from '@chainlink/starknet-gauntlet/test/utils' describe('Sequencer Uptime Feed Contract', () => { - let network: IntegratedDevnet let uptimeFeedAddress: string - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - // deploy uptime feed contract beforeEach(async () => { const command = await registerExecuteCommand(deployCommand).create( @@ -60,8 +53,4 @@ describe('Sequencer Uptime Feed Contract', () => { expect(report.data.data.latest_round_data.answer).toEqual('0') }) }) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-example/test/commands/example.test.ts b/packages-ts/starknet-gauntlet-example/test/commands/example.test.ts index 6049615fb..8f7686e07 100644 --- a/packages-ts/starknet-gauntlet-example/test/commands/example.test.ts +++ b/packages-ts/starknet-gauntlet-example/test/commands/example.test.ts @@ -8,8 +8,6 @@ import { registerExecuteCommand, TIMEOUT, registerInspectCommand, - startNetwork, - IntegratedDevnet, } from '@chainlink/starknet-gauntlet/test/utils' import { loadExampleContract } from '../utils' @@ -25,13 +23,8 @@ const getBalance = async (address: string) => { } describe('Example Contract', () => { - let network: IntegratedDevnet let contractAddress: string - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - it( 'Deployment with default input', async () => { @@ -94,8 +87,4 @@ describe('Example Contract', () => { }, 3000) // TODO: Include tests with account contract. Pending on devnet to support predeployed accounts and fee token - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-ledger/src/index.ts b/packages-ts/starknet-gauntlet-ledger/src/index.ts index 8681fecd9..6ec9853ee 100644 --- a/packages-ts/starknet-gauntlet-ledger/src/index.ts +++ b/packages-ts/starknet-gauntlet-ledger/src/index.ts @@ -72,21 +72,25 @@ class LedgerSigner implements SignerInterface { transactionsDetail: InvocationsSignerDetails, abis?: Abi[], ): Promise { + // TODO: match https://github.com/starknet-io/starknet.js/blob/0f8b266da6709ddb897860575e09578e547d185c/src/signer/default.ts#L46-L77 + const calldata = transaction.fromCallsToExecuteCalldataWithNonce( transactions, transactionsDetail.nonce, ) - const msgHash = hash.calculateTransactionHash( - transactionsDetail.walletAddress, - transactionsDetail.version, - calldata, - transactionsDetail.maxFee, - transactionsDetail.chainId, - transactionsDetail.nonce, - ) + // const msgHash = hash.calculateTransactionHash( + // transactionsDetail.walletAddress, + // transactionsDetail.version, + // calldata, + // transactionsDetail.maxFee, + // transactionsDetail.chainId, + // transactionsDetail.nonce, + // ) - return this.sign(msgHash) + // return this.sign(msgHash) + + throw 'unimplemented' } async signDeployAccountTransaction(transaction: DeployAccountSignerDetails): Promise { diff --git a/packages-ts/starknet-gauntlet-multisig/test/multisig/multisig.test.ts b/packages-ts/starknet-gauntlet-multisig/test/multisig/multisig.test.ts index d84e97325..6e16b9c93 100644 --- a/packages-ts/starknet-gauntlet-multisig/test/multisig/multisig.test.ts +++ b/packages-ts/starknet-gauntlet-multisig/test/multisig/multisig.test.ts @@ -3,48 +3,37 @@ import deployCommand from '../../src/commands/multisig/deploy' import setSigners from '../../src/commands/multisig/setSigners' import setThreshold from '../../src/commands/multisig/setThreshold' import { wrapCommand } from '../../src/wrapper' -import { - registerExecuteCommand, - TIMEOUT, - startNetwork, - IntegratedDevnet, - LOCAL_URL, -} from '@chainlink/starknet-gauntlet/test/utils' +import { registerExecuteCommand, TIMEOUT, LOCAL_URL } from '@chainlink/starknet-gauntlet/test/utils' import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils' import { loadContract } from '@chainlink/starknet-gauntlet' import { CONTRACT_LIST } from '../../src/lib/contracts' import { Contract } from 'starknet' describe('Multisig', () => { - let network: IntegratedDevnet let multisigContractAddress: string const SEED: number = 10 let accounts: string[] = [ - '0x72ad5b6e5a1c114c370eeabbe700cac4fdd7be47f2ada87ad3b89d346303dec', - '0x467e04fd5fee4f8a0023c5da41dcdfd963f7e4a9f498a29cbc5c8d030924f5d', - '0x77c3cd3e09a70580db713fc0d8da7298a9739dea23d4de561eac2991cb6c300', + '0x78662e7352d062084b0010068b99288486c2d8b914f6e2a55ce945f8792c8b1', + '0x49dfb8ce986e21d354ac93ea65e6a11f639c1934ea253e5ff14ca62eca0f38e', + '0x4f348398f859a55a0c80b1446c5fdc37edb3a8478a32f10764659fc241027d3', ] let publicKeys: string[] = [ - '0x5366dfa9668f9f51c6f4277455b34881262f12cb6b12b487877d9319a5b48bc', - '0x5ad457b3d822e2f1671c2046038a3bb45e6683895f7a4af266545de03e0d3e9', - '0x1a9dea7b74c0eee5f1873c43cc600a01ec732183d5b230efa9e945495823e9a', + '0x7a1bb2744a7dd29bffd44341dbd78008adb4bc11733601e7eddff322ada9cb', + '0xb8fd4ddd415902d96f61b7ad201022d495997c2dff8eb9e0eb86253e30fabc', + '0x5e05d2510c6110bde03df9c1c126a1f592207d78cd9e481ac98540d5336d23c', ] let privateKeys: string[] = [ - '0x7b89296c6dcbac5008577eb1924770d3', - '0x766bad0734c2da8003cc0f2793fdcab8', - '0x470b9805d2d6b8777dc59a3ad035d259', + '0xe1406455b7d66b1690803be066cbe5e', + '0xa20a02f0ac53692d144b20cb371a60d7', + '0xa641611c17d4d92bd0790074e34beeb7', ] let newSignerAccount = { - account: '0x5cdb30a922a2d4f9836877ed76c67564ec32625458884d0f1f2aef1ae023249', - publicKey: '0x6a5f1d67f6b59f3a2a294c3e523731b43fccbb7230985be7399c118498faf03', - privateKey: '0x8ceac392904cdefcf84b683a749f9c5', + account: '0xd513de92c16aa42418cf7e5b60f8022dbee1b4dfd81bcf03ebee079cfb5cb5', + publicKey: '0x4708e28e2424381659ea6b7dded2b3aff4b99debfcf6080160a9d098ac2214d', + privateKey: '0x5b4ac23628a5749277bcabbf4726b025', } - beforeAll(async () => { - network = await startNetwork({ seed: SEED }) - }, TIMEOUT) - it( 'Deployment', async () => { @@ -217,8 +206,4 @@ describe('Multisig', () => { }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/configEvent.ts b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/configEvent.ts index ccacf1618..52b1632e7 100644 --- a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/configEvent.ts +++ b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/configEvent.ts @@ -6,13 +6,11 @@ export const getLatestOCRConfigEvent = async ( contractAddress: string, ) => { // get block number in which the latest config was set - const res = ( - await provider.provider.callContract({ - contractAddress, - entrypoint: 'latest_config_details', - calldata: [], - }) - ).result + const res = await provider.provider.callContract({ + contractAddress, + entrypoint: 'latest_config_details', + calldata: [], + }) const latestConfigDetails = { configCount: parseInt(res[0]), blockNumber: parseInt(res[1]), @@ -21,25 +19,21 @@ export const getLatestOCRConfigEvent = async ( // if no config has been set yet, return empty config if (latestConfigDetails.configCount === 0) return [] - // retrieve all block traces in the block in which the latest config was set - const blockTraces = await provider.provider.getBlockTraces(latestConfigDetails.blockNumber) - - // retrieve array of all events across all internal calls for each tx in the - // block, for which the contract address = aggregator contract and the first - // event key matches 'ConfigSet' - const configSetEvents = blockTraces.traces.flatMap((trace) => { - return trace.function_invocation.internal_calls - .filter((call) => call.contract_address === contractAddress) - .flatMap((call) => call.events) - .filter((event) => event.keys[0] === hash.getSelectorFromName('ConfigSet')) + const keyFilter = [hash.getSelectorFromName('ConfigSet')] + const chunk = await provider.provider.getEvents({ + address: contractAddress, + from_block: { block_number: latestConfigDetails.blockNumber }, + to_block: { block_number: latestConfigDetails.blockNumber }, + keys: [keyFilter], + chunk_size: 10, }) - + const events = chunk.events // if no config set events found in the given block, throw error // this should not happen if block number in latestConfigDetails is set correctly - if (configSetEvents.length === 0) + if (events.length === 0) throw new Error(`No ConfigSet events found in block number ${latestConfigDetails.blockNumber}`) // assume last event found is the latest config, in the event that multiple // set_config transactions ended up in the same block - return configSetEvents[configSetEvents.length - 1].data + return events[events.length - 1].data } diff --git a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/inspect.ts b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/inspect.ts index 7d5344650..9e6434759 100644 --- a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/inspect.ts +++ b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/inspection/inspect.ts @@ -60,7 +60,7 @@ const makeComparisionData = (provider: IStarknetProvider) => async ( }) transmitterInfo.push({ transmitter, - owedPayment: parseInt(owedPayment.result[0]).toString(), + owedPayment: parseInt(owedPayment[0]).toString(), }) } const billing = { diff --git a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/setConfig.ts b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/setConfig.ts index be9befc4e..59c1ce356 100644 --- a/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/setConfig.ts +++ b/packages-ts/starknet-gauntlet-ocr2/src/commands/ocr2/setConfig.ts @@ -13,7 +13,6 @@ import { ocr2ContractLoader } from '../../lib/contracts' import { SetConfig, encoding, SetConfigInput } from '@chainlink/gauntlet-contracts-ocr2' import { decodeOffchainConfigFromEventData } from '../../lib/encoding' import assert from 'assert' -import { InvokeTransactionReceiptResponse } from 'starknet' import { getLatestOCRConfigEvent } from './inspection/configEvent' type Oracle = { @@ -157,10 +156,8 @@ const afterExecute: AfterExecute = (context, inpu result, ) => { const txHash = result.responses[0].tx.hash - const txInfo = (await context.provider.provider.getTransactionReceipt( - txHash, - )) as InvokeTransactionReceiptResponse - if (txInfo.status === 'REJECTED') { + const txInfo = await context.provider.provider.getTransactionReceipt(txHash) + if (txInfo.execution_status === 'REVERTED') { return { successfulConfiguration: false } } const eventData = txInfo.events[0].data diff --git a/packages-ts/starknet-gauntlet-ocr2/test/commands/access_controller.test.ts b/packages-ts/starknet-gauntlet-ocr2/test/commands/access_controller.test.ts index d4a0348cd..aabf4b5b0 100644 --- a/packages-ts/starknet-gauntlet-ocr2/test/commands/access_controller.test.ts +++ b/packages-ts/starknet-gauntlet-ocr2/test/commands/access_controller.test.ts @@ -1,18 +1,7 @@ import deployCommand from '../../src/commands/accessController/deploy' -import { - registerExecuteCommand, - TIMEOUT, - startNetwork, - IntegratedDevnet, -} from '@chainlink/starknet-gauntlet/test/utils' +import { registerExecuteCommand, TIMEOUT } from '@chainlink/starknet-gauntlet/test/utils' describe('Access Controller Contract', () => { - let network: IntegratedDevnet - - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - it( 'Deployment', async () => { @@ -23,8 +12,4 @@ describe('Access Controller Contract', () => { }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts b/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts index 3860b5641..7101dbd86 100644 --- a/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts +++ b/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts @@ -7,8 +7,6 @@ import { registerExecuteCommand, TIMEOUT, LOCAL_URL, - startNetwork, - IntegratedDevnet, devnetAccount0Address, } from '@chainlink/starknet-gauntlet/test/utils' import { loadContract } from '@chainlink/starknet-gauntlet' @@ -75,14 +73,9 @@ const validInput = { } describe('OCR2 Contract', () => { - let network: IntegratedDevnet let contractAddress: string let accessController: string - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - it( 'Deploy AC', async () => { @@ -195,8 +188,4 @@ describe('OCR2 Contract', () => { }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-ocr2/test/commands/proxy.test.ts b/packages-ts/starknet-gauntlet-ocr2/test/commands/proxy.test.ts index 4a041c0a7..ebaead41d 100644 --- a/packages-ts/starknet-gauntlet-ocr2/test/commands/proxy.test.ts +++ b/packages-ts/starknet-gauntlet-ocr2/test/commands/proxy.test.ts @@ -6,27 +6,16 @@ import confirmAggregatorCommand from '../../src/commands/proxy/confirmAggregator import { registerExecuteCommand, TIMEOUT, - startNetwork, - IntegratedDevnet, devnetAccount0Address, } from '@chainlink/starknet-gauntlet/test/utils' let account = devnetAccount0Address describe('Proxy Contract', () => { - let network: IntegratedDevnet let contractAddress: string let accessController: string let proxy: string - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - - afterAll(async () => { - network.stop() - }) - it( 'Deploy AC', async () => { diff --git a/packages-ts/starknet-gauntlet-oz/package.json b/packages-ts/starknet-gauntlet-oz/package.json index 278319e6b..b827224f1 100644 --- a/packages-ts/starknet-gauntlet-oz/package.json +++ b/packages-ts/starknet-gauntlet-oz/package.json @@ -25,7 +25,6 @@ "bundle": "yarn build && pkg ." }, "dependencies": { - "@chainlink-dev/starkgate-open-zeppelin": "^0.6.1", "@chainlink/gauntlet-core": "0.3.1", "@chainlink/starknet-gauntlet": "*" } diff --git a/packages-ts/starknet-gauntlet-oz/src/lib/contracts.ts b/packages-ts/starknet-gauntlet-oz/src/lib/contracts.ts index acf1aa938..b311ed2c1 100644 --- a/packages-ts/starknet-gauntlet-oz/src/lib/contracts.ts +++ b/packages-ts/starknet-gauntlet-oz/src/lib/contracts.ts @@ -9,8 +9,14 @@ export const accountContractLoader = () => { return { contract: json.parse( fs.readFileSync( - `${__dirname}/../../../../node_modules/@chainlink-dev/starkgate-open-zeppelin/artifacts/0.6.1/Account.cairo/Account.json`, - 'utf8', + `${__dirname}/../../../../contracts/target/release/chainlink_Account.contract_class.json`, + 'utf-8', + ), + ), + casm: json.parse( + fs.readFileSync( + `${__dirname}/../../../../contracts/target/release/chainlink_Account.compiled_contract_class.json`, + 'utf-8', ), ), } diff --git a/packages-ts/starknet-gauntlet-oz/test/commands/account.test.ts b/packages-ts/starknet-gauntlet-oz/test/commands/account.test.ts index b350759be..93e09d1e1 100644 --- a/packages-ts/starknet-gauntlet-oz/test/commands/account.test.ts +++ b/packages-ts/starknet-gauntlet-oz/test/commands/account.test.ts @@ -1,24 +1,13 @@ import { makeProvider } from '@chainlink/starknet-gauntlet' import deployCommand from '../../src/commands/account/deploy' -import { - registerExecuteCommand, - TIMEOUT, - LOCAL_URL, - startNetwork, - IntegratedDevnet, -} from '@chainlink/starknet-gauntlet/test/utils' -import { accountContractLoader, CONTRACT_LIST } from '../../src/lib/contracts' +import { registerExecuteCommand, TIMEOUT, LOCAL_URL } from '@chainlink/starknet-gauntlet/test/utils' +import { accountContractLoader } from '../../src/lib/contracts' import { Contract } from 'starknet' describe('OZ Account Contract', () => { - let network: IntegratedDevnet let publicKey: string let contractAddress: string - beforeAll(async () => { - network = await startNetwork() - }, TIMEOUT) - it( 'Deployment', async () => { @@ -32,13 +21,9 @@ describe('OZ Account Contract', () => { const { contract: oz } = accountContractLoader() const ozContract = new Contract(oz.abi, contractAddress, makeProvider(LOCAL_URL).provider) - const { publicKey: onChainPubKey } = await ozContract.getPublicKey() + const onChainPubKey = await ozContract.getPublicKey() expect(onChainPubKey).toEqual(BigInt(publicKey)) }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet-token/src/commands/token/mint.ts b/packages-ts/starknet-gauntlet-token/src/commands/token/mint.ts index 35df22692..12b0a17f6 100644 --- a/packages-ts/starknet-gauntlet-token/src/commands/token/mint.ts +++ b/packages-ts/starknet-gauntlet-token/src/commands/token/mint.ts @@ -59,7 +59,7 @@ const commandConfig: ExecuteCommandConfig = { `${CATEGORIES.TOKEN}:mint --network= --recipient= --amount= `, ], }, - internalFunction: 'permissionedMint', + internalFunction: 'permissioned_mint', makeUserInput, makeContractInput, validations: [validateRecipient, validateAmount], diff --git a/packages-ts/starknet-gauntlet-token/test/commands/token.test.ts b/packages-ts/starknet-gauntlet-token/test/commands/token.test.ts index d643043a2..bdeb2601b 100644 --- a/packages-ts/starknet-gauntlet-token/test/commands/token.test.ts +++ b/packages-ts/starknet-gauntlet-token/test/commands/token.test.ts @@ -7,14 +7,12 @@ import balanceOfCommand from '../../src/commands/inspection/balanceOf' import { registerExecuteCommand, registerInspectCommand, + devnetAccount0Address, + devnetPrivateKey, TIMEOUT, - startNetwork, - IntegratedDevnet, } from '@chainlink/starknet-gauntlet/test/utils' describe('Token Contract', () => { - let network: IntegratedDevnet - let defaultAccount: string let defaultPk: string let defaultBalance: number @@ -26,11 +24,9 @@ describe('Token Contract', () => { let tokenContractAddress: string beforeAll(async () => { - network = await startNetwork({ seed: 0 }) - // account #0 with seed 0 - defaultAccount = '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a' - defaultPk = '0xe3e70682c2094cac629f6fbed82c07cd' + defaultAccount = devnetAccount0Address + defaultPk = devnetPrivateKey defaultBalance = 0 }, TIMEOUT) @@ -128,8 +124,4 @@ describe('Token Contract', () => { }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet/src/commands/base/executeCommand.ts b/packages-ts/starknet-gauntlet/src/commands/base/executeCommand.ts index b94597ae9..8fc256ebd 100644 --- a/packages-ts/starknet-gauntlet/src/commands/base/executeCommand.ts +++ b/packages-ts/starknet-gauntlet/src/commands/base/executeCommand.ts @@ -257,7 +257,7 @@ export const makeExecuteCommand = (config: ExecuteCommandConfig) return tx } - deps.logger.success(`Contract declared at ${tx.tx.class_hash}`) + deps.logger.success(`Contract declared at ${this.compiledContractHash}`) return tx } diff --git a/packages-ts/starknet-gauntlet/src/contract/index.ts b/packages-ts/starknet-gauntlet/src/contract/index.ts index c381b12f9..b61b94838 100644 --- a/packages-ts/starknet-gauntlet/src/contract/index.ts +++ b/packages-ts/starknet-gauntlet/src/contract/index.ts @@ -6,13 +6,13 @@ export const loadContract = (name: string): LoadContractResult => { return { contract: json.parse( fs.readFileSync( - `${__dirname}/../../../../contracts/target/release/chainlink_${name}.sierra.json`, + `${__dirname}/../../../../contracts/target/release/chainlink_${name}.contract_class.json`, 'utf-8', ), ), casm: json.parse( fs.readFileSync( - `${__dirname}/../../../../contracts/target/release/chainlink_${name}.casm.json`, + `${__dirname}/../../../../contracts/target/release/chainlink_${name}.compiled_contract_class.json`, 'utf-8', ), ), diff --git a/packages-ts/starknet-gauntlet/src/provider/index.ts b/packages-ts/starknet-gauntlet/src/provider/index.ts index d6937380d..20c29843b 100644 --- a/packages-ts/starknet-gauntlet/src/provider/index.ts +++ b/packages-ts/starknet-gauntlet/src/provider/index.ts @@ -1,8 +1,8 @@ import { TransactionResponse } from '../transaction' import { - SequencerProvider as StarknetProvider, + RpcProvider as StarknetProvider, + InvokeFunctionResponse, DeployContractResponse, - Sequencer, CompiledContract, Account, Call, @@ -44,7 +44,7 @@ export const makeProvider = ( export const wrapResponse = ( provider: IStarknetProvider, - response: Sequencer.AddTransactionResponse | DeployContractResponse, + response: InvokeFunctionResponse | DeployContractResponse, address?: string, ): TransactionResponse => { const txResponse: TransactionResponse = { @@ -64,7 +64,7 @@ export const wrapResponse = ( success = false } const status = await provider.provider.getTransactionStatus(response.transaction_hash) - txResponse.tx.code = status.tx_status as any // For some reason, starknet does not consider any other status than "TRANSACTION_RECEIVED" + txResponse.code = status.finality_status // For some reason, starknet does not consider any other status than "TRANSACTION_RECEIVED" return { success } }, status: 'PENDING', @@ -77,8 +77,8 @@ class Provider implements IStarknetProvider { provider: StarknetProvider account: Account - constructor(baseUrl: string, wallet?: IStarknetWallet) { - this.provider = new StarknetProvider({ baseUrl }) + constructor(nodeUrl: string, wallet?: IStarknetWallet) { + this.provider = new StarknetProvider({ nodeUrl }) if (wallet) { this.account = new Account(this.provider, wallet.getAccountAddress(), wallet.signer) } diff --git a/packages-ts/starknet-gauntlet/src/transaction/index.ts b/packages-ts/starknet-gauntlet/src/transaction/index.ts index 6ead91eb3..e1203dd8a 100644 --- a/packages-ts/starknet-gauntlet/src/transaction/index.ts +++ b/packages-ts/starknet-gauntlet/src/transaction/index.ts @@ -1,10 +1,11 @@ -import { Sequencer } from 'starknet' +import { InvokeFunctionResponse, RPC } from 'starknet' export type TransactionResponse = { hash: string address?: string wait: () => Promise<{ success: boolean }> - tx?: Sequencer.AddTransactionResponse + tx?: InvokeFunctionResponse + code?: RPC.SPEC.TXN_STATUS status: 'PENDING' | 'ACCEPTED' | 'REJECTED' errorMessage?: string } diff --git a/packages-ts/starknet-gauntlet/test/commands/execute.test.ts b/packages-ts/starknet-gauntlet/test/commands/execute.test.ts index 1702faf4f..1a6152e79 100644 --- a/packages-ts/starknet-gauntlet/test/commands/execute.test.ts +++ b/packages-ts/starknet-gauntlet/test/commands/execute.test.ts @@ -6,7 +6,6 @@ import { registerExecuteCommand, TIMEOUT, } from '../utils' -import { IntegratedDevnet, startNetwork } from '../utils/network' let account: string = devnetAccount0Address let privateKey: string = devnetPrivateKey @@ -65,13 +64,8 @@ describe('Execute Command', () => { }) describe('Execute with network', () => { - let network: IntegratedDevnet let contractAddress: string - beforeAll(async () => { - network = await startNetwork({ seed: 0 }) - }, TIMEOUT) - it( 'Command deploy execution', async () => { @@ -107,8 +101,4 @@ describe('Execute with network', () => { }, TIMEOUT, ) - - afterAll(() => { - network.stop() - }) }) diff --git a/packages-ts/starknet-gauntlet/test/utils/index.ts b/packages-ts/starknet-gauntlet/test/utils/index.ts index 748e1086d..373ab5769 100644 --- a/packages-ts/starknet-gauntlet/test/utils/index.ts +++ b/packages-ts/starknet-gauntlet/test/utils/index.ts @@ -10,8 +10,6 @@ import { makeWallet, } from '../../src/index' -export { startNetwork, IntegratedDevnet } from './network' - export const loadContract = (name: string): CompiledContract => { return json.parse(fs.readFileSync(`${__dirname}/../__mocks__/${name}.json`).toString('ascii')) } @@ -40,9 +38,9 @@ export const noopPrompt: typeof prompt = async () => {} export const TIMEOUT = 900000 export const LOCAL_URL = 'http://127.0.0.1:5050/' -export const devnetPrivateKey = '0xe3e70682c2094cac629f6fbed82c07cd' +export const devnetPrivateKey = '0x71d7bb07b9a64f6f78ac4c816aff4da9' export const devnetAccount0Address = - '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a' + '0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691' // export const devnetKeyPair = ec.getKeyPair(devnetPrivateKey); export const registerExecuteCommand = ( diff --git a/packages-ts/starknet-gauntlet/test/utils/network.ts b/packages-ts/starknet-gauntlet/test/utils/network.ts deleted file mode 100644 index 0a1baac1f..000000000 --- a/packages-ts/starknet-gauntlet/test/utils/network.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { ChildProcess, spawn } from 'child_process' -import fs from 'fs' -import path from 'path' - -export abstract class IntegratedDevnet { - protected childProcess: ChildProcess - - constructor(protected port: string) { - IntegratedDevnet.cleanupFns.push(this.cleanup.bind(this)) - } - - protected static cleanupFns: Array<() => void> = [] - - public static cleanAll(): void { - this.cleanupFns.forEach((fn) => fn()) - } - - protected abstract spawnChildProcess(): Promise - - protected abstract cleanup(): void - - public async start(): Promise { - this.childProcess = await this.spawnChildProcess() - - return new Promise((resolve, reject) => { - setTimeout(resolve, 4000) - - this.childProcess.on('error', (error) => { - reject(error) - }) - }) - } - - public stop() { - if (!this.childProcess) { - return - } - - this.cleanup() - } -} - -class VenvDevnet extends IntegratedDevnet { - private command: string - private opts: any - - constructor(port: string, opts: any) { - super(port) - - this.opts = opts - this.command = 'starknet-devnet' - } - - protected spawnChildProcess(): Promise { - return new Promise((resolve, reject) => { - const cairoSierraCompilerBuildPath = path.join( - __dirname, - '../../../../cairo-build/bin/starknet-sierra-compile', - ) - const cargoManifest = path.join(__dirname, '../../../../vendor/cairo/Cargo.toml') - const args = ['--port', this.port, '--gas-price', '1', '--lite-mode'] - if (fs.existsSync(cairoSierraCompilerBuildPath)) { - args.push('--sierra-compiler-path', cairoSierraCompilerBuildPath) - } else if (fs.existsSync(cargoManifest)) { - args.push('--cairo-compiler-manifest', cargoManifest) - } else { - return reject(new Error('Could not find cairo package')) - } - if (this.opts?.seed) { - args.push('--seed', this.opts.seed.toString()) - } else { - args.push('--seed', '0') - } - console.log('Spawning starknet-devnet:', args.join(' ')) - const childProcess = spawn(this.command, args) - childProcess.on('error', reject) - - // starknet-devnet takes time to run the starknet rust compiler once first to get the version. - // This calls `cargo run` and requires building on first run, which can take a while. Wait for some program output before we resolve. - // ref: https://github.com/0xSpaceShard/starknet-devnet/blob/b7388321471e504a04c831dbc175d5a569b76f0c/starknet_devnet/devnet_config.py#L214 - childProcess.stdout.setEncoding('utf-8') - let initialOutput = '' - childProcess.stdout.on('data', (chunk) => { - initialOutput += chunk - // Wait for the 1st account to be printed out. The 'Listening on ...' line doesn't seem to be output when started without a tty. - if (initialOutput.indexOf('Account #0') >= 0) { - console.log('Started starknet-devnet') - childProcess.stdout.removeAllListeners('data') - resolve(childProcess) - } - }) - }) - } - - protected cleanup(): void { - this.childProcess?.kill() - } -} - -export const startNetwork = async (opts?: {}): Promise => { - const devnet = new VenvDevnet('5050', opts) - - await devnet.start() - - // Starting to poll devnet too soon can result in ENOENT - await new Promise((f) => setTimeout(f, 2000)) - - return devnet -} diff --git a/packages-ts/starknet/src/account.ts b/packages-ts/starknet/src/account.ts index e0d34c4b0..5da60b364 100644 --- a/packages-ts/starknet/src/account.ts +++ b/packages-ts/starknet/src/account.ts @@ -1,4 +1,4 @@ -import { Account, SequencerProvider, ec, uint256 } from 'starknet' +import { Account, RpcProvider, ec, uint256, constants } from 'starknet' export const ERC20_ADDRESS = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7' @@ -72,8 +72,8 @@ class DevnetFundingStrategy implements IFundingStrategy { // Fund the Account on Testnet class AllowanceFundingStrategy implements IFundingStrategy { public async fund(accounts: FundAccounts[], opts: FunderOptions) { - const provider = new SequencerProvider({ - baseUrl: 'https://alpha4.starknet.io', + const provider = new RpcProvider({ + nodeUrl: constants.NetworkName.SN_GOERLI, }) const operator = new Account(provider, opts.accountAddr, opts.keyPair) diff --git a/packages-ts/starknet/test/fundAccount.test.ts b/packages-ts/starknet/test/fundAccount.test.ts index 075559d59..b9aff5eb0 100644 --- a/packages-ts/starknet/test/fundAccount.test.ts +++ b/packages-ts/starknet/test/fundAccount.test.ts @@ -1,20 +1,20 @@ import { assert } from 'chai' import { account } from '@chainlink/starknet' -import { Account, ec, SequencerProvider, stark } from 'starknet' +import { Account, ec, RpcProvider, stark } from 'starknet' import { DEVNET_URL, ERC20_ADDRESS } from '../src/account' describe('fundAccount', function () { this.timeout(900_000) let alice: Account let bob: Account - let provider: SequencerProvider + let provider: RpcProvider const opts = account.makeFunderOptsFromEnv() const funder = new account.Funder(opts) before(async function () { const gateway_url = process.env.NODE_URL || DEVNET_URL - provider = new SequencerProvider({ baseUrl: gateway_url }) + provider = new RpcProvider({ nodeUrl: gateway_url }) const aliceStarkKeyPair = ec.starkCurve.utils.randomPrivateKey() const bobStarkKeyPair = ec.starkCurve.utils.randomPrivateKey() @@ -37,7 +37,7 @@ describe('fundAccount', function () { entrypoint: 'balanceOf', calldata: [BigInt(alice.address).toString(10)], }) - assert.deepEqual(balance.result, ['0x1388', '0x0']) + assert.deepEqual(balance, ['0x1388', '0x0']) }) it('should have fund bob', async () => { @@ -46,7 +46,7 @@ describe('fundAccount', function () { entrypoint: 'balanceOf', calldata: [BigInt(bob.address).toString(10)], }) - assert.deepEqual(balance.result, ['0x1f40', '0x0']) + assert.deepEqual(balance, ['0x1f40', '0x0']) }) it("should increament alice's fees", async () => { @@ -57,7 +57,7 @@ describe('fundAccount', function () { entrypoint: 'balanceOf', calldata: [BigInt(alice.address).toString(10)], }) - assert.deepEqual(balance.result, ['0x13ec', '0x0']) + assert.deepEqual(balance, ['0x13ec', '0x0']) }) it("should increament bob's fees", async () => { @@ -68,6 +68,6 @@ describe('fundAccount', function () { entrypoint: 'balanceOf', calldata: [BigInt(bob.address).toString(10)], }) - assert.deepEqual(balance.result, ['0x2328', '0x0']) + assert.deepEqual(balance, ['0x2328', '0x0']) }) }) diff --git a/relayer/go.mod b/relayer/go.mod index 32f8f8f73..f4bacb166 100644 --- a/relayer/go.mod +++ b/relayer/go.mod @@ -5,11 +5,12 @@ go 1.21.3 toolchain go1.21.5 require ( + github.com/NethermindEth/juno v0.3.1 + github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 github.com/ethereum/go-ethereum v1.13.8 github.com/hashicorp/go-plugin v1.5.2 github.com/pelletier/go-toml/v2 v2.1.1 github.com/pkg/errors v0.9.1 - github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 github.com/stretchr/testify v1.8.4 @@ -44,7 +45,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.4.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect @@ -76,6 +76,7 @@ require ( github.com/stretchr/objx v0.5.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/test-go/testify v1.1.4 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/x448/float16 v0.8.4 // indirect diff --git a/relayer/go.sum b/relayer/go.sum index 926ece6c1..bd27029d2 100644 --- a/relayer/go.sum +++ b/relayer/go.sum @@ -42,6 +42,10 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY= +github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -153,6 +157,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -183,12 +189,9 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -323,8 +326,6 @@ github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKl github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= -github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 h1:Yk0RK9WV59ISOZZMsdtxZBAKaBfdgb05oXyca/qSqcw= github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4/go.mod h1:pRlQrvcizMmuHAUV4N96oO2e3XbA99JCQELLc6ES160= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= @@ -333,6 +334,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJ github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 h1:3y9WsXkZ5lxFrmfH7DQHs/q308lylKId5l/3VC0QAdM= github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -351,6 +354,8 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= +github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= diff --git a/relayer/pkg/chainlink/ocr2/client.go b/relayer/pkg/chainlink/ocr2/client.go index 6a385c3cf..abcc6c112 100644 --- a/relayer/pkg/chainlink/ocr2/client.go +++ b/relayer/pkg/chainlink/ocr2/client.go @@ -8,8 +8,9 @@ import ( "github.com/pkg/errors" - caigorpc "github.com/smartcontractkit/caigo/rpcv02" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetrpc "github.com/NethermindEth/starknet.go/rpc" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" @@ -20,13 +21,13 @@ import ( //go:generate mockery --name OCR2Reader --output ./mocks/ type OCR2Reader interface { - LatestConfigDetails(context.Context, caigotypes.Felt) (ContractConfigDetails, error) - LatestTransmissionDetails(context.Context, caigotypes.Felt) (TransmissionDetails, error) - LatestRoundData(context.Context, caigotypes.Felt) (RoundData, error) - LinkAvailableForPayment(context.Context, caigotypes.Felt) (*big.Int, error) - ConfigFromEventAt(context.Context, caigotypes.Felt, uint64) (ContractConfig, error) - NewTransmissionsFromEventsAt(context.Context, caigotypes.Felt, uint64) ([]NewTransmissionEvent, error) - BillingDetails(context.Context, caigotypes.Felt) (BillingDetails, error) + LatestConfigDetails(context.Context, *felt.Felt) (ContractConfigDetails, error) + LatestTransmissionDetails(context.Context, *felt.Felt) (TransmissionDetails, error) + LatestRoundData(context.Context, *felt.Felt) (RoundData, error) + LinkAvailableForPayment(context.Context, *felt.Felt) (*big.Int, error) + ConfigFromEventAt(context.Context, *felt.Felt, uint64) (ContractConfig, error) + NewTransmissionsFromEventsAt(context.Context, *felt.Felt, uint64) ([]NewTransmissionEvent, error) + BillingDetails(context.Context, *felt.Felt) (BillingDetails, error) BaseReader() starknet.Reader } @@ -49,10 +50,10 @@ func (c *Client) BaseReader() starknet.Reader { return c.r } -func (c *Client) BillingDetails(ctx context.Context, address caigotypes.Felt) (bd BillingDetails, err error) { +func (c *Client) BillingDetails(ctx context.Context, address *felt.Felt) (bd BillingDetails, err error) { ops := starknet.CallOps{ ContractAddress: address, - Selector: "billing", + Selector: starknetutils.GetSelectorFromNameFelt("billing"), } res, err := c.r.CallContract(ctx, ops) @@ -65,8 +66,8 @@ func (c *Client) BillingDetails(ctx context.Context, address caigotypes.Felt) (b return bd, errors.New("unexpected result length") } - observationPayment := caigotypes.StrToFelt(res[0]).Big() - transmissionPayment := caigotypes.StrToFelt(res[1]).Big() + observationPayment := res[0].BigInt(big.NewInt(0)) + transmissionPayment := res[1].BigInt(big.NewInt(0)) bd, err = NewBillingDetails(observationPayment, transmissionPayment) if err != nil { @@ -76,10 +77,10 @@ func (c *Client) BillingDetails(ctx context.Context, address caigotypes.Felt) (b return } -func (c *Client) LatestConfigDetails(ctx context.Context, address caigotypes.Felt) (ccd ContractConfigDetails, err error) { +func (c *Client) LatestConfigDetails(ctx context.Context, address *felt.Felt) (ccd ContractConfigDetails, err error) { ops := starknet.CallOps{ ContractAddress: address, - Selector: "latest_config_details", + Selector: starknetutils.GetSelectorFromNameFelt("latest_config_details"), } res, err := c.r.CallContract(ctx, ops) @@ -92,10 +93,10 @@ func (c *Client) LatestConfigDetails(ctx context.Context, address caigotypes.Fel return ccd, errors.New("unexpected result length") } - blockNum := caigotypes.StrToFelt(res[1]) - configDigest := caigotypes.StrToFelt(res[2]) + blockNum := res[1] + configDigest := res[2] - ccd, err = NewContractConfigDetails(blockNum.Big(), configDigest.Bytes()) + ccd, err = NewContractConfigDetails(blockNum.BigInt(big.NewInt((0))), configDigest.Bytes()) if err != nil { return ccd, errors.Wrap(err, "couldn't initialize config details") } @@ -103,10 +104,10 @@ func (c *Client) LatestConfigDetails(ctx context.Context, address caigotypes.Fel return } -func (c *Client) LatestTransmissionDetails(ctx context.Context, address caigotypes.Felt) (td TransmissionDetails, err error) { +func (c *Client) LatestTransmissionDetails(ctx context.Context, address *felt.Felt) (td TransmissionDetails, err error) { ops := starknet.CallOps{ ContractAddress: address, - Selector: "latest_transmission_details", + Selector: starknetutils.GetSelectorFromNameFelt("latest_transmission_details"), } res, err := c.r.CallContract(ctx, ops) @@ -119,20 +120,20 @@ func (c *Client) LatestTransmissionDetails(ctx context.Context, address caigotyp return td, errors.New("unexpected result length") } - digest := caigotypes.StrToFelt(res[0]) + digest := res[0] configDigest := types.ConfigDigest{} - digest.Big().FillBytes(configDigest[:]) + digest.BigInt(big.NewInt(0)).FillBytes(configDigest[:]) - epoch, round := parseEpochAndRound(caigotypes.StrToFelt(res[1]).Big()) + epoch, round := parseEpochAndRound(res[1].BigInt(big.NewInt(0))) - latestAnswer, err := starknet.HexToUnsignedBig(res[2]) + latestAnswer := res[2].BigInt(big.NewInt(0)) if err != nil { return td, errors.Wrap(err, "latestAnswer invalid") } - timestampFelt := caigotypes.StrToFelt(res[3]) + timestampFelt := res[3] // TODO: Int64() can return invalid data if int is too big - unixTime := timestampFelt.Big().Int64() + unixTime := timestampFelt.BigInt(big.NewInt(0)).Int64() latestTimestamp := time.Unix(unixTime, 0) td = TransmissionDetails{ @@ -146,20 +147,16 @@ func (c *Client) LatestTransmissionDetails(ctx context.Context, address caigotyp return td, nil } -func (c *Client) LatestRoundData(ctx context.Context, address caigotypes.Felt) (round RoundData, err error) { +func (c *Client) LatestRoundData(ctx context.Context, address *felt.Felt) (round RoundData, err error) { ops := starknet.CallOps{ ContractAddress: address, - Selector: "latest_round_data", + Selector: starknetutils.GetSelectorFromNameFelt("latest_round_data"), } - results, err := c.r.CallContract(ctx, ops) + felts, err := c.r.CallContract(ctx, ops) if err != nil { return round, errors.Wrap(err, "couldn't call the contract with selector latest_round_data") } - felts := []caigotypes.Felt{} - for _, result := range results { - felts = append(felts, caigotypes.StrToFelt(result)) - } round, err = NewRoundData(felts) if err != nil { @@ -168,10 +165,10 @@ func (c *Client) LatestRoundData(ctx context.Context, address caigotypes.Felt) ( return round, nil } -func (c *Client) LinkAvailableForPayment(ctx context.Context, address caigotypes.Felt) (*big.Int, error) { +func (c *Client) LinkAvailableForPayment(ctx context.Context, address *felt.Felt) (*big.Int, error) { results, err := c.r.CallContract(ctx, starknet.CallOps{ ContractAddress: address, - Selector: "link_available_for_payment", + Selector: starknetutils.GetSelectorFromNameFelt("link_available_for_payment"), }) if err != nil { return nil, errors.Wrap(err, "failed to call the contract with selector 'link_available_for_payment'") @@ -179,24 +176,24 @@ func (c *Client) LinkAvailableForPayment(ctx context.Context, address caigotypes if len(results) != 1 { return nil, errors.Wrap(err, "insufficient data from selector 'link_available_for_payment'") } - return caigotypes.HexToBN(results[0]), nil + return results[0].BigInt(big.NewInt(0)), nil } -func (c *Client) fetchEventsFromBlock(ctx context.Context, address caigotypes.Felt, eventType string, blockNum uint64) (eventsAsFeltArrs [][]caigotypes.Felt, err error) { - block := caigorpc.WithBlockNumber(blockNum) +func (c *Client) fetchEventsFromBlock(ctx context.Context, address *felt.Felt, eventType string, blockNum uint64) (eventsAsFeltArrs [][]*felt.Felt, err error) { + block := starknetrpc.WithBlockNumber(blockNum) - eventKey := caigotypes.BigToHex(caigotypes.GetSelectorFromName(eventType)) + eventKey := starknetutils.GetSelectorFromNameFelt(eventType) - input := caigorpc.EventsInput{ - EventFilter: caigorpc.EventFilter{ + input := starknetrpc.EventsInput{ + EventFilter: starknetrpc.EventFilter{ FromBlock: block, ToBlock: block, Address: address, - Keys: [][]string{{eventKey}}, // skip other event types + Keys: [][]*felt.Felt{{eventKey}}, // skip other event types // PageSize: 0, // PageNumber: 0, }, - ResultPageRequest: caigorpc.ResultPageRequest{ + ResultPageRequest: starknetrpc.ResultPageRequest{ // ContinuationToken: , ChunkSize: 10, }, @@ -210,12 +207,7 @@ func (c *Client) fetchEventsFromBlock(ctx context.Context, address caigotypes.Fe } for _, event := range events.Events { - // convert to felts - felts := []caigotypes.Felt{} - for _, felt := range event.Data { - felts = append(felts, caigotypes.StrToFelt(felt)) - } - eventsAsFeltArrs = append(eventsAsFeltArrs, felts) + eventsAsFeltArrs = append(eventsAsFeltArrs, event.Data) } if len(eventsAsFeltArrs) == 0 { return nil, errors.New("events not found in the block") @@ -223,7 +215,7 @@ func (c *Client) fetchEventsFromBlock(ctx context.Context, address caigotypes.Fe return eventsAsFeltArrs, nil } -func (c *Client) ConfigFromEventAt(ctx context.Context, address caigotypes.Felt, blockNum uint64) (cc ContractConfig, err error) { +func (c *Client) ConfigFromEventAt(ctx context.Context, address *felt.Felt, blockNum uint64) (cc ContractConfig, err error) { eventsAsFeltArrs, err := c.fetchEventsFromBlock(ctx, address, "ConfigSet", blockNum) if err != nil { return cc, errors.Wrap(err, "failed to fetch config_set events") @@ -243,7 +235,7 @@ func (c *Client) ConfigFromEventAt(ctx context.Context, address caigotypes.Felt, } // NewTransmissionsFromEventsAt finds events of type new_transmission emitted by the contract address in a given block number. -func (c *Client) NewTransmissionsFromEventsAt(ctx context.Context, address caigotypes.Felt, blockNum uint64) (events []NewTransmissionEvent, err error) { +func (c *Client) NewTransmissionsFromEventsAt(ctx context.Context, address *felt.Felt, blockNum uint64) (events []NewTransmissionEvent, err error) { eventsAsFeltArrs, err := c.fetchEventsFromBlock(ctx, address, "NewTransmission", blockNum) if err != nil { return nil, errors.Wrap(err, "failed to fetch new_transmission events") diff --git a/relayer/pkg/chainlink/ocr2/client_test.go b/relayer/pkg/chainlink/ocr2/client_test.go index 9ee04384d..436fd8bc3 100644 --- a/relayer/pkg/chainlink/ocr2/client_test.go +++ b/relayer/pkg/chainlink/ocr2/client_test.go @@ -11,8 +11,7 @@ import ( "testing" "time" - "github.com/smartcontractkit/caigo/gateway" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,7 +24,7 @@ const BLOCK_OUTPUT = `{"result": {"events": [ {"from_address": "0xd43963a4e875a3 const ocr2ContractAddress = "0xd43963a4e875a361f5d164b2e70953598eb4f45fde86924082d51b4d78e489" // matches BLOCK_OUTPUT event func TestOCR2Client(t *testing.T) { - chainID := gateway.GOERLI_ID + chainID := "SN_GOERLI" lggr := logger.Test(t) mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -56,24 +55,25 @@ func TestOCR2Client(t *testing.T) { err := json.Unmarshal([]byte(raw), &reqdata) require.NoError(t, err) - switch { - case caigotypes.BigToHex(caigotypes.GetSelectorFromName("billing")) == reqdata.Selector: + fmt.Printf("%v %v\n", reqdata.Selector, starknetutils.GetSelectorFromNameFelt("latest_transmission_details").String()) + switch reqdata.Selector { + case starknetutils.GetSelectorFromNameFelt("billing").String(): // billing response out = []byte(`{"result":["0x0","0x0","0x0","0x0"]}`) - case caigotypes.BigToHex(caigotypes.GetSelectorFromName("latest_config_details")) == reqdata.Selector: + case starknetutils.GetSelectorFromNameFelt("latest_config_details").String(): // latest config details response out = []byte(`{"result":["0x1","0x2","0x4b791b801cf0d7b6a2f9e59daf15ec2dd7d9cdc3bc5e037bada9c86e4821c"]}`) - case caigotypes.BigToHex(caigotypes.GetSelectorFromName("latest_transmission_details")) == reqdata.Selector: + case starknetutils.GetSelectorFromNameFelt("latest_transmission_details").String(): // latest transmission details response out = []byte(`{"result":["0x4cfc96325fa7d72e4854420e2d7b0abda72de17d45e4c3c0d9f626016d669","0x0","0x0","0x0"]}`) - case caigotypes.BigToHex(caigotypes.GetSelectorFromName("latest_round_data")) == reqdata.Selector: + case starknetutils.GetSelectorFromNameFelt("latest_round_data").String(): // latest transmission details response out = []byte(`{"result":["0x0","0x0","0x0","0x0","0x0"]}`) - case caigotypes.BigToHex(caigotypes.GetSelectorFromName("link_available_for_payment")) == reqdata.Selector: + case starknetutils.GetSelectorFromNameFelt("link_available_for_payment").String(): // latest transmission details response out = []byte(`{"result":["0x0"]}`) default: - require.False(t, true, "unsupported contract method") + require.False(t, true, "unsupported contract method %s", reqdata.Selector) } case "starknet_getEvents": out = []byte(BLOCK_OUTPUT) @@ -98,7 +98,8 @@ func TestOCR2Client(t *testing.T) { client, err := NewClient(reader, lggr) assert.NoError(t, err) - contractAddress := caigotypes.StrToFelt(ocr2ContractAddress) + contractAddress, err := starknetutils.HexToFelt(ocr2ContractAddress) + require.NoError(t, err) t.Run("get billing details", func(t *testing.T) { billing, err := client.BillingDetails(context.Background(), contractAddress) diff --git a/relayer/pkg/chainlink/ocr2/config_digester.go b/relayer/pkg/chainlink/ocr2/config_digester.go index f61f22c93..113a1e84e 100644 --- a/relayer/pkg/chainlink/ocr2/config_digester.go +++ b/relayer/pkg/chainlink/ocr2/config_digester.go @@ -6,7 +6,7 @@ import ( "math/big" "strings" - "github.com/smartcontractkit/caigo" + "github.com/NethermindEth/starknet.go/curve" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -90,7 +90,7 @@ func (d offchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.Co ) msg = append(msg, offchainConfig...) // offchain_config - digest, err := caigo.Curve.ComputeHashOnElements(msg) + digest, err := curve.Curve.ComputeHashOnElements(msg) if err != nil { return configDigest, err } diff --git a/relayer/pkg/chainlink/ocr2/contract_reader.go b/relayer/pkg/chainlink/ocr2/contract_reader.go index 7f53a8411..31e4a29ea 100644 --- a/relayer/pkg/chainlink/ocr2/contract_reader.go +++ b/relayer/pkg/chainlink/ocr2/contract_reader.go @@ -5,8 +5,9 @@ import ( "math/big" "time" + starknetutils "github.com/NethermindEth/starknet.go/utils" + "github.com/NethermindEth/juno/core/felt" "github.com/pkg/errors" - caigotypes "github.com/smartcontractkit/caigo/types" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -22,14 +23,19 @@ type Reader interface { var _ Reader = (*contractReader)(nil) type contractReader struct { - address caigotypes.Felt + address *felt.Felt reader OCR2Reader lggr logger.Logger } func NewContractReader(address string, reader OCR2Reader, lggr logger.Logger) Reader { + felt, err := starknetutils.HexToFelt(address) + if err != nil { + panic("invalid felt value") + } + return &contractReader{ - address: caigotypes.StrToFelt(address), // TODO: propagate type everywhere + address: felt, // TODO: propagate type everywhere reader: reader, lggr: lggr, } diff --git a/relayer/pkg/chainlink/ocr2/contract_transmitter.go b/relayer/pkg/chainlink/ocr2/contract_transmitter.go index 88c50d96a..d05da007b 100644 --- a/relayer/pkg/chainlink/ocr2/contract_transmitter.go +++ b/relayer/pkg/chainlink/ocr2/contract_transmitter.go @@ -7,7 +7,9 @@ import ( "github.com/pkg/errors" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetrpc "github.com/NethermindEth/starknet.go/rpc" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/ocr2/medianreport" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/txm" @@ -20,9 +22,9 @@ var _ types.ContractTransmitter = (*contractTransmitter)(nil) type contractTransmitter struct { reader *transmissionsCache - contractAddress caigotypes.Felt - senderAddress caigotypes.Felt - accountAddress caigotypes.Felt + contractAddress *felt.Felt + senderAddress *felt.Felt // account.publicKey + accountAddress *felt.Felt txm txm.TxManager } @@ -34,11 +36,15 @@ func NewContractTransmitter( accountAddress string, txm txm.TxManager, ) *contractTransmitter { + contractAddr, _ := starknetutils.HexToFelt(contractAddress) + senderAddr, _ := starknetutils.HexToFelt(senderAddress) + accountAddr, _ := starknetutils.HexToFelt(accountAddress) + return &contractTransmitter{ reader: reader, - contractAddress: caigotypes.StrToFelt(contractAddress), - senderAddress: caigotypes.StrToFelt(senderAddress), - accountAddress: caigotypes.StrToFelt(accountAddress), + contractAddress: contractAddr, + senderAddress: senderAddr, + accountAddress: accountAddr, txm: txm, } } @@ -84,10 +90,16 @@ func (c *contractTransmitter) Transmit( transmitPayload = append(transmitPayload, "0x"+hex.EncodeToString(signature[:32])) // public key } - err = c.txm.Enqueue(c.senderAddress, c.accountAddress, caigotypes.FunctionCall{ + // TODO: build felts directly rather than afterwards + calldata, err := starknetutils.HexArrToFelt(transmitPayload) + if err != nil { + return err + } + + err = c.txm.Enqueue(c.accountAddress, c.senderAddress, starknetrpc.FunctionCall{ ContractAddress: c.contractAddress, - EntryPointSelector: "transmit", - Calldata: transmitPayload, + EntryPointSelector: starknetutils.GetSelectorFromNameFelt("transmit"), + Calldata: calldata, }) return err diff --git a/relayer/pkg/chainlink/ocr2/events.go b/relayer/pkg/chainlink/ocr2/events.go index 1be0c6660..01bf67c84 100644 --- a/relayer/pkg/chainlink/ocr2/events.go +++ b/relayer/pkg/chainlink/ocr2/events.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -26,7 +26,7 @@ var ( type NewTransmissionEvent struct { RoundId uint32 LatestAnswer *big.Int - Transmitter caigotypes.Felt + Transmitter *felt.Felt LatestTimestamp time.Time Observers []uint8 ObservationsLen uint32 @@ -40,7 +40,7 @@ type NewTransmissionEvent struct { } // ParseNewTransmissionEvent is decoding binary felt data as the NewTransmissionEvent type -func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEvent, error) { +func ParseNewTransmissionEvent(eventData []*felt.Felt) (NewTransmissionEvent, error) { { const observationsLenIndex = 5 const constNumOfElements = 11 @@ -49,7 +49,7 @@ func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEven return NewTransmissionEvent{}, errors.New("invalid: event data") } - observationsLen := eventData[observationsLenIndex].Big().Uint64() + observationsLen := eventData[observationsLenIndex].BigInt(big.NewInt(0)).Uint64() if len(eventData) != constNumOfElements+int(observationsLen) { return NewTransmissionEvent{}, errors.New("invalid: event data") } @@ -57,14 +57,11 @@ func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEven // round_id index := 0 - roundId := uint32(eventData[index].Big().Uint64()) + roundId := uint32(eventData[index].BigInt(big.NewInt(0)).Uint64()) // answer index++ - latestAnswer, err := starknet.HexToUnsignedBig(eventData[index].String()) - if err != nil { - return NewTransmissionEvent{}, errors.Wrap(err, "latestAnswer invalid") - } + latestAnswer := eventData[index].BigInt(big.NewInt(0)) // transmitter index++ @@ -72,16 +69,16 @@ func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEven // observation_timestamp index++ - unixTime := eventData[index].Big().Int64() + unixTime := eventData[index].BigInt(big.NewInt(0)).Int64() latestTimestamp := time.Unix(unixTime, 0) // observers (raw) max 31 index++ - observersRaw := starknet.PadBytes(eventData[index].Big().Bytes(), MaxObservers) + observersRaw := starknet.PadBytes(eventData[index].BigInt(big.NewInt(0)).Bytes(), MaxObservers) // observation_len index++ - observationsLen := uint32(eventData[index].Big().Uint64()) + observationsLen := uint32(eventData[index].BigInt(big.NewInt(0)).Uint64()) // observers (based on observationsLen) var observers []uint8 @@ -92,31 +89,28 @@ func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEven // observations (based on observationsLen) var observations []*big.Int for i := 0; i < int(observationsLen); i++ { - observations = append(observations, eventData[index+i+1].Big()) + observations = append(observations, eventData[index+i+1].BigInt(big.NewInt(0))) } // juels_per_fee_coin index += int(observationsLen) + 1 - juelsPerFeeCoin := eventData[index].Big() + juelsPerFeeCoin := eventData[index].BigInt(big.NewInt(0)) // juels_per_fee_coin index++ - gasPrice := eventData[index].Big() + gasPrice := eventData[index].BigInt(big.NewInt(0)) // config digest index++ - digest, err := types.BytesToConfigDigest(starknet.PadBytes(eventData[index].Bytes(), len(types.ConfigDigest{}))) - if err != nil { - return NewTransmissionEvent{}, errors.Wrap(err, "couldn't convert bytes to ConfigDigest") - } + digest := eventData[index].Bytes() // epoch_and_round index++ - epoch, round := parseEpochAndRound(eventData[index].Big()) + epoch, round := parseEpochAndRound(eventData[index].BigInt(big.NewInt(0))) // reimbursement index++ - reimbursement := eventData[index].Big() + reimbursement := eventData[index].BigInt(big.NewInt(0)) return NewTransmissionEvent{ RoundId: roundId, @@ -136,28 +130,28 @@ func ParseNewTransmissionEvent(eventData []caigotypes.Felt) (NewTransmissionEven } // ParseConfigSetEvent is decoding binary felt data as the libocr ContractConfig type -func ParseConfigSetEvent(eventData []caigotypes.Felt) (types.ContractConfig, error) { +func ParseConfigSetEvent(eventData []*felt.Felt) (types.ContractConfig, error) { { const oraclesLenIdx = 3 if len(eventData) < oraclesLenIdx { return types.ContractConfig{}, errors.New("invalid: event data") } - oraclesLen := eventData[oraclesLenIdx].Big().Uint64() + oraclesLen := eventData[oraclesLenIdx].BigInt(big.NewInt(0)).Uint64() onchainConfigLenIdx := oraclesLenIdx + 2*oraclesLen + 2 if uint64(len(eventData)) < onchainConfigLenIdx { return types.ContractConfig{}, errors.New("invalid: event data") } - onchainConfigLen := eventData[onchainConfigLenIdx].Big().Uint64() + onchainConfigLen := eventData[onchainConfigLenIdx].BigInt(big.NewInt(0)).Uint64() offchainConfigLenIdx := onchainConfigLenIdx + onchainConfigLen + 2 if uint64(len(eventData)) < offchainConfigLenIdx { return types.ContractConfig{}, errors.New("invalid: event data") } - offchainConfigLen := eventData[offchainConfigLenIdx].Big().Uint64() + offchainConfigLen := eventData[offchainConfigLenIdx].BigInt(big.NewInt(0)).Uint64() if uint64(len(eventData)) != offchainConfigLenIdx+offchainConfigLen+1 { return types.ContractConfig{}, errors.New("invalid: event data") } @@ -168,18 +162,15 @@ func ParseConfigSetEvent(eventData []caigotypes.Felt) (types.ContractConfig, err // latest_config_digest index++ - digest, err := types.BytesToConfigDigest(starknet.PadBytes(eventData[index].Bytes(), len(types.ConfigDigest{}))) - if err != nil { - return types.ContractConfig{}, errors.Wrap(err, "couldn't convert bytes to ConfigDigest") - } + digest := eventData[index].Bytes() // config_count index++ - configCount := eventData[index].Big().Uint64() + configCount := eventData[index].BigInt(big.NewInt(0)).Uint64() // oracles_len index++ - oraclesLen := eventData[index].Big().Uint64() + oraclesLen := eventData[index].BigInt(big.NewInt(0)).Uint64() // oracles index++ @@ -188,7 +179,8 @@ func ParseConfigSetEvent(eventData []caigotypes.Felt) (types.ContractConfig, err var transmitters []types.Account for i, member := range oracleMembers { if i%2 == 0 { - signers = append(signers, starknet.PadBytes(member.Bytes(), 32)) // pad to 32 bytes + b := member.Bytes() + signers = append(signers, b[:]) // pad to 32 bytes } else { transmitters = append(transmitters, types.Account(member.String())) } @@ -196,19 +188,19 @@ func ParseConfigSetEvent(eventData []caigotypes.Felt) (types.ContractConfig, err // f index = index + int(oraclesLen)*2 - f := eventData[index].Big().Uint64() + f := eventData[index].BigInt(big.NewInt(0)).Uint64() // onchain_config length index++ - onchainConfigLen := eventData[index].Big().Uint64() + onchainConfigLen := eventData[index].BigInt(big.NewInt(0)).Uint64() // onchain_config (version=1, min, max) index++ onchainConfigFelts := eventData[index:(index + int(onchainConfigLen))] onchainConfig, err := medianreport.OnchainConfigCodec{}.EncodeFromFelt( - onchainConfigFelts[0].Big(), - onchainConfigFelts[1].Big(), - onchainConfigFelts[2].Big(), + onchainConfigFelts[0].BigInt(big.NewInt(0)), + onchainConfigFelts[1].BigInt(big.NewInt(0)), + onchainConfigFelts[2].BigInt(big.NewInt(0)), ) if err != nil { return types.ContractConfig{}, errors.Wrap(err, "err in encoding onchain config from felts") @@ -216,11 +208,11 @@ func ParseConfigSetEvent(eventData []caigotypes.Felt) (types.ContractConfig, err // offchain_config_version index += int(onchainConfigLen) - offchainConfigVersion := eventData[index].Big().Uint64() + offchainConfigVersion := eventData[index].BigInt(big.NewInt(0)).Uint64() // offchain_config_len index++ - offchainConfigLen := eventData[index].Big().Uint64() + offchainConfigLen := eventData[index].BigInt(big.NewInt(0)).Uint64() // offchain_config index++ diff --git a/relayer/pkg/chainlink/ocr2/events_test.go b/relayer/pkg/chainlink/ocr2/events_test.go index 52f53590f..e0f74fe90 100644 --- a/relayer/pkg/chainlink/ocr2/events_test.go +++ b/relayer/pkg/chainlink/ocr2/events_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -61,7 +61,7 @@ var ( ) func TestNewTransmissionEvent_Parse(t *testing.T) { - eventData, err := starknet.StringsToFelt(newTransmissionEventRaw) + eventData, err := starknetutils.HexArrToFelt(newTransmissionEventRaw) assert.NoError(t, err) require.Equal(t, len(newTransmissionEventRaw), len(eventData)) @@ -81,7 +81,8 @@ func TestNewTransmissionEvent_Parse(t *testing.T) { transmitterHex := "0x2c0dd77ce74b1667dc6fa782bbafaef5becbe2d04b052726ab236daeb52ac5d" require.Equal(t, len(transmitterHex), int(2+31.5*2)) // len('0x') + len(max_felt_len) - expectedTransmitter := caigotypes.StrToFelt(transmitterHex) + expectedTransmitter, err := starknetutils.HexToFelt(transmitterHex) + require.NoError(t, err) require.Equal(t, e.Transmitter, expectedTransmitter) require.Equal(t, e.Observers, []uint8{0, 1, 2, 3}) @@ -94,7 +95,7 @@ func TestNewTransmissionEvent_Parse(t *testing.T) { } func TestConfigSetEvent_Parse(t *testing.T) { - eventData, err := starknet.StringsToFelt(configSetEventRaw) + eventData, err := starknetutils.HexArrToFelt(configSetEventRaw) assert.NoError(t, err) require.Equal(t, len(configSetEventRaw), len(eventData)) @@ -144,7 +145,7 @@ func TestNewTransmissionEventSelector(t *testing.T) { require.NoError(t, err) eventKey := new(big.Int) eventKey.SetBytes(bytes) - assert.Equal(t, caigotypes.GetSelectorFromName("NewTransmission").Cmp(eventKey), 0) + assert.Equal(t, starknetutils.GetSelectorFromName("NewTransmission").Cmp(eventKey), 0) } func TestConfigSetEventSelector(t *testing.T) { @@ -152,5 +153,5 @@ func TestConfigSetEventSelector(t *testing.T) { require.NoError(t, err) eventKey := new(big.Int) eventKey.SetBytes(bytes) - assert.Equal(t, caigotypes.GetSelectorFromName("ConfigSet").Cmp(eventKey), 0) + assert.Equal(t, starknetutils.GetSelectorFromName("ConfigSet").Cmp(eventKey), 0) } diff --git a/relayer/pkg/chainlink/ocr2/medianreport/onchainconfig.go b/relayer/pkg/chainlink/ocr2/medianreport/onchainconfig.go index 4ea4a9f67..1f86e0555 100644 --- a/relayer/pkg/chainlink/ocr2/medianreport/onchainconfig.go +++ b/relayer/pkg/chainlink/ocr2/medianreport/onchainconfig.go @@ -4,10 +4,6 @@ import ( "fmt" "math/big" - "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" - - caigotypes "github.com/smartcontractkit/caigo/types" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" ) @@ -52,17 +48,8 @@ func (codec OnchainConfigCodec) Decode(b []byte) (median.OnchainConfig, error) { return median.OnchainConfig{}, err } - // convert felts to big.Ints - - min, err := starknet.FeltToUnsignedBig(caigotypes.BigToFelt(felts[1])) - if err != nil { - return median.OnchainConfig{}, errors.Wrap(err, "min invalid") - } - - max, err := starknet.FeltToUnsignedBig(caigotypes.BigToFelt(felts[2])) - if err != nil { - return median.OnchainConfig{}, errors.Wrap(err, "max invalid") - } + min := felts[1] + max := felts[2] if !(min.Cmp(max) <= 0) { return median.OnchainConfig{}, fmt.Errorf("OnchainConfig min (%v) should not be greater than max(%v)", min, max) diff --git a/relayer/pkg/chainlink/ocr2/medianreport/report.go b/relayer/pkg/chainlink/ocr2/medianreport/report.go index 7049d8a6a..63686d3b4 100644 --- a/relayer/pkg/chainlink/ocr2/medianreport/report.go +++ b/relayer/pkg/chainlink/ocr2/medianreport/report.go @@ -8,8 +8,9 @@ import ( "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" + starknetutils "github.com/NethermindEth/starknet.go/utils" + "github.com/NethermindEth/juno/core/felt" "github.com/pkg/errors" - caigotypes "github.com/smartcontractkit/caigo/types" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -43,25 +44,25 @@ func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types // preserve original array oo = append([]median.ParsedAttributedObservation{}, oo...) - numFelt := caigotypes.BigToFelt(big.NewInt(int64(num))) + numFelt := starknetutils.BigIntToFelt(big.NewInt(int64(num))) // median timestamp sort.Slice(oo, func(i, j int) bool { return oo[i].Timestamp < oo[j].Timestamp }) timestamp := oo[num/2].Timestamp - timestampFelt := caigotypes.BigToFelt(big.NewInt(int64(timestamp))) + timestampFelt := starknetutils.BigIntToFelt(big.NewInt(int64(timestamp))) // median juelsPerFeeCoin sort.Slice(oo, func(i, j int) bool { return oo[i].JuelsPerFeeCoin.Cmp(oo[j].JuelsPerFeeCoin) < 0 }) juelsPerFeeCoin := oo[num/2].JuelsPerFeeCoin - juelsPerFeeCoinFelt := caigotypes.BigToFelt(juelsPerFeeCoin) + juelsPerFeeCoinFelt := starknetutils.BigIntToFelt(juelsPerFeeCoin) // TODO: source from observations gasPrice := big.NewInt(1) // := oo[num/2].GasPrice - gasPriceFelt := caigotypes.BigToFelt(gasPrice) + gasPriceFelt := starknetutils.BigIntToFelt(gasPrice) // sort by values sort.Slice(oo, func(i, j int) bool { @@ -69,21 +70,29 @@ func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types }) var observers = make([]byte, starknet.FeltLength) - var observations []caigotypes.Felt + var observations []*felt.Felt for i, o := range oo { observers[i] = byte(o.Observer) - observations = append(observations, caigotypes.BigToFelt(o.Value)) + + f := starknetutils.BigIntToFelt(o.Value) + observations = append(observations, f) } var report []byte - report = append(report, timestampFelt.Bytes()...) + + buf := timestampFelt.Bytes() + report = append(report, buf[:]...) report = append(report, observers...) - report = append(report, numFelt.Bytes()...) + buf = numFelt.Bytes() + report = append(report, buf[:]...) for _, o := range observations { - report = append(report, o.Bytes()...) + buf = o.Bytes() + report = append(report, buf[:]...) } - report = append(report, juelsPerFeeCoinFelt.Bytes()...) - report = append(report, gasPriceFelt.Bytes()...) + buf = juelsPerFeeCoinFelt.Bytes() + report = append(report, buf[:]...) + buf = gasPriceFelt.Bytes() + report = append(report, buf[:]...) return report, nil } @@ -95,7 +104,7 @@ func (c ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { } // Decode the number of observations - numBig := caigotypes.BytesToFelt(report[(timestampSizeBytes + observersSizeBytes):prefixSizeBytes]).Big() + numBig := new(felt.Felt).SetBytes(report[(timestampSizeBytes + observersSizeBytes):prefixSizeBytes]).BigInt(big.NewInt(0)) if !numBig.IsUint64() { return nil, errors.New("length of observations is invalid") } @@ -119,11 +128,8 @@ func (c ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { for i := 0; i < n; i++ { start := prefixSizeBytes + observationSizeBytes*i end := start + observationSizeBytes - obv := caigotypes.BytesToFelt(report[start:end]) - o, err := starknet.FeltToUnsignedBig(obv) - if err != nil { - return nil, errors.Wrap(err, "observation invalid") - } + obv := new(felt.Felt).SetBytes(report[start:end]) + o := obv.BigInt(big.NewInt(0)) oo = append(oo, o) } diff --git a/relayer/pkg/chainlink/ocr2/medianreport/report_test.go b/relayer/pkg/chainlink/ocr2/medianreport/report_test.go index c74355dd3..f86492926 100644 --- a/relayer/pkg/chainlink/ocr2/medianreport/report_test.go +++ b/relayer/pkg/chainlink/ocr2/medianreport/report_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - caigotypes "github.com/smartcontractkit/caigo/types" "github.com/smartcontractkit/libocr/commontypes" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" ) @@ -71,7 +70,7 @@ func TestBuildReport(t *testing.T) { assert.Equal(t, totalLen, len(report), "validate length") // validate timestamp - timestamp := caigotypes.BytesToFelt(report[0:timestampSizeBytes]).Big() + timestamp := new(big.Int).SetBytes(report[0:timestampSizeBytes]) assert.Equal(t, uint64(oo[0].Timestamp), timestamp.Uint64(), "validate timestamp") // validate observers @@ -80,7 +79,7 @@ func TestBuildReport(t *testing.T) { // validate observer count index += observersSizeBytes - count := caigotypes.BytesToFelt(report[index : index+observationsLenBytes]).Big() + count := new(big.Int).SetBytes(report[index : index+observationsLenBytes]) assert.Equal(t, uint8(n), uint8(count.Uint64()), "validate observer count") // validate observations diff --git a/relayer/pkg/chainlink/ocr2/mocks/OCR2Reader.go b/relayer/pkg/chainlink/ocr2/mocks/OCR2Reader.go index 3da7aa9ce..ea85761de 100644 --- a/relayer/pkg/chainlink/ocr2/mocks/OCR2Reader.go +++ b/relayer/pkg/chainlink/ocr2/mocks/OCR2Reader.go @@ -6,13 +6,13 @@ import ( context "context" big "math/big" + felt "github.com/NethermindEth/juno/core/felt" + mock "github.com/stretchr/testify/mock" ocr2 "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/ocr2" starknet "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" - - types "github.com/smartcontractkit/caigo/types" ) // OCR2Reader is an autogenerated mock type for the OCR2Reader type @@ -37,21 +37,21 @@ func (_m *OCR2Reader) BaseReader() starknet.Reader { } // BillingDetails provides a mock function with given fields: _a0, _a1 -func (_m *OCR2Reader) BillingDetails(_a0 context.Context, _a1 types.Felt) (ocr2.BillingDetails, error) { +func (_m *OCR2Reader) BillingDetails(_a0 context.Context, _a1 *felt.Felt) (ocr2.BillingDetails, error) { ret := _m.Called(_a0, _a1) var r0 ocr2.BillingDetails var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (ocr2.BillingDetails, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (ocr2.BillingDetails, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) ocr2.BillingDetails); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) ocr2.BillingDetails); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Get(0).(ocr2.BillingDetails) } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -61,21 +61,21 @@ func (_m *OCR2Reader) BillingDetails(_a0 context.Context, _a1 types.Felt) (ocr2. } // ConfigFromEventAt provides a mock function with given fields: _a0, _a1, _a2 -func (_m *OCR2Reader) ConfigFromEventAt(_a0 context.Context, _a1 types.Felt, _a2 uint64) (ocr2.ContractConfig, error) { +func (_m *OCR2Reader) ConfigFromEventAt(_a0 context.Context, _a1 *felt.Felt, _a2 uint64) (ocr2.ContractConfig, error) { ret := _m.Called(_a0, _a1, _a2) var r0 ocr2.ContractConfig var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt, uint64) (ocr2.ContractConfig, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt, uint64) (ocr2.ContractConfig, error)); ok { return rf(_a0, _a1, _a2) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt, uint64) ocr2.ContractConfig); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt, uint64) ocr2.ContractConfig); ok { r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Get(0).(ocr2.ContractConfig) } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt, uint64) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt, uint64) error); ok { r1 = rf(_a0, _a1, _a2) } else { r1 = ret.Error(1) @@ -85,21 +85,21 @@ func (_m *OCR2Reader) ConfigFromEventAt(_a0 context.Context, _a1 types.Felt, _a2 } // LatestConfigDetails provides a mock function with given fields: _a0, _a1 -func (_m *OCR2Reader) LatestConfigDetails(_a0 context.Context, _a1 types.Felt) (ocr2.ContractConfigDetails, error) { +func (_m *OCR2Reader) LatestConfigDetails(_a0 context.Context, _a1 *felt.Felt) (ocr2.ContractConfigDetails, error) { ret := _m.Called(_a0, _a1) var r0 ocr2.ContractConfigDetails var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (ocr2.ContractConfigDetails, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (ocr2.ContractConfigDetails, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) ocr2.ContractConfigDetails); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) ocr2.ContractConfigDetails); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Get(0).(ocr2.ContractConfigDetails) } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -109,21 +109,21 @@ func (_m *OCR2Reader) LatestConfigDetails(_a0 context.Context, _a1 types.Felt) ( } // LatestRoundData provides a mock function with given fields: _a0, _a1 -func (_m *OCR2Reader) LatestRoundData(_a0 context.Context, _a1 types.Felt) (ocr2.RoundData, error) { +func (_m *OCR2Reader) LatestRoundData(_a0 context.Context, _a1 *felt.Felt) (ocr2.RoundData, error) { ret := _m.Called(_a0, _a1) var r0 ocr2.RoundData var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (ocr2.RoundData, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (ocr2.RoundData, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) ocr2.RoundData); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) ocr2.RoundData); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Get(0).(ocr2.RoundData) } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -133,21 +133,21 @@ func (_m *OCR2Reader) LatestRoundData(_a0 context.Context, _a1 types.Felt) (ocr2 } // LatestTransmissionDetails provides a mock function with given fields: _a0, _a1 -func (_m *OCR2Reader) LatestTransmissionDetails(_a0 context.Context, _a1 types.Felt) (ocr2.TransmissionDetails, error) { +func (_m *OCR2Reader) LatestTransmissionDetails(_a0 context.Context, _a1 *felt.Felt) (ocr2.TransmissionDetails, error) { ret := _m.Called(_a0, _a1) var r0 ocr2.TransmissionDetails var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (ocr2.TransmissionDetails, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (ocr2.TransmissionDetails, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) ocr2.TransmissionDetails); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) ocr2.TransmissionDetails); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Get(0).(ocr2.TransmissionDetails) } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -157,15 +157,15 @@ func (_m *OCR2Reader) LatestTransmissionDetails(_a0 context.Context, _a1 types.F } // LinkAvailableForPayment provides a mock function with given fields: _a0, _a1 -func (_m *OCR2Reader) LinkAvailableForPayment(_a0 context.Context, _a1 types.Felt) (*big.Int, error) { +func (_m *OCR2Reader) LinkAvailableForPayment(_a0 context.Context, _a1 *felt.Felt) (*big.Int, error) { ret := _m.Called(_a0, _a1) var r0 *big.Int var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (*big.Int, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (*big.Int, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) *big.Int); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) *big.Int); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -173,7 +173,7 @@ func (_m *OCR2Reader) LinkAvailableForPayment(_a0 context.Context, _a1 types.Fel } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -183,15 +183,15 @@ func (_m *OCR2Reader) LinkAvailableForPayment(_a0 context.Context, _a1 types.Fel } // NewTransmissionsFromEventsAt provides a mock function with given fields: _a0, _a1, _a2 -func (_m *OCR2Reader) NewTransmissionsFromEventsAt(_a0 context.Context, _a1 types.Felt, _a2 uint64) ([]ocr2.NewTransmissionEvent, error) { +func (_m *OCR2Reader) NewTransmissionsFromEventsAt(_a0 context.Context, _a1 *felt.Felt, _a2 uint64) ([]ocr2.NewTransmissionEvent, error) { ret := _m.Called(_a0, _a1, _a2) var r0 []ocr2.NewTransmissionEvent var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt, uint64) ([]ocr2.NewTransmissionEvent, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt, uint64) ([]ocr2.NewTransmissionEvent, error)); ok { return rf(_a0, _a1, _a2) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt, uint64) []ocr2.NewTransmissionEvent); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt, uint64) []ocr2.NewTransmissionEvent); ok { r0 = rf(_a0, _a1, _a2) } else { if ret.Get(0) != nil { @@ -199,7 +199,7 @@ func (_m *OCR2Reader) NewTransmissionsFromEventsAt(_a0 context.Context, _a1 type } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt, uint64) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt, uint64) error); ok { r1 = rf(_a0, _a1, _a2) } else { r1 = ret.Error(1) diff --git a/relayer/pkg/chainlink/ocr2/types.go b/relayer/pkg/chainlink/ocr2/types.go index d81cf4f40..81b9b06e4 100644 --- a/relayer/pkg/chainlink/ocr2/types.go +++ b/relayer/pkg/chainlink/ocr2/types.go @@ -6,9 +6,7 @@ import ( "math/big" "time" - "github.com/pkg/errors" - - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "github.com/smartcontractkit/libocr/offchainreporting2/types" ) @@ -17,12 +15,7 @@ type ContractConfigDetails struct { Digest types.ConfigDigest } -func NewContractConfigDetails(blockNum *big.Int, digestBytes []byte) (ccd ContractConfigDetails, err error) { - digest, err := types.BytesToConfigDigest(digestBytes) - if err != nil { - return ccd, errors.Wrap(err, "couldn't decode config digest") - } - +func NewContractConfigDetails(blockNum *big.Int, digest [32]byte) (ccd ContractConfigDetails, err error) { return ContractConfigDetails{ Block: blockNum.Uint64(), Digest: digest, @@ -62,26 +55,27 @@ type RoundData struct { UpdatedAt time.Time } -func NewRoundData(felts []caigotypes.Felt) (data RoundData, err error) { +func NewRoundData(felts []*felt.Felt) (data RoundData, err error) { if len(felts) != 5 { return data, fmt.Errorf("expected number of felts to be 5 but got %d", len(felts)) } - if !felts[0].Big().IsUint64() && felts[0].Big().Uint64() > math.MaxUint32 { - return data, fmt.Errorf("aggregator round id does not fit in a uint32 '%s'", felts[0].Big()) + roundId := felts[0].BigInt(big.NewInt(0)) + if !roundId.IsUint64() && roundId.Uint64() > math.MaxUint32 { + return data, fmt.Errorf("aggregator round id does not fit in a uint32 '%s'", felts[0].String()) } - data.RoundID = uint32(felts[0].Big().Uint64()) - data.Answer = felts[1].Big() - blockNumber := felts[2].Big() + data.RoundID = uint32(roundId.Uint64()) + data.Answer = felts[1].BigInt(big.NewInt(0)) + blockNumber := felts[2].BigInt(big.NewInt(0)) if !blockNumber.IsUint64() { return data, fmt.Errorf("block number '%s' does not fit into uint64", blockNumber.String()) } data.BlockNumber = blockNumber.Uint64() - startedAt := felts[3].Big() + startedAt := felts[3].BigInt(big.NewInt(0)) if !startedAt.IsInt64() { return data, fmt.Errorf("startedAt '%s' does not fit into int64", startedAt.String()) } data.StartedAt = time.Unix(startedAt.Int64(), 0) - updatedAt := felts[4].Big() + updatedAt := felts[4].BigInt(big.NewInt(0)) if !updatedAt.IsInt64() { return data, fmt.Errorf("updatedAt '%s' does not fit into int64", startedAt.String()) } diff --git a/relayer/pkg/chainlink/ocr2/types_test.go b/relayer/pkg/chainlink/ocr2/types_test.go index 8d339f56c..3c30b9d1d 100644 --- a/relayer/pkg/chainlink/ocr2/types_test.go +++ b/relayer/pkg/chainlink/ocr2/types_test.go @@ -5,18 +5,10 @@ import ( "testing" "time" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/require" ) -func StringsToCaigoFelts(in []string) []caigotypes.Felt { - out := make([]caigotypes.Felt, len(in)) - for i := 0; i < len(in); i++ { - out[i] = caigotypes.StrToFelt(in[i]) - } - return out -} - func TestNewRoundData(t *testing.T) { raw := []string{ "0x121e", @@ -26,7 +18,8 @@ func TestNewRoundData(t *testing.T) { "0x633344a5", } - felts := StringsToCaigoFelts(raw) + felts, err := starknetutils.HexArrToFelt(raw) + require.NoError(t, err) actualRound, err := NewRoundData(felts) require.NoError(t, err) expectedRound := RoundData{ diff --git a/relayer/pkg/chainlink/txm/keystore.go b/relayer/pkg/chainlink/txm/keystore.go index 9f854cd6f..4d4741155 100644 --- a/relayer/pkg/chainlink/txm/keystore.go +++ b/relayer/pkg/chainlink/txm/keystore.go @@ -6,7 +6,7 @@ import ( "fmt" "math/big" - "github.com/smartcontractkit/caigo" + starknetaccount "github.com/NethermindEth/starknet.go/account" "github.com/smartcontractkit/chainlink-common/pkg/loop" adapters "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/starknet" @@ -15,7 +15,7 @@ import ( // KeystoreAdapter is a starknet-specific adaption layer to translate between the generic Loop Keystore (bytes) and // the type specific caigo Keystore (big.Int) type KeystoreAdapter interface { - caigo.Keystore + starknetaccount.Keystore Loopp() loop.Keystore } diff --git a/relayer/pkg/chainlink/txm/mocks/nonce_manager_client.go b/relayer/pkg/chainlink/txm/mocks/nonce_manager_client.go index 8e49300a0..e8358121c 100644 --- a/relayer/pkg/chainlink/txm/mocks/nonce_manager_client.go +++ b/relayer/pkg/chainlink/txm/mocks/nonce_manager_client.go @@ -4,11 +4,9 @@ package mocks import ( context "context" - big "math/big" + felt "github.com/NethermindEth/juno/core/felt" mock "github.com/stretchr/testify/mock" - - types "github.com/smartcontractkit/caigo/types" ) // NonceManagerClient is an autogenerated mock type for the NonceManagerClient type @@ -17,23 +15,23 @@ type NonceManagerClient struct { } // AccountNonce provides a mock function with given fields: _a0, _a1 -func (_m *NonceManagerClient) AccountNonce(_a0 context.Context, _a1 types.Felt) (*big.Int, error) { +func (_m *NonceManagerClient) AccountNonce(_a0 context.Context, _a1 *felt.Felt) (*felt.Felt, error) { ret := _m.Called(_a0, _a1) - var r0 *big.Int + var r0 *felt.Felt var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (*big.Int, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (*felt.Felt, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) *big.Int); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) *felt.Felt); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) + r0 = ret.Get(0).(*felt.Felt) } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) diff --git a/relayer/pkg/chainlink/txm/nonce.go b/relayer/pkg/chainlink/txm/nonce.go index 4401af81f..85436b3ae 100644 --- a/relayer/pkg/chainlink/txm/nonce.go +++ b/relayer/pkg/chainlink/txm/nonce.go @@ -3,10 +3,9 @@ package txm import ( "context" "fmt" - "math/big" "sync" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" @@ -16,16 +15,16 @@ import ( //go:generate mockery --name NonceManagerClient --output ./mocks/ --case=underscore --filename nonce_manager_client.go type NonceManagerClient interface { - AccountNonce(context.Context, caigotypes.Felt) (*big.Int, error) + AccountNonce(context.Context, *felt.Felt) (*felt.Felt, error) } type NonceManager interface { services.Service - Register(ctx context.Context, address caigotypes.Felt, chainId string, client NonceManagerClient) error + Register(ctx context.Context, address *felt.Felt, publicKey *felt.Felt, chainId string, client NonceManagerClient) error - NextSequence(address caigotypes.Felt, chainID string) (*big.Int, error) - IncrementNextSequence(address caigotypes.Felt, chainID string, currentNonce *big.Int) error + NextSequence(address *felt.Felt, chainID string) (*felt.Felt, error) + IncrementNextSequence(address *felt.Felt, chainID string, currentNonce *felt.Felt) error } var _ NonceManager = (*nonceManager)(nil) @@ -34,14 +33,14 @@ type nonceManager struct { starter utils.StartStopOnce lggr logger.Logger - n map[string]map[string]*big.Int // map address + chain ID to nonce + n map[string]map[string]*felt.Felt // map address + chain ID to nonce lock sync.RWMutex } func NewNonceManager(lggr logger.Logger) *nonceManager { return &nonceManager{ lggr: logger.Named(lggr, "NonceManager"), - n: map[string]map[string]*big.Int{}, + n: map[string]map[string]*felt.Felt{}, } } @@ -66,12 +65,12 @@ func (nm *nonceManager) HealthReport() map[string]error { } // Register is used because we cannot pre-fetch nonces. the pubkey is known before hand, but the account address is not known until a job is started and sends a tx -func (nm *nonceManager) Register(ctx context.Context, addr caigotypes.Felt, chainId string, client NonceManagerClient) error { +func (nm *nonceManager) Register(ctx context.Context, addr *felt.Felt, publicKey *felt.Felt, chainId string, client NonceManagerClient) error { nm.lock.Lock() defer nm.lock.Unlock() - addressNonces, exists := nm.n[addr.String()] + addressNonces, exists := nm.n[publicKey.String()] if !exists { - nm.n[addr.String()] = map[string]*big.Int{} + nm.n[publicKey.String()] = map[string]*felt.Felt{} } _, exists = addressNonces[chainId] if !exists { @@ -79,13 +78,13 @@ func (nm *nonceManager) Register(ctx context.Context, addr caigotypes.Felt, chai if err != nil { return err } - nm.n[addr.String()][chainId] = n + nm.n[publicKey.String()][chainId] = n } return nil } -func (nm *nonceManager) NextSequence(addr caigotypes.Felt, chainId string) (*big.Int, error) { +func (nm *nonceManager) NextSequence(addr *felt.Felt, chainId string) (*felt.Felt, error) { if err := nm.validate(addr, chainId); err != nil { return nil, err } @@ -95,7 +94,7 @@ func (nm *nonceManager) NextSequence(addr caigotypes.Felt, chainId string) (*big return nm.n[addr.String()][chainId], nil } -func (nm *nonceManager) IncrementNextSequence(addr caigotypes.Felt, chainId string, currentNonce *big.Int) error { +func (nm *nonceManager) IncrementNextSequence(addr *felt.Felt, chainId string, currentNonce *felt.Felt) error { if err := nm.validate(addr, chainId); err != nil { return err } @@ -106,11 +105,12 @@ func (nm *nonceManager) IncrementNextSequence(addr caigotypes.Felt, chainId stri if n.Cmp(currentNonce) != 0 { return fmt.Errorf("mismatched nonce for %s: %s (expected) != %s (got)", addr, n, currentNonce) } - nm.n[addr.String()][chainId] = big.NewInt(n.Int64() + 1) + one := new(felt.Felt).SetUint64(1) + nm.n[addr.String()][chainId] = new(felt.Felt).Add(n, one) return nil } -func (nm *nonceManager) validate(addr caigotypes.Felt, id string) error { +func (nm *nonceManager) validate(addr *felt.Felt, id string) error { nm.lock.RLock() defer nm.lock.RUnlock() if _, exists := nm.n[addr.String()]; !exists { diff --git a/relayer/pkg/chainlink/txm/nonce_test.go b/relayer/pkg/chainlink/txm/nonce_test.go index 1f9dea0a4..3ccfab00e 100644 --- a/relayer/pkg/chainlink/txm/nonce_test.go +++ b/relayer/pkg/chainlink/txm/nonce_test.go @@ -5,7 +5,8 @@ import ( "math/big" "testing" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" @@ -18,18 +19,19 @@ import ( "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/txm/mocks" ) -func newTestNonceManager(t *testing.T, chainID string, initNonce *big.Int) (txm.NonceManager, caigotypes.Felt, func()) { +func newTestNonceManager(t *testing.T, chainID string, initNonce *felt.Felt) (txm.NonceManager, *felt.Felt, func()) { // setup c := mocks.NewNonceManagerClient(t) lggr := logger.Test(t) nm := txm.NewNonceManager(lggr) // mock returns - keyHash := caigotypes.StrToFelt("test-key-id") + keyHash, err := starknetutils.HexToFelt("0x0") + require.NoError(t, err) c.On("AccountNonce", mock.Anything, mock.Anything).Return(initNonce, nil).Once() require.NoError(t, nm.Start(tests.Context(t))) - require.NoError(t, nm.Register(tests.Context(t), keyHash, chainID, c)) + require.NoError(t, nm.Register(tests.Context(t), keyHash, keyHash, chainID, c)) return nm, keyHash, func() { require.NoError(t, nm.Close()) } } @@ -38,7 +40,7 @@ func TestNonceManager_NextSequence(t *testing.T) { t.Parallel() chainId := "test_nextSequence" - initNonce := big.NewInt(10) + initNonce := new(felt.Felt).SetUint64(10) nm, k, stop := newTestNonceManager(t, chainId, initNonce) defer stop() @@ -53,7 +55,7 @@ func TestNonceManager_NextSequence(t *testing.T) { assert.Contains(t, err.Error(), fmt.Sprintf("nonce does not exist for key: %s and chain: %s", k.String(), "invalid_chainId")) // should fail with invalid address - randAddr1 := caigotypes.BigToFelt(big.NewInt(1)) + randAddr1 := starknetutils.BigIntToFelt(big.NewInt(1)) _, err = nm.NextSequence(randAddr1, chainId) require.Error(t, err) assert.Contains(t, err.Error(), fmt.Sprintf("nonce tracking does not exist for key: %s", randAddr1.String())) @@ -63,12 +65,13 @@ func TestNonceManager_IncrementNextSequence(t *testing.T) { t.Parallel() chainId := "test_nextSequence" - initNonce := big.NewInt(10) + initNonce := new(felt.Felt).SetUint64(10) nm, k, stop := newTestNonceManager(t, chainId, initNonce) defer stop() - initMinusOne := big.NewInt(initNonce.Int64() - 1) - initPlusOne := big.NewInt(initNonce.Int64() + 1) + one := new(felt.Felt).SetUint64(1) + initMinusOne := new(felt.Felt).Sub(initNonce, one) + initPlusOne := new(felt.Felt).Add(initNonce, one) // should fail if nonce is lower then expected err := nm.IncrementNextSequence(k, chainId, initMinusOne) @@ -88,7 +91,7 @@ func TestNonceManager_IncrementNextSequence(t *testing.T) { assert.Contains(t, err.Error(), fmt.Sprintf("nonce does not exist for key: %s and chain: %s", k.String(), "invalid_chainId")) // should fail with invalid address - randAddr1 := caigotypes.BigToFelt(big.NewInt(1)) + randAddr1 := starknetutils.BigIntToFelt(big.NewInt(1)) err = nm.IncrementNextSequence(randAddr1, chainId, initPlusOne) require.Error(t, err) assert.Contains(t, err.Error(), fmt.Sprintf("nonce tracking does not exist for key: %s", randAddr1.String())) diff --git a/relayer/pkg/chainlink/txm/test_helpers.go b/relayer/pkg/chainlink/txm/test_helpers.go index f3fda3048..8cadf9307 100644 --- a/relayer/pkg/chainlink/txm/test_helpers.go +++ b/relayer/pkg/chainlink/txm/test_helpers.go @@ -7,7 +7,7 @@ import ( "testing" "time" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -37,7 +37,6 @@ func SetupLocalStarknetNode(t *testing.T) string { cmd := exec.Command("starknet-devnet", "--seed", "0", // use same seed for testing "--port", port, - "--lite-mode", ) var stdErr bytes.Buffer cmd.Stderr = &stdErr @@ -76,9 +75,9 @@ func TestKeys(t *testing.T, count int) (rawkeys [][]byte) { if i >= count { break } - - keyBytes := caigotypes.StrToFelt(k).Bytes() - rawkeys = append(rawkeys, keyBytes) + f, _ := starknetutils.HexToFelt(k) + keyBytes := f.Bytes() + rawkeys = append(rawkeys, keyBytes[:]) } return rawkeys } diff --git a/relayer/pkg/chainlink/txm/txm.go b/relayer/pkg/chainlink/txm/txm.go index f59d41468..e452c1cff 100644 --- a/relayer/pkg/chainlink/txm/txm.go +++ b/relayer/pkg/chainlink/txm/txm.go @@ -5,13 +5,13 @@ import ( "errors" "fmt" "math/big" - "reflect" "sync" "time" - "github.com/smartcontractkit/caigo" - caigorpc "github.com/smartcontractkit/caigo/rpcv02" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" + starknetaccount "github.com/NethermindEth/starknet.go/account" + starknetrpc "github.com/NethermindEth/starknet.go/rpc" + starknetutils "github.com/NethermindEth/starknet.go/utils" "golang.org/x/exp/maps" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -27,14 +27,14 @@ const ( ) type TxManager interface { - Enqueue(senderAddress caigotypes.Felt, accountAddress caigotypes.Felt, txFn caigotypes.FunctionCall) error + Enqueue(accountAddress *felt.Felt, publicKey *felt.Felt, txFn starknetrpc.FunctionCall) error InflightCount() (int, int) } type Tx struct { - senderAddress caigotypes.Felt - accountAddress caigotypes.Felt - call caigotypes.FunctionCall + publicKey *felt.Felt + accountAddress *felt.Felt + call starknetrpc.FunctionCall } type StarkTXM interface { @@ -114,7 +114,7 @@ func (txm *starktxm) broadcastLoop() { tx := <-txm.queue // broadcast tx serially - wait until accepted by mempool before processing next - hash, err := txm.broadcast(ctx, tx.senderAddress, tx.accountAddress, tx.call) + hash, err := txm.broadcast(ctx, tx.publicKey, tx.accountAddress, tx.call) if err != nil { txm.lggr.Errorw("transaction failed to broadcast", "error", err, "tx", tx.call) } else { @@ -124,17 +124,17 @@ func (txm *starktxm) broadcastLoop() { } } -const FEE_MARGIN uint64 = 115 +const FEE_MARGIN uint32 = 115 -func (txm *starktxm) broadcast(ctx context.Context, senderAddress caigotypes.Felt, accountAddress caigotypes.Felt, tx caigotypes.FunctionCall) (txhash string, err error) { - txs := []caigotypes.FunctionCall{tx} +func (txm *starktxm) broadcast(ctx context.Context, publicKey *felt.Felt, accountAddress *felt.Felt, call starknetrpc.FunctionCall) (txhash string, err error) { client, err := txm.client.Get() if err != nil { txm.client.Reset() return txhash, fmt.Errorf("broadcast: failed to fetch client: %+w", err) } // create new account - account, err := caigo.NewRPCAccount(senderAddress, accountAddress, txm.ks, client.Provider, caigo.AccountVersion1) + cairoVersion := 2 + account, err := starknetaccount.NewAccount(client.Provider, accountAddress, publicKey.String(), txm.ks, cairoVersion) if err != nil { return txhash, fmt.Errorf("failed to create new account: %+w", err) } @@ -144,47 +144,122 @@ func (txm *starktxm) broadcast(ctx context.Context, senderAddress caigotypes.Fel return txhash, fmt.Errorf("failed to get chainID: %+w", err) } - nonce, err := txm.nonce.NextSequence(accountAddress, chainID) + nonce, err := txm.nonce.NextSequence(publicKey, chainID) if err != nil { return txhash, fmt.Errorf("failed to get nonce: %+w", err) } - // get fee for txm + // Building the tx struct + tx := starknetrpc.InvokeTxnV1{ + MaxFee: &felt.Zero, + Type: starknetrpc.TransactionType_Invoke, + SenderAddress: account.AccountAddress, + Version: starknetrpc.TransactionV1, + Signature: []*felt.Felt{}, + Nonce: nonce, + } + + // TODO: upgrade to V3 once devnet uses OZ 0.8.1 (accounts need to support v3) + // tx := starknetrpc.InvokeTxnV3{ + // Type: starknetrpc.TransactionType_Invoke, + // SenderAddress: account.AccountAddress, + // Version: starknetrpc.TransactionV3, + // Signature: []*felt.Felt{}, + // Nonce: nonce, + // ResourceBounds: starknetrpc.ResourceBoundsMapping{ // TODO: use proper values + // L1Gas: starknetrpc.ResourceBounds{ + // MaxAmount: "0x186a0", + // MaxPricePerUnit: "0x1388", + // }, + // L2Gas: starknetrpc.ResourceBounds{ + // MaxAmount: "0x0", + // MaxPricePerUnit: "0x0", + // }, + // }, + // Tip: "0x0", + // PayMasterData: []*felt.Felt{}, + // AccountDeploymentData: []*felt.Felt{}, + // NonceDataMode: rpc.DAModeL1, // TODO: confirm + // FeeMode: rpc.DAModeL1, // TODO: confirm + // } + // TODO: SignInvokeTransaction for V3 is missing so we do it by hand + // hash, err := account.TransactionHashInvoke(tx) + // if err != nil { + // return txhash, err + // } + // signature, err := account.Sign(ctx, hash) + // if err != nil { + // return txhash, err + // } + // tx.Signature = signature + + // Building the Calldata with the help of FmtCalldata where we pass in the FnCall struct along with the Cairo version + tx.Calldata, err = account.FmtCalldata([]starknetrpc.FunctionCall{call}) + if err != nil { + return txhash, err + } + + // TODO: if we estimate with sig then the hash changes and we have to re-sign + // if we don't then the signature is invalid?? + + // Signing of the transaction that is done by the account + err = account.SignInvokeTransaction(context.Background(), &tx) + if err != nil { + return txhash, fmt.Errorf("failed to sign tx: %+w", err) + } + + // get fee for tx // optional - pass nonce to fee estimate (if nonce gets ahead, estimate may fail) // can we estimate fee without calling estimate - tbd with 1.0 - feeEstimate, err := account.EstimateFee(ctx, txs, caigotypes.ExecuteDetails{}) + simFlags := []starknetrpc.SimulationFlag{} + txm.lggr.Infow("Estimated fee", "fee", tx.MaxFee) + txm.lggr.Infow("Account", "account", account.AccountAddress) + feeEstimate, err := account.EstimateFee(ctx, []starknetrpc.BroadcastTxn{tx}, simFlags, starknetrpc.BlockID{Tag: "latest"}) if err != nil { return txhash, fmt.Errorf("failed to estimate fee: %+w", err) } - fee, _ := big.NewInt(0).SetString(string(feeEstimate.OverallFee), 0) - expandedFee := big.NewInt(0).Mul(fee, big.NewInt(int64(FEE_MARGIN))) - max := big.NewInt(0).Div(expandedFee, big.NewInt(100)) - details := caigotypes.ExecuteDetails{ - MaxFee: max, - Nonce: nonce, + overallFee := feeEstimate[0].OverallFee.BigInt(new(big.Int)) + expandedFee := new(big.Int).Mul(overallFee, big.NewInt(int64(FEE_MARGIN))) + maxFee := new(big.Int).Div(expandedFee, big.NewInt(100)) + tx.MaxFee = starknetutils.BigIntToFelt(maxFee) + txm.lggr.Infow("Estimated fee", "fee", tx.MaxFee) + txm.lggr.Infow("Account", "account", account.AccountAddress) + + // pad estimate to 110% + // gasConsumed := feeEstimate[0].GasConsumed.BigInt(new(big.Int)) + // expandedGas := new(big.Int).Mul(gasConsumed, big.NewInt(140)) + // maxGas := new(big.Int).Div(expandedGas, big.NewInt(100)) + // maxAmount := starknetrpc.U64(starknetutils.BigIntToFelt(maxGas).String()) + // tx.ResourceBounds.L1Gas.MaxAmount = starknetrpc.U64(starknetutils.BigIntToFelt(maxGas).String()) + + // Re-sign transaction now that we've determined MaxFee + err = account.SignInvokeTransaction(context.Background(), &tx) + if err != nil { + return txhash, fmt.Errorf("failed to sign tx: %+w", err) } - // transmit txs execCtx, execCancel := context.WithTimeout(ctx, txm.cfg.TxTimeout()) defer execCancel() - res, err := account.Execute(execCtx, txs, details) + + // finally, transmit the invoke + res, err := account.AddInvokeTransaction(execCtx, tx) if err != nil { // TODO: handle initial broadcast errors - what kind of errors occur? return txhash, fmt.Errorf("failed to invoke tx: %+w", err) } - // handle nil pointer if res == nil { return txhash, errors.New("execute response and error are nil") } // update nonce if transaction is successful + txhash = res.TransactionHash.String() err = errors.Join( - txm.nonce.IncrementNextSequence(accountAddress, chainID, nonce), - txm.txStore.Save(accountAddress, nonce, res.TransactionHash), + txm.nonce.IncrementNextSequence(publicKey, chainID, nonce), + txm.txStore.Save(accountAddress, nonce, txhash), ) - return res.TransactionHash, err + return txhash, err } func (txm *starktxm) confirmLoop() { @@ -211,20 +286,21 @@ func (txm *starktxm) confirmLoop() { for addr := range hashes { for i := range hashes[addr] { hash := hashes[addr][i] - response, err := client.Provider.TransactionReceipt(ctx, caigotypes.StrToFelt(hashes[addr][i])) + f, err := starknetutils.HexToFelt(hash) if err != nil { - txm.lggr.Errorw("failed to fetch transaction status", "hash", hash, "error", err) + txm.lggr.Errorw("invalid felt value", "hash", hash) continue } - receipt, ok := response.(caigorpc.InvokeTransactionReceipt) - if !ok { - txm.lggr.Errorw("wrong receipt type", "type", reflect.TypeOf(response)) + response, err := client.Provider.GetTransactionStatus(ctx, f) + if err != nil { + txm.lggr.Errorw("failed to fetch transaction status", "hash", hash, "error", err) continue } - status := receipt.Status + status := response.FinalityStatus - if status == caigotypes.TransactionAcceptedOnL1 || status == caigotypes.TransactionAcceptedOnL2 || status == caigotypes.TransactionRejected { + // any status other than received + if status == starknetrpc.TxnStatus_Accepted_On_L1 || status == starknetrpc.TxnStatus_Accepted_On_L2 || status == starknetrpc.TxnStatus_Rejected { txm.lggr.Debugw(fmt.Sprintf("tx confirmed: %s", status), "hash", hash, "status", status) if err := txm.txStore.Confirm(addr, hash); err != nil { txm.lggr.Errorw("failed to confirm tx in TxStore", "hash", hash, "sender", addr, "error", err) @@ -261,13 +337,13 @@ func (txm *starktxm) HealthReport() map[string]error { return map[string]error{txm.Name(): txm.Healthy()} } -func (txm *starktxm) Enqueue(senderAddress, accountAddress caigotypes.Felt, tx caigotypes.FunctionCall) error { +func (txm *starktxm) Enqueue(accountAddress, publicKey *felt.Felt, tx starknetrpc.FunctionCall) error { // validate key exists for sender // use the embedded Loopp Keystore to do this; the spec and design // encourage passing nil data to the loop.Keystore.Sign as way to test // existence of a key - if _, err := txm.ks.Loopp().Sign(context.Background(), senderAddress.String(), nil); err != nil { - return err + if _, err := txm.ks.Loopp().Sign(context.Background(), publicKey.String(), nil); err != nil { + return fmt.Errorf("enqueue: failed to sign: %+w", err) } client, err := txm.client.Get() @@ -282,12 +358,12 @@ func (txm *starktxm) Enqueue(senderAddress, accountAddress caigotypes.Felt, tx c } // register account for nonce manager - if err := txm.nonce.Register(context.TODO(), accountAddress, chainID, client); err != nil { - return err + if err := txm.nonce.Register(context.TODO(), accountAddress, publicKey, chainID, client); err != nil { + return fmt.Errorf("failed to register nonce: %+w", err) } select { - case txm.queue <- Tx{senderAddress: senderAddress, accountAddress: accountAddress, call: tx}: + case txm.queue <- Tx{publicKey: publicKey, accountAddress: accountAddress, call: tx}: // TODO fix naming here default: return fmt.Errorf("failed to enqueue transaction: %+v", tx) } diff --git a/relayer/pkg/chainlink/txm/txm_test.go b/relayer/pkg/chainlink/txm/txm_test.go index fbea54a1a..08146c56b 100644 --- a/relayer/pkg/chainlink/txm/txm_test.go +++ b/relayer/pkg/chainlink/txm/txm_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/smartcontractkit/caigo" - caigogw "github.com/smartcontractkit/caigo/gateway" - "github.com/smartcontractkit/caigo/test" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/starknet.go/curve" + "github.com/NethermindEth/starknet.go/devnet" + starknetrpc "github.com/NethermindEth/starknet.go/rpc" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" @@ -26,34 +26,41 @@ import ( func TestIntegration_Txm(t *testing.T) { n := 2 // number of txs per key - url := SetupLocalStarknetNode(t) - devnet := test.NewDevNet(url) + // url := SetupLocalStarknetNode(t) + url := "http://127.0.0.1:5050" + devnet := devnet.NewDevNet(url) accounts, err := devnet.Accounts() require.NoError(t, err) + fmt.Println("qqq") // parse keys into expected format - localKeys := map[string]*big.Int{} - localAccounts := map[string]string{} + type Key struct { + PrivateKey *big.Int + Account string + } + localKeys := map[string]Key{} for i := range accounts { - privKey, err := caigotypes.HexToBytes(accounts[i].PrivateKey) - require.NoError(t, err) - senderAddress := caigotypes.StrToFelt(accounts[i].PublicKey).String() - localKeys[senderAddress] = caigotypes.BytesToBig(privKey) - localAccounts[senderAddress] = accounts[i].Address + publicKey := accounts[i].PublicKey + fmt.Printf("account %v pubkey %v\n", accounts[i].Address, publicKey) + localKeys[publicKey] = Key{ + PrivateKey: starknetutils.HexToBN(accounts[i].PrivateKey), + Account: accounts[i].Address, + } } // mock keystore - looppKs := NewLooppKeystore(func(id string) (*big.Int, error) { - _, ok := localKeys[id] + looppKs := NewLooppKeystore(func(publicKey string) (*big.Int, error) { + key, ok := localKeys[publicKey] if !ok { - return nil, fmt.Errorf("key does not exist id=%s", id) + return nil, fmt.Errorf("key does not exist id=%s", publicKey) } - return localKeys[id], nil + return key.PrivateKey, nil }) ksAdapter := NewKeystoreAdapter(looppKs) + lggr, observer := logger.TestObserved(t, zapcore.DebugLevel) timeout := 10 * time.Second - client, err := starknet.NewClient(caigogw.GOERLI_ID, url+"/rpc", lggr, &timeout) + client, err := starknet.NewClient("SN_GOERLI", url+"/rpc", lggr, &timeout) require.NoError(t, err) getClient := func() (*starknet.Client, error) { @@ -74,18 +81,29 @@ func TestIntegration_Txm(t *testing.T) { // start txm + checks require.NoError(t, txm.Start(context.Background())) require.NoError(t, txm.Ready()) + fmt.Println("sss") + + for publicKeyStr := range localKeys { + publicKey, err := starknetutils.HexToFelt(publicKeyStr) + require.NoError(t, err) + + accountAddress, err := starknetutils.HexToFelt(localKeys[publicKeyStr].Account) + require.NoError(t, err) + + contractAddress, err := starknetutils.HexToFelt("0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7") + require.NoError(t, err) + + selector := starknetutils.GetSelectorFromNameFelt("totalSupply") - for senderAddressStr := range localKeys { - senderAddress := caigotypes.StrToFelt(senderAddressStr) for i := 0; i < n; i++ { - require.NoError(t, txm.Enqueue(senderAddress, caigotypes.StrToFelt(localAccounts[senderAddressStr]), caigotypes.FunctionCall{ - ContractAddress: caigotypes.StrToFelt("0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7"), // send to ETH token contract - EntryPointSelector: "totalSupply", + require.NoError(t, txm.Enqueue(accountAddress, publicKey, starknetrpc.FunctionCall{ + ContractAddress: contractAddress, // send to ETH token contract + EntryPointSelector: selector, })) } } var empty bool - for i := 0; i < 60; i++ { + for i := 0; i < 30; i++ { time.Sleep(500 * time.Millisecond) queued, unconfirmed := txm.InflightCount() accepted := len(observer.FilterMessageSnippet("ACCEPTED_ON_L2").All()) @@ -135,7 +153,7 @@ func (lk *LooppKeystore) Sign(ctx context.Context, id string, hash []byte) ([]by } starkHash := new(big.Int).SetBytes(hash) - x, y, err := caigo.Curve.Sign(starkHash, k) + x, y, err := curve.Curve.Sign(starkHash, k) if err != nil { return nil, fmt.Errorf("error signing data with curve: %w", err) } diff --git a/relayer/pkg/chainlink/txm/txstore.go b/relayer/pkg/chainlink/txm/txstore.go index 4c2c2b5f6..d56a2bafb 100644 --- a/relayer/pkg/chainlink/txm/txstore.go +++ b/relayer/pkg/chainlink/txm/txstore.go @@ -2,52 +2,52 @@ package txm import ( "fmt" - "math/big" "sync" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "golang.org/x/exp/maps" ) // TxStore tracks broadcast & unconfirmed txs type TxStore struct { lock sync.RWMutex - nonceToHash map[int64]string // map nonce to txhash - hashToNonce map[string]int64 // map hash to nonce - currentNonce *big.Int // minimum nonce + nonceToHash map[felt.Felt]string // map nonce to txhash + hashToNonce map[string]felt.Felt // map hash to nonce + currentNonce felt.Felt // minimum nonce } -func NewTxStore(current *big.Int) *TxStore { +func NewTxStore(current *felt.Felt) *TxStore { return &TxStore{ - nonceToHash: map[int64]string{}, - hashToNonce: map[string]int64{}, - currentNonce: current, + nonceToHash: map[felt.Felt]string{}, + hashToNonce: map[string]felt.Felt{}, + currentNonce: *current, } } -func (s *TxStore) Save(nonce *big.Int, hash string) error { +// TODO: Save should make a copy otherwise wee're modiffying the same memory and could loop +func (s *TxStore) Save(nonce *felt.Felt, hash string) error { s.lock.Lock() defer s.lock.Unlock() if s.currentNonce.Cmp(nonce) == 1 { - return fmt.Errorf("nonce too low: %s < %s (lowest)", nonce, s.currentNonce) + return fmt.Errorf("nonce too low: %s < %s (lowest)", nonce, &s.currentNonce) } - if h, exists := s.nonceToHash[nonce.Int64()]; exists { + if h, exists := s.nonceToHash[*nonce]; exists { return fmt.Errorf("nonce used: tried to use nonce (%s) for tx (%s), already used by (%s)", nonce, hash, h) } if n, exists := s.hashToNonce[hash]; exists { - return fmt.Errorf("hash used: tried to use tx (%s) for nonce (%s), already used nonce (%d)", hash, nonce, n) + return fmt.Errorf("hash used: tried to use tx (%s) for nonce (%s), already used nonce (%s)", hash, nonce, &n) } // store hash - s.nonceToHash[nonce.Int64()] = hash - s.hashToNonce[hash] = nonce.Int64() + s.nonceToHash[*nonce] = hash + s.hashToNonce[hash] = *nonce // find next unused nonce - _, exists := s.nonceToHash[s.currentNonce.Int64()] + _, exists := s.nonceToHash[s.currentNonce] for exists { - s.currentNonce.Add(s.currentNonce, big.NewInt(1)) - _, exists = s.nonceToHash[s.currentNonce.Int64()] + s.currentNonce = *new(felt.Felt).Add(&s.currentNonce, new(felt.Felt).SetUint64(1)) + _, exists = s.nonceToHash[s.currentNonce] } return nil } @@ -77,17 +77,17 @@ func (s *TxStore) InflightCount() int { } type ChainTxStore struct { - store map[caigotypes.Felt]*TxStore + store map[*felt.Felt]*TxStore lock sync.RWMutex } func NewChainTxStore() *ChainTxStore { return &ChainTxStore{ - store: map[caigotypes.Felt]*TxStore{}, + store: map[*felt.Felt]*TxStore{}, } } -func (c *ChainTxStore) Save(from caigotypes.Felt, nonce *big.Int, hash string) error { +func (c *ChainTxStore) Save(from *felt.Felt, nonce *felt.Felt, hash string) error { // use write lock for methods that modify underlying data c.lock.Lock() defer c.lock.Unlock() @@ -98,7 +98,7 @@ func (c *ChainTxStore) Save(from caigotypes.Felt, nonce *big.Int, hash string) e return c.store[from].Save(nonce, hash) } -func (c *ChainTxStore) Confirm(from caigotypes.Felt, hash string) error { +func (c *ChainTxStore) Confirm(from *felt.Felt, hash string) error { // use write lock for methods that modify underlying data c.lock.Lock() defer c.lock.Unlock() @@ -109,12 +109,12 @@ func (c *ChainTxStore) Confirm(from caigotypes.Felt, hash string) error { return c.store[from].Confirm(hash) } -func (c *ChainTxStore) GetAllInflightCount() map[caigotypes.Felt]int { +func (c *ChainTxStore) GetAllInflightCount() map[*felt.Felt]int { // use read lock for methods that read underlying data c.lock.RLock() defer c.lock.RUnlock() - list := map[caigotypes.Felt]int{} + list := map[*felt.Felt]int{} for i := range c.store { list[i] = c.store[i].InflightCount() @@ -123,12 +123,12 @@ func (c *ChainTxStore) GetAllInflightCount() map[caigotypes.Felt]int { return list } -func (c *ChainTxStore) GetAllUnconfirmed() map[caigotypes.Felt][]string { +func (c *ChainTxStore) GetAllUnconfirmed() map[*felt.Felt][]string { // use read lock for methods that read underlying data c.lock.RLock() defer c.lock.RUnlock() - list := map[caigotypes.Felt][]string{} + list := map[*felt.Felt][]string{} for i := range c.store { list[i] = c.store[i].GetUnconfirmed() @@ -136,7 +136,7 @@ func (c *ChainTxStore) GetAllUnconfirmed() map[caigotypes.Felt][]string { return list } -func (c *ChainTxStore) validate(from caigotypes.Felt) error { +func (c *ChainTxStore) validate(from *felt.Felt) error { if _, exists := c.store[from]; !exists { return fmt.Errorf("from address does not exist: %s", from) } diff --git a/relayer/pkg/chainlink/txm/txstore_test.go b/relayer/pkg/chainlink/txm/txstore_test.go index dd415952f..3c7f500d5 100644 --- a/relayer/pkg/chainlink/txm/txstore_test.go +++ b/relayer/pkg/chainlink/txm/txstore_test.go @@ -3,11 +3,10 @@ package txm import ( "errors" "fmt" - "math/big" "sync" "testing" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -18,9 +17,9 @@ func TestTxStore(t *testing.T) { t.Run("happypath", func(t *testing.T) { t.Parallel() - s := NewTxStore(big.NewInt(0)) + s := NewTxStore(&felt.Zero) assert.Equal(t, 0, s.InflightCount()) - require.NoError(t, s.Save(big.NewInt(0), "0x0")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(0), "0x0")) assert.Equal(t, 1, s.InflightCount()) assert.Equal(t, []string{"0x0"}, s.GetUnconfirmed()) require.NoError(t, s.Confirm("0x0")) @@ -32,38 +31,38 @@ func TestTxStore(t *testing.T) { t.Parallel() // create - s := NewTxStore(big.NewInt(0)) + s := NewTxStore(new(felt.Felt).SetUint64(0)) // accepts tx in order - require.NoError(t, s.Save(big.NewInt(0), "0x0")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(0), "0x0")) assert.Equal(t, 1, s.InflightCount()) - assert.Equal(t, int64(1), s.currentNonce.Int64()) + assert.Equal(t, new(felt.Felt).SetUint64(1), &s.currentNonce) // accepts tx that skips a nonce - require.NoError(t, s.Save(big.NewInt(2), "0x2")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(2), "0x2")) assert.Equal(t, 2, s.InflightCount()) - assert.Equal(t, int64(1), s.currentNonce.Int64()) + assert.Equal(t, new(felt.Felt).SetUint64(1), &s.currentNonce) // accepts tx that fills in the missing nonce + fast forwards currentNonce - require.NoError(t, s.Save(big.NewInt(1), "0x1")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(1), "0x1")) assert.Equal(t, 3, s.InflightCount()) - assert.Equal(t, int64(3), s.currentNonce.Int64()) + assert.Equal(t, new(felt.Felt).SetUint64(3), &s.currentNonce) // skip a nonce for later tests - require.NoError(t, s.Save(big.NewInt(4), "0x4")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(4), "0x4")) assert.Equal(t, 4, s.InflightCount()) - assert.Equal(t, int64(3), s.currentNonce.Int64()) + assert.Equal(t, new(felt.Felt).SetUint64(3), &s.currentNonce) // rejects old nonce - require.ErrorContains(t, s.Save(big.NewInt(0), "0xold"), "nonce too low: 0 < 3 (lowest)") + require.ErrorContains(t, s.Save(new(felt.Felt).SetUint64(0), "0xold"), "nonce too low: 0x0 < 0x3 (lowest)") assert.Equal(t, 4, s.InflightCount()) // reject already in use nonce - require.ErrorContains(t, s.Save(big.NewInt(4), "0xskip"), "nonce used: tried to use nonce (4) for tx (0xskip), already used by (0x4)") + require.ErrorContains(t, s.Save(new(felt.Felt).SetUint64(4), "0xskip"), "nonce used: tried to use nonce (0x4) for tx (0xskip), already used by (0x4)") assert.Equal(t, 4, s.InflightCount()) // reject already in use tx hash - require.ErrorContains(t, s.Save(big.NewInt(5), "0x0"), "hash used: tried to use tx (0x0) for nonce (5), already used nonce (0)") + require.ErrorContains(t, s.Save(new(felt.Felt).SetUint64(5), "0x0"), "hash used: tried to use tx (0x0) for nonce (0x5), already used nonce (0x0)") assert.Equal(t, 4, s.InflightCount()) // race save @@ -72,11 +71,11 @@ func TestTxStore(t *testing.T) { var wg sync.WaitGroup wg.Add(2) go func() { - err0 = s.Save(big.NewInt(10), "0x10") + err0 = s.Save(new(felt.Felt).SetUint64(10), "0x10") wg.Done() }() go func() { - err1 = s.Save(big.NewInt(10), "0x10") + err1 = s.Save(new(felt.Felt).SetUint64(10), "0x10") wg.Done() }() wg.Wait() @@ -87,9 +86,9 @@ func TestTxStore(t *testing.T) { t.Parallel() // init store - s := NewTxStore(big.NewInt(0)) + s := NewTxStore(new(felt.Felt).SetUint64(0)) for i := 0; i < 5; i++ { - require.NoError(t, s.Save(big.NewInt(int64(i)), "0x"+fmt.Sprintf("%d", i))) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(uint64(i)), "0x"+fmt.Sprintf("%d", i))) } // confirm in order @@ -108,7 +107,7 @@ func TestTxStore(t *testing.T) { require.ErrorContains(t, s.Confirm("0xNULL"), "tx hash does not exist - it may already be confirmed") // race confirm - require.NoError(t, s.Save(big.NewInt(10), "0x10")) + require.NoError(t, s.Save(new(felt.Felt).SetUint64(10), "0x10")) var err0 error var err1 error var wg sync.WaitGroup @@ -131,36 +130,39 @@ func TestChainTxStore(t *testing.T) { c := NewChainTxStore() + felt0 := new(felt.Felt).SetUint64(0) + felt1 := new(felt.Felt).SetUint64(1) + // automatically save the from address - require.NoError(t, c.Save(caigotypes.Felt{}, big.NewInt(0), "0x0")) + require.NoError(t, c.Save(felt0, new(felt.Felt).SetUint64(0), "0x0")) // reject saving for existing address and reused hash & nonce // error messages are tested within TestTxStore - assert.Error(t, c.Save(caigotypes.Felt{}, big.NewInt(0), "0x1")) - assert.Error(t, c.Save(caigotypes.Felt{}, big.NewInt(1), "0x0")) + assert.Error(t, c.Save(felt0, new(felt.Felt).SetUint64(0), "0x1")) + assert.Error(t, c.Save(felt0, new(felt.Felt).SetUint64(1), "0x0")) // inflight count - count, exists := c.GetAllInflightCount()[caigotypes.Felt{}] + count, exists := c.GetAllInflightCount()[felt0] require.True(t, exists) assert.Equal(t, 1, count) - _, exists = c.GetAllInflightCount()[caigotypes.BigToFelt(big.NewInt(1))] + _, exists = c.GetAllInflightCount()[felt1] require.False(t, exists) // get unconfirmed list := c.GetAllUnconfirmed() assert.Equal(t, 1, len(list)) - hashes, ok := list[caigotypes.Felt{}] + hashes, ok := list[felt0] assert.True(t, ok) assert.Equal(t, []string{"0x0"}, hashes) // confirm - assert.NoError(t, c.Confirm(caigotypes.Felt{}, "0x0")) - assert.ErrorContains(t, c.Confirm(caigotypes.BigToFelt(big.NewInt(1)), "0x0"), "from address does not exist") - assert.Error(t, c.Confirm(caigotypes.Felt{}, "0x1")) + assert.NoError(t, c.Confirm(felt0, "0x0")) + assert.ErrorContains(t, c.Confirm(felt1, "0x0"), "from address does not exist") + assert.Error(t, c.Confirm(felt0, "0x1")) list = c.GetAllUnconfirmed() assert.Equal(t, 1, len(list)) - assert.Equal(t, 0, len(list[caigotypes.Felt{}])) - count, exists = c.GetAllInflightCount()[caigotypes.Felt{}] + assert.Equal(t, 0, len(list[felt0])) + count, exists = c.GetAllInflightCount()[felt0] assert.True(t, exists) assert.Equal(t, 0, count) } diff --git a/relayer/pkg/starknet/client.go b/relayer/pkg/starknet/client.go index aa50ef473..02de45433 100644 --- a/relayer/pkg/starknet/client.go +++ b/relayer/pkg/starknet/client.go @@ -2,15 +2,14 @@ package starknet import ( "context" - "math/big" "time" "github.com/pkg/errors" + "github.com/NethermindEth/juno/core/felt" + starknetaccount "github.com/NethermindEth/starknet.go/account" + starknetrpc "github.com/NethermindEth/starknet.go/rpc" ethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/smartcontractkit/caigo" - caigorpc "github.com/smartcontractkit/caigo/rpcv02" - caigotypes "github.com/smartcontractkit/caigo/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" ) @@ -18,16 +17,16 @@ import ( //go:generate mockery --name Reader --output ./mocks/ type Reader interface { - CallContract(context.Context, CallOps) ([]string, error) + CallContract(context.Context, CallOps) ([]*felt.Felt, error) LatestBlockHeight(context.Context) (uint64, error) // provider interface - BlockWithTxHashes(ctx context.Context, blockID caigorpc.BlockID) (*caigorpc.Block, error) - Call(context.Context, caigotypes.FunctionCall, caigorpc.BlockID) ([]string, error) - Events(ctx context.Context, input caigorpc.EventsInput) (*caigorpc.EventsOutput, error) - TransactionByHash(context.Context, caigotypes.Felt) (caigorpc.Transaction, error) - TransactionReceipt(context.Context, caigotypes.Felt) (caigorpc.TransactionReceipt, error) - AccountNonce(context.Context, caigotypes.Felt) (*big.Int, error) + BlockWithTxHashes(ctx context.Context, blockID starknetrpc.BlockID) (*starknetrpc.Block, error) + Call(context.Context, starknetrpc.FunctionCall, starknetrpc.BlockID) ([]*felt.Felt, error) + Events(ctx context.Context, input starknetrpc.EventsInput) (*starknetrpc.EventChunk, error) + TransactionByHash(context.Context, *felt.Felt) (starknetrpc.Transaction, error) + TransactionReceipt(context.Context, *felt.Felt) (starknetrpc.TransactionReceipt, error) + AccountNonce(context.Context, *felt.Felt) (*felt.Felt, error) } type Writer interface { @@ -40,10 +39,10 @@ type ReaderWriter interface { var _ ReaderWriter = (*Client)(nil) -// var _ caigotypes.Provider = (*Client)(nil) +// var _ starknettypes.Provider = (*Client)(nil) type Client struct { - Provider *caigorpc.Provider + Provider starknetrpc.RpcProvider lggr logger.Logger defaultTimeout time.Duration } @@ -57,7 +56,7 @@ func NewClient(_chainID string, baseURL string, lggr logger.Logger, timeout *tim } client := &Client{ - Provider: caigorpc.NewProvider(c), + Provider: starknetrpc.NewProvider(c), lggr: lggr, } @@ -74,19 +73,19 @@ func NewClient(_chainID string, baseURL string, lggr logger.Logger, timeout *tim // -- Custom Wrapped Func -- -func (c *Client) CallContract(ctx context.Context, ops CallOps) (res []string, err error) { - tx := caigotypes.FunctionCall{ +func (c *Client) CallContract(ctx context.Context, ops CallOps) (data []*felt.Felt, err error) { + tx := starknetrpc.FunctionCall{ ContractAddress: ops.ContractAddress, EntryPointSelector: ops.Selector, Calldata: ops.Calldata, } - res, err = c.Call(ctx, tx, caigorpc.WithBlockTag("pending")) + res, err := c.Call(ctx, tx, starknetrpc.WithBlockTag("pending")) if err != nil { - return res, errors.Wrap(err, "error in client.CallContract") + return nil, errors.Wrap(err, "error in client.CallContract") } - return + return res, nil } func (c *Client) LatestBlockHeight(ctx context.Context) (height uint64, err error) { @@ -106,7 +105,7 @@ func (c *Client) LatestBlockHeight(ctx context.Context) (height uint64, err erro // -- caigo.Provider interface -- -func (c *Client) BlockWithTxHashes(ctx context.Context, blockID caigorpc.BlockID) (*caigorpc.Block, error) { +func (c *Client) BlockWithTxHashes(ctx context.Context, blockID starknetrpc.BlockID) (*starknetrpc.Block, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) @@ -115,12 +114,12 @@ func (c *Client) BlockWithTxHashes(ctx context.Context, blockID caigorpc.BlockID out, err := c.Provider.BlockWithTxHashes(ctx, blockID) if err != nil { - return out.(*caigorpc.Block), errors.Wrap(err, "error in client.BlockWithTxHashes") + return out.(*starknetrpc.Block), errors.Wrap(err, "error in client.BlockWithTxHashes") } - return out.(*caigorpc.Block), nil + return out.(*starknetrpc.Block), nil } -func (c *Client) Call(ctx context.Context, calls caigotypes.FunctionCall, blockHashOrTag caigorpc.BlockID) ([]string, error) { +func (c *Client) Call(ctx context.Context, calls starknetrpc.FunctionCall, blockHashOrTag starknetrpc.BlockID) ([]*felt.Felt, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) @@ -138,7 +137,7 @@ func (c *Client) Call(ctx context.Context, calls caigotypes.FunctionCall, blockH } -func (c *Client) TransactionByHash(ctx context.Context, hash caigotypes.Felt) (caigorpc.Transaction, error) { +func (c *Client) TransactionByHash(ctx context.Context, hash *felt.Felt) (starknetrpc.Transaction, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) @@ -156,7 +155,7 @@ func (c *Client) TransactionByHash(ctx context.Context, hash caigotypes.Felt) (c } -func (c *Client) TransactionReceipt(ctx context.Context, hash caigotypes.Felt) (caigorpc.TransactionReceipt, error) { +func (c *Client) TransactionReceipt(ctx context.Context, hash *felt.Felt) (starknetrpc.TransactionReceipt, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) @@ -174,7 +173,7 @@ func (c *Client) TransactionReceipt(ctx context.Context, hash caigotypes.Felt) ( } -func (c *Client) Events(ctx context.Context, input caigorpc.EventsInput) (*caigorpc.EventsOutput, error) { +func (c *Client) Events(ctx context.Context, input starknetrpc.EventsInput) (*starknetrpc.EventChunk, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) @@ -191,17 +190,18 @@ func (c *Client) Events(ctx context.Context, input caigorpc.EventsInput) (*caigo return out, nil } -func (c *Client) AccountNonce(ctx context.Context, accountAddress caigotypes.Felt) (*big.Int, error) { +func (c *Client) AccountNonce(ctx context.Context, accountAddress *felt.Felt) (*felt.Felt, error) { if c.defaultTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, c.defaultTimeout) defer cancel() } - sender := caigotypes.BigToFelt(big.NewInt((0))) // not actually used in account.Nonce() - account, err := caigo.NewRPCAccount(sender, accountAddress, nil, c.Provider, caigo.AccountVersion1) + sender := &felt.Zero // not actually used in account.Nonce() + cairoVersion := 2 + account, err := starknetaccount.NewAccount(c.Provider, accountAddress, sender.String(), nil, cairoVersion) if err != nil { return nil, errors.Wrap(err, "error in client.AccountNonce") } - return account.Nonce(ctx) + return account.Nonce(ctx, starknetrpc.BlockID{Tag: "latest"}, account.AccountAddress) } diff --git a/relayer/pkg/starknet/client_test.go b/relayer/pkg/starknet/client_test.go index 45af3f54b..e3d88b24a 100644 --- a/relayer/pkg/starknet/client_test.go +++ b/relayer/pkg/starknet/client_test.go @@ -10,8 +10,7 @@ import ( "testing" "time" - "github.com/smartcontractkit/caigo/gateway" - caigotypes "github.com/smartcontractkit/caigo/types" + starknetutils "github.com/NethermindEth/starknet.go/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -19,7 +18,7 @@ import ( ) var ( - chainID = gateway.GOERLI_ID + chainID = "SN_GOERLI" timeout = 10 * time.Second ) @@ -40,12 +39,12 @@ func TestRPCClient(t *testing.T) { switch call.Method { case "starknet_chainId": - id := caigotypes.BigToHex(caigotypes.UTF8StrToBig(chainID)) + id := starknetutils.BigToHex(starknetutils.UTF8StrToBig(chainID)) out = []byte(fmt.Sprintf(`{"result": "%s"}`, id)) case "starknet_blockNumber": out = []byte(`{"result": 1}`) default: - require.False(t, true, "unsupported RPC method") + require.False(t, true, "unsupported RPC method %s", call.Method) } _, err := w.Write(out) require.NoError(t, err) diff --git a/relayer/pkg/starknet/mocks/Reader.go b/relayer/pkg/starknet/mocks/Reader.go index 5d0bcfeb1..cb88175c1 100644 --- a/relayer/pkg/starknet/mocks/Reader.go +++ b/relayer/pkg/starknet/mocks/Reader.go @@ -4,15 +4,13 @@ package mocks import ( context "context" - big "math/big" + felt "github.com/NethermindEth/juno/core/felt" mock "github.com/stretchr/testify/mock" - rpcv02 "github.com/smartcontractkit/caigo/rpcv02" + rpc "github.com/NethermindEth/starknet.go/rpc" starknet "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" - - types "github.com/smartcontractkit/caigo/types" ) // Reader is an autogenerated mock type for the Reader type @@ -21,23 +19,23 @@ type Reader struct { } // AccountNonce provides a mock function with given fields: _a0, _a1 -func (_m *Reader) AccountNonce(_a0 context.Context, _a1 types.Felt) (*big.Int, error) { +func (_m *Reader) AccountNonce(_a0 context.Context, _a1 *felt.Felt) (*felt.Felt, error) { ret := _m.Called(_a0, _a1) - var r0 *big.Int + var r0 *felt.Felt var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (*big.Int, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (*felt.Felt, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) *big.Int); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) *felt.Felt); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) + r0 = ret.Get(0).(*felt.Felt) } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -47,23 +45,23 @@ func (_m *Reader) AccountNonce(_a0 context.Context, _a1 types.Felt) (*big.Int, e } // BlockWithTxHashes provides a mock function with given fields: ctx, blockID -func (_m *Reader) BlockWithTxHashes(ctx context.Context, blockID rpcv02.BlockID) (*rpcv02.Block, error) { +func (_m *Reader) BlockWithTxHashes(ctx context.Context, blockID rpc.BlockID) (*rpc.Block, error) { ret := _m.Called(ctx, blockID) - var r0 *rpcv02.Block + var r0 *rpc.Block var r1 error - if rf, ok := ret.Get(0).(func(context.Context, rpcv02.BlockID) (*rpcv02.Block, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (*rpc.Block, error)); ok { return rf(ctx, blockID) } - if rf, ok := ret.Get(0).(func(context.Context, rpcv02.BlockID) *rpcv02.Block); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) *rpc.Block); ok { r0 = rf(ctx, blockID) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*rpcv02.Block) + r0 = ret.Get(0).(*rpc.Block) } } - if rf, ok := ret.Get(1).(func(context.Context, rpcv02.BlockID) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, rpc.BlockID) error); ok { r1 = rf(ctx, blockID) } else { r1 = ret.Error(1) @@ -73,23 +71,23 @@ func (_m *Reader) BlockWithTxHashes(ctx context.Context, blockID rpcv02.BlockID) } // Call provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Reader) Call(_a0 context.Context, _a1 types.FunctionCall, _a2 rpcv02.BlockID) ([]string, error) { +func (_m *Reader) Call(_a0 context.Context, _a1 rpc.FunctionCall, _a2 rpc.BlockID) ([]*felt.Felt, error) { ret := _m.Called(_a0, _a1, _a2) - var r0 []string + var r0 []*felt.Felt var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.FunctionCall, rpcv02.BlockID) ([]string, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.FunctionCall, rpc.BlockID) ([]*felt.Felt, error)); ok { return rf(_a0, _a1, _a2) } - if rf, ok := ret.Get(0).(func(context.Context, types.FunctionCall, rpcv02.BlockID) []string); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.FunctionCall, rpc.BlockID) []*felt.Felt); ok { r0 = rf(_a0, _a1, _a2) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) + r0 = ret.Get(0).([]*felt.Felt) } } - if rf, ok := ret.Get(1).(func(context.Context, types.FunctionCall, rpcv02.BlockID) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, rpc.FunctionCall, rpc.BlockID) error); ok { r1 = rf(_a0, _a1, _a2) } else { r1 = ret.Error(1) @@ -99,19 +97,19 @@ func (_m *Reader) Call(_a0 context.Context, _a1 types.FunctionCall, _a2 rpcv02.B } // CallContract provides a mock function with given fields: _a0, _a1 -func (_m *Reader) CallContract(_a0 context.Context, _a1 starknet.CallOps) ([]string, error) { +func (_m *Reader) CallContract(_a0 context.Context, _a1 starknet.CallOps) ([]*felt.Felt, error) { ret := _m.Called(_a0, _a1) - var r0 []string + var r0 []*felt.Felt var r1 error - if rf, ok := ret.Get(0).(func(context.Context, starknet.CallOps) ([]string, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, starknet.CallOps) ([]*felt.Felt, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, starknet.CallOps) []string); ok { + if rf, ok := ret.Get(0).(func(context.Context, starknet.CallOps) []*felt.Felt); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) + r0 = ret.Get(0).([]*felt.Felt) } } @@ -125,23 +123,23 @@ func (_m *Reader) CallContract(_a0 context.Context, _a1 starknet.CallOps) ([]str } // Events provides a mock function with given fields: ctx, input -func (_m *Reader) Events(ctx context.Context, input rpcv02.EventsInput) (*rpcv02.EventsOutput, error) { +func (_m *Reader) Events(ctx context.Context, input rpc.EventsInput) (*rpc.EventChunk, error) { ret := _m.Called(ctx, input) - var r0 *rpcv02.EventsOutput + var r0 *rpc.EventChunk var r1 error - if rf, ok := ret.Get(0).(func(context.Context, rpcv02.EventsInput) (*rpcv02.EventsOutput, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.EventsInput) (*rpc.EventChunk, error)); ok { return rf(ctx, input) } - if rf, ok := ret.Get(0).(func(context.Context, rpcv02.EventsInput) *rpcv02.EventsOutput); ok { + if rf, ok := ret.Get(0).(func(context.Context, rpc.EventsInput) *rpc.EventChunk); ok { r0 = rf(ctx, input) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*rpcv02.EventsOutput) + r0 = ret.Get(0).(*rpc.EventChunk) } } - if rf, ok := ret.Get(1).(func(context.Context, rpcv02.EventsInput) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, rpc.EventsInput) error); ok { r1 = rf(ctx, input) } else { r1 = ret.Error(1) @@ -175,23 +173,23 @@ func (_m *Reader) LatestBlockHeight(_a0 context.Context) (uint64, error) { } // TransactionByHash provides a mock function with given fields: _a0, _a1 -func (_m *Reader) TransactionByHash(_a0 context.Context, _a1 types.Felt) (rpcv02.Transaction, error) { +func (_m *Reader) TransactionByHash(_a0 context.Context, _a1 *felt.Felt) (rpc.Transaction, error) { ret := _m.Called(_a0, _a1) - var r0 rpcv02.Transaction + var r0 rpc.Transaction var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (rpcv02.Transaction, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (rpc.Transaction, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) rpcv02.Transaction); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) rpc.Transaction); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(rpcv02.Transaction) + r0 = ret.Get(0).(rpc.Transaction) } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -201,23 +199,23 @@ func (_m *Reader) TransactionByHash(_a0 context.Context, _a1 types.Felt) (rpcv02 } // TransactionReceipt provides a mock function with given fields: _a0, _a1 -func (_m *Reader) TransactionReceipt(_a0 context.Context, _a1 types.Felt) (rpcv02.TransactionReceipt, error) { +func (_m *Reader) TransactionReceipt(_a0 context.Context, _a1 *felt.Felt) (rpc.TransactionReceipt, error) { ret := _m.Called(_a0, _a1) - var r0 rpcv02.TransactionReceipt + var r0 rpc.TransactionReceipt var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) (rpcv02.TransactionReceipt, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) (rpc.TransactionReceipt, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, types.Felt) rpcv02.TransactionReceipt); ok { + if rf, ok := ret.Get(0).(func(context.Context, *felt.Felt) rpc.TransactionReceipt); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(rpcv02.TransactionReceipt) + r0 = ret.Get(0).(rpc.TransactionReceipt) } } - if rf, ok := ret.Get(1).(func(context.Context, types.Felt) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *felt.Felt) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) diff --git a/relayer/pkg/starknet/types.go b/relayer/pkg/starknet/types.go index 8c949c307..d79603af6 100644 --- a/relayer/pkg/starknet/types.go +++ b/relayer/pkg/starknet/types.go @@ -1,11 +1,11 @@ package starknet import ( - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" ) type CallOps struct { - ContractAddress caigotypes.Felt - Selector string - Calldata []string + ContractAddress *felt.Felt + Selector *felt.Felt + Calldata []*felt.Felt } diff --git a/relayer/pkg/starknet/utils.go b/relayer/pkg/starknet/utils.go index 8cc1c2ecc..0a45ad6b3 100644 --- a/relayer/pkg/starknet/utils.go +++ b/relayer/pkg/starknet/utils.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - caigotypes "github.com/smartcontractkit/caigo/types" + "github.com/NethermindEth/juno/core/felt" "github.com/pkg/errors" "golang.org/x/exp/constraints" @@ -88,41 +88,14 @@ func DecodeFelts(felts []*big.Int) ([]byte, error) { return data, nil } -func FeltToUnsignedBig(felt caigotypes.Felt) (num *big.Int, err error) { - num = felt.Big() - if caigotypes.MaxFelt.Big().Cmp(num) == -1 { - return nil, fmt.Errorf("felt value is too large: %s", num) - } - // will always return a non-negative value because it uses Bytes() behind the scenes - return num, nil -} - -func HexToUnsignedBig(str string) (num *big.Int, err error) { - felt := caigotypes.StrToFelt(str) - return FeltToUnsignedBig(felt) -} - -func FeltsToBig(in []caigotypes.Felt) (out []*big.Int) { +func FeltsToBig(in []*felt.Felt) (out []*big.Int) { for _, f := range in { - out = append(out, f.Big()) + out = append(out, f.BigInt(big.NewInt(0))) } return out } -// StringsToFelt maps felts from 'string' (hex) representation to 'caigo.Felt' representation -func StringsToFelt(in []string) (out []caigotypes.Felt, _ error) { - if in == nil { - return nil, errors.New("invalid: input value") - } - - for _, f := range in { - out = append(out, caigotypes.StrToFelt(f)) - } - - return out, nil -} - /* Testing utils - do not use (XXX) outside testing context */ func XXXMustHexDecodeString(data string) []byte { diff --git a/relayer/pkg/starknet/utils_test.go b/relayer/pkg/starknet/utils_test.go index 15d11ff8f..69ff2ce86 100644 --- a/relayer/pkg/starknet/utils_test.go +++ b/relayer/pkg/starknet/utils_test.go @@ -7,8 +7,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - caigotypes "github.com/smartcontractkit/caigo/types" ) var ( @@ -40,28 +38,6 @@ func TestPadBytes(t *testing.T) { } } -func TestFeltToUnsignedBig(t *testing.T) { - - negativeBig := caigotypes.BigToFelt(big.NewInt(-100)) - // negative felts are not supported - num, err := FeltToUnsignedBig(negativeBig) - assert.NoError(t, err) - assert.Equal(t, num, big.NewInt(100)) - - positiveBig := caigotypes.BigToFelt(big.NewInt(100)) - num, err = FeltToUnsignedBig(positiveBig) - assert.NoError(t, err) - assert.Equal(t, num, big.NewInt(100)) - -} - -func TestHexToUnSignedBig(t *testing.T) { - // Positive value (99) - answer, err := HexToUnsignedBig("0x63") - assert.NoError(t, err) - assert.Equal(t, big.NewInt(99), answer) -} - func TestDecodeFeltFails(t *testing.T) { val, _ := new(big.Int).SetString("1231927389172389172983712738127391273891", 10) diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 000000000..83b9e45ab --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +container_version="starknet" + +pushd "$(dirname -- "$0")/../core" +docker build . -t smartcontract/chainlink:${container_version} -f ./core/chainlink.Dockerfile +popd + diff --git a/scripts/core.down.sh b/scripts/core.down.sh new file mode 100755 index 000000000..c211a835f --- /dev/null +++ b/scripts/core.down.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +echo "Cleaning up core containers.." + +echo "Checking for existing 'chainlink.core' docker containers..." + +for i in {1..5} +do + echo " Checking for chainlink.core.$i" + dpid=$(docker ps -a | grep chainlink.core.$i | awk '{print $1}') + if [ -z "$dpid" ]; then + echo "No docker core container running." + else + docker kill $dpid + docker rm $dpid + fi +done + +echo "Cleanup finished." diff --git a/scripts/core.sh b/scripts/core.sh new file mode 100755 index 000000000..85db2d947 --- /dev/null +++ b/scripts/core.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +set -euox pipefail + +bash "$(dirname -- "$0")/core.down.sh" + +container_name_prefix="chainlink.core" +container_version="starknet" + +# https://github.com/smartcontractkit/chainlink/blob/600365a7a27508d699dbd4b994fafba7dc288659/integration-tests/client/chainlink_k8s.go#L82-L83 +api_email="notreal@fakeemail.ch" +api_password="fj293fbBnlQ!f9vNs" + +if [[ -z "${CL_CONFIG:-}" ]]; then + echo "No CL_CONFIG env var provided." >&2 + exit 1 +fi + +platform_arg="" +if [ -n "${CORE_IMAGE:-}" ]; then + image_name="${CORE_IMAGE}" +else + image_name="smartcontract/chainlink:${container_version}" + platform_arg="--platform linux/amd64" +fi +echo "Using core image: ${image_name}" + +listen_ips="0.0.0.0" + +NODE_COUNT="${NODE_COUNT:-5}" + +declare -i core_base_port=50100 +declare -i core_p2p_base_port=50200 + +for ((i = 1; i <= NODE_COUNT; i++)); do + database_name="core_test_${i}" + echo "Creating database: ${database_name}" + # postgres_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' chainlink.postgres) + # TODO: use postgres db ip + host_postgres_url="postgresql://postgres:postgres@127.0.0.1:5432/postgres" + psql "${host_postgres_url}" -c "DROP DATABASE ${database_name};" &>/dev/null || true + psql "${host_postgres_url}" -c "CREATE DATABASE ${database_name};" &>/dev/null || true + + # TODO: remove this and use node ids + listen_args=() + for ip in $listen_ips; do + listen_args+=("-p" "${ip}:$((core_base_port + i - 1)):6688") + # listen_args+=("-p" "${ip}:$((core_p2p_base_port + i - 1)):6690") + done + + echo "Starting core container $i" + container_name="${container_name_prefix}.$i" + + # --rm \ + docker run \ + -d \ + $platform_arg \ + "${listen_args[@]}" \ + --add-host=host.containers.internal:host-gateway \ + --name "${container_name}" \ + --network-alias "${container_name}" \ + --network chainlink \ + -e "CL_CONFIG=${CL_CONFIG}" \ + -e "CL_DATABASE_URL=postgresql://postgres:postgres@chainlink.postgres:5432/${database_name}?sslmode=disable" \ + -e 'CL_PASSWORD_KEYSTORE=asdfasdfasdfasdf' \ + --entrypoint bash \ + "${image_name}" \ + -c \ + "echo -e \"${api_email}\\n${api_password}\" > /tmp/api_credentials && chainlink node start --api /tmp/api_credentials" + + echo "Waiting for core container to become ready.." + start_time=$(date +%s) + prev_output="" + while true; do + output=$(docker logs "${container_name}" 2>&1) + if [[ "${output}" != "${prev_output}" ]]; then + echo -n "${output#$prev_output}" + prev_output="${output}" + fi + + if [[ $output == *"Listening and serving HTTP"* ]]; then + echo "" + echo "node is ready." + break + fi + + current_time=$(date +%s) + elapsed_time=$((current_time - start_time)) + + if ((elapsed_time > 600)); then + echo "Error: Command did not become ready within 600 seconds" + exit 1 + fi + + sleep 3 + done +done diff --git a/scripts/devnet.down.sh b/scripts/devnet.down.sh new file mode 100755 index 000000000..6390ede42 --- /dev/null +++ b/scripts/devnet.down.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +echo "Cleaning up devnet container.." + +echo "Checking for existing 'chainlink-starknet.starknet-devnet' docker container..." +dpid=`docker ps -a | grep chainlink-starknet.starknet-devnet | awk '{print $1}'`; +if [ -z "$dpid" ] +then + echo "No docker devnet container running."; +else + docker kill $dpid; + docker rm $dpid; +fi + +echo "Cleanup finished." diff --git a/scripts/devnet.sh b/scripts/devnet.sh new file mode 100755 index 000000000..884bdd09e --- /dev/null +++ b/scripts/devnet.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# cpu_struct=`arch`; +# echo $cpu_struct; +cpu_struct="linux"; + +# Clean up first +bash "$(dirname -- "$0";)/devnet.down.sh" + +echo "Checking CPU structure..." +if [[ $cpu_struct == *"arm"* ]] +then + echo "Starting arm devnet container..." + container_version="d7c168ac53da3e9d717ed3ff8dad665ccade43e0-arm" +else + echo "Starting i386 devnet container..." + container_version="d7c168ac53da3e9d717ed3ff8dad665ccade43e0" +fi + +echo "Starting starknet-devnet" + +container_name="chainlink-starknet.starknet-devnet" + +# we need to replace the entrypoint because starknet-devnet's docker builds at 0.5.1 don't include cargo or gcc. +docker run \ + -p 127.0.0.1:5050:5050 \ + -p 127.0.0.1:8545:8545 \ + --rm \ + -d \ + --name "${container_name}" \ + --network-alias "${container_name}" \ + --network chainlink \ + "shardlabs/starknet-devnet-rs:${container_version}" \ + --seed 0 \ + --gas-price 1 \ + --account-class cairo1 + +# echo "Starting hardhat..." +# docker run --net container:chainlink-starknet.starknet-devnet -d --name chainlink-starknet.hardhat ethereumoptimism/hardhat-node:nightly + +# starknet-devnet startup is slow and requires compiling cairo. +echo "Waiting for starknet-devnet to become ready.." +start_time=$(date +%s) +prev_output="" +while true +do + output=$(docker logs chainlink-starknet.starknet-devnet 2>&1) + if [[ "${output}" != "${prev_output}" ]]; then + echo -n "${output#$prev_output}" + prev_output="${output}" + fi + + if [[ $output == *"listening"* ]]; then + echo "" + echo "starknet-devnet is ready." + exit 0 + fi + + current_time=$(date +%s) + elapsed_time=$((current_time - start_time)) + + if (( elapsed_time > 600 )); then + echo "Error: Command did not become ready within 600 seconds" + exit 1 + fi + + sleep 3 +done diff --git a/scripts/mock-adapter.down.sh b/scripts/mock-adapter.down.sh new file mode 100755 index 000000000..69a79bed6 --- /dev/null +++ b/scripts/mock-adapter.down.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Killing any running mock-adapter processes.." +killall "dummy-external-adapter" &>/dev/null || true +echo "Done." diff --git a/scripts/mock-adapter.sh b/scripts/mock-adapter.sh new file mode 100755 index 000000000..d8b4bf8b5 --- /dev/null +++ b/scripts/mock-adapter.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cache_path="$(git rev-parse --show-toplevel)/.local-mock-server" +binary_name="dummy-external-adapter" +binary_path="${cache_path}/bin/${binary_name}" + +bash "$(dirname -- "$0")/mock-adapter.down.sh" + +listen_address="0.0.0.0:6060" +echo "Listen address: ${listen_address}" + +if [ ! -f "${binary_path}" ]; then + echo "Installing mock-adapter" + export GOPATH="${cache_path}" + export GOBIN="${cache_path}/bin" + go install 'github.com/smartcontractkit/dummy-external-adapter@latest' +fi + +nohup "${binary_path}" "${listen_address}" &>/dev/null & +echo "Started mock-adapter (PID $!)" diff --git a/scripts/postgres.down.sh b/scripts/postgres.down.sh new file mode 100755 index 000000000..667b917ed --- /dev/null +++ b/scripts/postgres.down.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# TODO: this script needs to be replaced with a predefined K8s enviroment + +echo "Cleaning up postgres container.." + +echo "Checking for existing 'chainlink.postgres' docker container..." +dpid=$(docker ps -a | grep chainlink.postgres | awk '{print $1}') +if [ -z "$dpid" ]; then + echo "No docker postgres container running." +else + docker kill $dpid + docker rm $dpid +fi + +echo "Cleanup finished." diff --git a/scripts/postgres.sh b/scripts/postgres.sh new file mode 100755 index 000000000..cf4f6e7b3 --- /dev/null +++ b/scripts/postgres.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +container_name="chainlink.postgres" +container_version="15.2-alpine" + +set -euo pipefail + +bash "$(dirname -- "$0")/postgres.down.sh" + +listen_ips="0.0.0.0" + +echo "Starting postgres container" + +listen_args=() +for ip in $listen_ips; do + listen_args+=("-p" "${ip}:5432:5432") +done + +docker run \ + "${listen_args[@]}" \ + -d \ + --name "${container_name}" \ + --network-alias "${container_name}" \ + --network chainlink \ + -e POSTGRES_USER=postgres \ + -e POSTGRES_PASSWORD=postgres \ + -e POSTGRES_DB=chainlink_test \ + "postgres:${container_version}" \ + -c 'listen_addresses=*' + +echo "Waiting for postgres container to become ready.." +start_time=$(date +%s) +prev_output="" +while true; do + output=$(docker logs "${container_name}" 2>&1) + if [[ "${output}" != "${prev_output}" ]]; then + echo -n "${output#$prev_output}" + prev_output="${output}" + fi + + if [[ $output == *"listening on IPv4 address"* ]]; then + echo "" + echo "postgres is ready." + exit 0 + fi + + current_time=$(date +%s) + elapsed_time=$((current_time - start_time)) + + if ((elapsed_time > 600)); then + echo "Error: Command did not become ready within 600 seconds" + exit 1 + fi + + sleep 3 +done diff --git a/shell.nix b/shell.nix index 4fb605bef..851ebfbc6 100644 --- a/shell.nix +++ b/shell.nix @@ -5,17 +5,12 @@ buildInputs = with pkgs; [ stdenv.cc.cc.lib (rust-bin.stable.latest.default.override { extensions = ["rust-src"]; }) - python39 - python39Packages.pip - python39Packages.venvShellHook - python39Packages.fastecdsa # so libgmp is correctly sourced - zlib # for numpy - gmp nodejs-18_x (yarn.override { nodejs = nodejs-18_x; }) nodePackages.typescript nodePackages.typescript-language-server nodePackages.npm + python3 go_1_21 gopls @@ -23,11 +18,11 @@ (golangci-lint.override { buildGoModule = buildGo121Module; }) gotools - kube3d kubectl - k9s kubernetes-helm + postgresql_15 # psql + ] ++ lib.optionals stdenv.isLinux [ # ledger specific packages libudev-zero @@ -36,6 +31,4 @@ LD_LIBRARY_PATH = lib.makeLibraryPath [pkgs.zlib stdenv.cc.cc.lib]; # lib64 HELM_REPOSITORY_CONFIG = "./.helm-repositories.yaml"; - - venvDir = "./.venv"; } diff --git a/vendor/cairo b/vendor/cairo index ad5570f0f..6f359c1c6 160000 --- a/vendor/cairo +++ b/vendor/cairo @@ -1 +1 @@ -Subproject commit ad5570f0f25dbbffd9daedf02df140ff9e7291e4 +Subproject commit 6f359c1c6f081f76abe0721c6b8897e6e29ab9ae diff --git a/vendor/scarb b/vendor/scarb index 58cc88efb..5dbab1f31 160000 --- a/vendor/scarb +++ b/vendor/scarb @@ -1 +1 @@ -Subproject commit 58cc88efb4f8b9923735931e47d72912457ec321 +Subproject commit 5dbab1f31879bf8fd2104830270cd2e9062c3b08 diff --git a/yarn.lock b/yarn.lock index 0c323aec5..7eac26876 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,11 +16,11 @@ "@jridgewell/trace-mapping" "^0.3.9" "@babel/code-frame@^7.0.0": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" - integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== dependencies: - "@babel/highlight" "^7.22.10" + "@babel/highlight" "^7.23.4" chalk "^2.4.2" "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": @@ -149,11 +149,16 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1", "@babel/helper-validator-identifier@^7.22.5": +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== +"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" @@ -168,7 +173,7 @@ "@babel/traverse" "^7.20.1" "@babel/types" "^7.20.0" -"@babel/highlight@^7.18.6", "@babel/highlight@^7.22.10": +"@babel/highlight@^7.18.6": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== @@ -177,6 +182,15 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@7.18.4": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" @@ -278,17 +292,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" -"@babel/runtime@^7.15.4": - version "7.22.11" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.11.tgz#7a9ba3bbe406ad6f9e8dd4da2ece453eb23a77a4" - integrity sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/runtime@^7.20.1", "@babel/runtime@^7.5.5": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" - integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== +"@babel/runtime@^7.15.4", "@babel/runtime@^7.20.1", "@babel/runtime@^7.5.5": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" + integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw== dependencies: regenerator-runtime "^0.14.0" @@ -349,11 +356,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@chainlink-dev/starkgate-open-zeppelin@^0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@chainlink-dev/starkgate-open-zeppelin/-/starkgate-open-zeppelin-0.6.1.tgz#00ff367defcff07e4351ea0a8a7eedaaa8d657fd" - integrity sha512-Iv0ML3XquBVSJ4OISlyuCyzw44Jor0Ls8Zqoa/zq6cNL0gBXTbiGv/p53fCykTBVcjFVGwnFeXhmy1Avlwlh6w== - "@chainlink/contracts@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@chainlink/contracts/-/contracts-0.4.2.tgz#2928a35e8da94664b8ffeb8f5a54b1a3f14d5b3f" @@ -455,16 +457,16 @@ "@chainsafe/persistent-merkle-tree" "^0.4.2" case "^1.6.3" -"@changesets/apply-release-plan@^6.1.4": - version "6.1.4" - resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-6.1.4.tgz#09293256090737ecd2f683842d6d732034a5e3c8" - integrity sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew== +"@changesets/apply-release-plan@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.0.tgz#ce3c3dfc5720550a5d592b54ad2f411f816ec5ff" + integrity sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/config" "^2.3.1" - "@changesets/get-version-range-type" "^0.3.2" - "@changesets/git" "^2.0.0" - "@changesets/types" "^5.2.1" + "@changesets/config" "^3.0.0" + "@changesets/get-version-range-type" "^0.4.0" + "@changesets/git" "^3.0.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" detect-indent "^6.0.0" fs-extra "^7.0.1" @@ -474,54 +476,53 @@ resolve-from "^5.0.0" semver "^7.5.3" -"@changesets/assemble-release-plan@^5.2.4": - version "5.2.4" - resolved "https://registry.yarnpkg.com/@changesets/assemble-release-plan/-/assemble-release-plan-5.2.4.tgz#d42fd63f4297a2e630e8e0a49f07d4ff5f5ef7bc" - integrity sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg== +"@changesets/assemble-release-plan@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.0.tgz#c69969b4bef7c32a8544b6941d1053260ca47e05" + integrity sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.6" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" semver "^7.5.3" -"@changesets/changelog-git@^0.1.14": - version "0.1.14" - resolved "https://registry.yarnpkg.com/@changesets/changelog-git/-/changelog-git-0.1.14.tgz#852caa7727dcf91497c131d05bc2cd6248532ada" - integrity sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA== +"@changesets/changelog-git@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@changesets/changelog-git/-/changelog-git-0.2.0.tgz#1f3de11becafff5a38ebe295038a602403c93a86" + integrity sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" "@changesets/cli@^2.22.0": - version "2.26.2" - resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.26.2.tgz#8914dd6ef3ea425a7d5935f6c35a8b7ccde54e45" - integrity sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig== + version "2.27.1" + resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.27.1.tgz#abce480fd30b9abbe2cfcf07d5d668c364ce2804" + integrity sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/apply-release-plan" "^6.1.4" - "@changesets/assemble-release-plan" "^5.2.4" - "@changesets/changelog-git" "^0.1.14" - "@changesets/config" "^2.3.1" - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.6" - "@changesets/get-release-plan" "^3.0.17" - "@changesets/git" "^2.0.0" - "@changesets/logger" "^0.0.5" - "@changesets/pre" "^1.0.14" - "@changesets/read" "^0.5.9" - "@changesets/types" "^5.2.1" - "@changesets/write" "^0.2.3" + "@changesets/apply-release-plan" "^7.0.0" + "@changesets/assemble-release-plan" "^6.0.0" + "@changesets/changelog-git" "^0.2.0" + "@changesets/config" "^3.0.0" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/get-release-plan" "^4.0.0" + "@changesets/git" "^3.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/pre" "^2.0.0" + "@changesets/read" "^0.6.0" + "@changesets/types" "^6.0.0" + "@changesets/write" "^0.3.0" "@manypkg/get-packages" "^1.1.3" - "@types/is-ci" "^3.0.0" "@types/semver" "^7.5.0" ansi-colors "^4.1.3" chalk "^2.1.0" + ci-info "^3.7.0" enquirer "^2.3.0" external-editor "^3.1.0" fs-extra "^7.0.1" human-id "^1.0.2" - is-ci "^3.0.1" meow "^6.0.0" outdent "^0.5.0" p-limit "^2.2.0" @@ -532,104 +533,104 @@ term-size "^2.1.0" tty-table "^4.1.5" -"@changesets/config@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@changesets/config/-/config-2.3.1.tgz#3d4a1dc866c3623375180b30f69fccdf0e3efebf" - integrity sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w== +"@changesets/config@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@changesets/config/-/config-3.0.0.tgz#a1a1cafc77134b117b4a9266459c84fdd360a6be" + integrity sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA== dependencies: - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.6" - "@changesets/logger" "^0.0.5" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" micromatch "^4.0.2" -"@changesets/errors@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@changesets/errors/-/errors-0.1.4.tgz#f79851746c43679a66b383fdff4c012f480f480d" - integrity sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q== +"@changesets/errors@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@changesets/errors/-/errors-0.2.0.tgz#3c545e802b0f053389cadcf0ed54e5636ff9026a" + integrity sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow== dependencies: extendable-error "^0.1.5" -"@changesets/get-dependents-graph@^1.3.6": - version "1.3.6" - resolved "https://registry.yarnpkg.com/@changesets/get-dependents-graph/-/get-dependents-graph-1.3.6.tgz#5e19e7b0bfbc7dc38e1986eaaa7016ff377ed888" - integrity sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q== +"@changesets/get-dependents-graph@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@changesets/get-dependents-graph/-/get-dependents-graph-2.0.0.tgz#97f0cc9fbec436e0d6ab95a6a59c08acf21ac714" + integrity sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" chalk "^2.1.0" fs-extra "^7.0.1" semver "^7.5.3" -"@changesets/get-release-plan@^3.0.17": - version "3.0.17" - resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-3.0.17.tgz#8aabced2795ffeae864696b60ee3031f8a94c5f3" - integrity sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw== +"@changesets/get-release-plan@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-4.0.0.tgz#8cb057da90a08796a335dfd18073234d33902069" + integrity sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/assemble-release-plan" "^5.2.4" - "@changesets/config" "^2.3.1" - "@changesets/pre" "^1.0.14" - "@changesets/read" "^0.5.9" - "@changesets/types" "^5.2.1" + "@changesets/assemble-release-plan" "^6.0.0" + "@changesets/config" "^3.0.0" + "@changesets/pre" "^2.0.0" + "@changesets/read" "^0.6.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" -"@changesets/get-version-range-type@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz#8131a99035edd11aa7a44c341cbb05e668618c67" - integrity sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg== +"@changesets/get-version-range-type@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz#429a90410eefef4368502c41c63413e291740bf5" + integrity sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ== -"@changesets/git@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@changesets/git/-/git-2.0.0.tgz#8de57649baf13a86eb669a25fa51bcad5cea517f" - integrity sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A== +"@changesets/git@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@changesets/git/-/git-3.0.0.tgz#e71d003752a97bc27988db6d410e0038a4a88055" + integrity sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" is-subdir "^1.1.1" micromatch "^4.0.2" spawndamnit "^2.0.0" -"@changesets/logger@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@changesets/logger/-/logger-0.0.5.tgz#68305dd5a643e336be16a2369cb17cdd8ed37d4c" - integrity sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw== +"@changesets/logger@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@changesets/logger/-/logger-0.1.0.tgz#2d2a58536c5beeeaef52ab464931d99fcf24f17b" + integrity sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g== dependencies: chalk "^2.1.0" -"@changesets/parse@^0.3.16": - version "0.3.16" - resolved "https://registry.yarnpkg.com/@changesets/parse/-/parse-0.3.16.tgz#f8337b70aeb476dc81745ab3294022909bc4a84a" - integrity sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg== +"@changesets/parse@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@changesets/parse/-/parse-0.4.0.tgz#5cabbd9844b3b213cb83f5edb5768454c70dd2b4" + integrity sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" js-yaml "^3.13.1" -"@changesets/pre@^1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@changesets/pre/-/pre-1.0.14.tgz#9df73999a4d15804da7381358d77bb37b00ddf0f" - integrity sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ== +"@changesets/pre@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@changesets/pre/-/pre-2.0.0.tgz#ad3edf3d6ac287991d7ef5e26cf280d03c9e3764" + integrity sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" -"@changesets/read@^0.5.9": - version "0.5.9" - resolved "https://registry.yarnpkg.com/@changesets/read/-/read-0.5.9.tgz#a1b63a82b8e9409738d7a0f9cc39b6d7c28cbab0" - integrity sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ== +"@changesets/read@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@changesets/read/-/read-0.6.0.tgz#27e13b58d0b0eb3b0a5cba48a3f4f71f05ef4610" + integrity sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/git" "^2.0.0" - "@changesets/logger" "^0.0.5" - "@changesets/parse" "^0.3.16" - "@changesets/types" "^5.2.1" + "@changesets/git" "^3.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/parse" "^0.4.0" + "@changesets/types" "^6.0.0" chalk "^2.1.0" fs-extra "^7.0.1" p-filter "^2.1.0" @@ -639,18 +640,18 @@ resolved "https://registry.yarnpkg.com/@changesets/types/-/types-4.1.0.tgz#fb8f7ca2324fd54954824e864f9a61a82cb78fe0" integrity sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw== -"@changesets/types@^5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@changesets/types/-/types-5.2.1.tgz#a228c48004aa8a93bce4be2d1d31527ef3bf21f6" - integrity sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg== +"@changesets/types@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@changesets/types/-/types-6.0.0.tgz#e46abda9890610dd1fbe1617730173d2267544bd" + integrity sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ== -"@changesets/write@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@changesets/write/-/write-0.2.3.tgz#baf6be8ada2a67b9aba608e251bfea4fdc40bc63" - integrity sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw== +"@changesets/write@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@changesets/write/-/write-0.3.0.tgz#c6c5bc390cce4031da20eab8a4ca2d71453a1985" + integrity sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" fs-extra "^7.0.1" human-id "^1.0.2" prettier "^2.7.1" @@ -670,14 +671,14 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz#8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c" - integrity sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ== + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" - integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -689,10 +690,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.49.0": - version "8.49.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" - integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== +"@eslint/js@8.56.0": + version "8.56.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" + integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== "@eth-optimism/contracts@^0.5.21": version "0.5.37" @@ -730,6 +731,20 @@ resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-4.0.4.tgz#f13fea29922d87a4d2e7c4fc8fe72ea04d2c13de" integrity sha512-LwEj5SIuEe9/gnrXgtqIkWbk2g15imM/qcJcxpLyAkOj981tQxXmtV4XmQMZsdedEsZ/D/rbUAOtZbgwqgUwQA== +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== + dependencies: + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" + "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" @@ -1098,13 +1113,18 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@humanwhocodes/config-array@^0.11.11": - version "0.11.11" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" - integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== +"@fastify/busboy@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" + integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== + +"@humanwhocodes/config-array@^0.11.13": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -1112,10 +1132,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" + integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== "@iarna/toml@^2.2.5": version "2.2.5" @@ -1369,12 +1389,12 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": +"@jridgewell/resolve-uri@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== @@ -1428,14 +1448,14 @@ rxjs "6" semver "^7.3.5" -"@ledgerhq/devices@^8.0.7": - version "8.0.7" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.7.tgz#206434dbd8a097529bbfc95f5eef94c2923c7578" - integrity sha512-BbPyET52lXnVs7CxJWrGYqmtGdbGzj+XnfCqLsDnA7QYr1CZREysxmie+Rr6BKpNDBRVesAovXjtaVaZOn+upw== +"@ledgerhq/devices@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.2.0.tgz#ef67bf49628252d1779acaa151b1a941acba790e" + integrity sha512-XROTW2gTmmuy+YPPDjdtKKTQ3mfxrPtKtV+a9QFbj8f5MnjVMV0Zpy1BIB4CyIMsVVi4z6+nI67auT7IlsM3SQ== dependencies: - "@ledgerhq/errors" "^6.14.0" - "@ledgerhq/logs" "^6.10.1" - rxjs "6" + "@ledgerhq/errors" "^6.16.1" + "@ledgerhq/logs" "^6.12.0" + rxjs "^7.8.1" semver "^7.3.5" "@ledgerhq/errors@^6.11.1", "@ledgerhq/errors@^6.12.3": @@ -1443,10 +1463,10 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.13.1.tgz#fd9570c1806824de734aed21df1a3d643ba8ed0c" integrity sha512-y5qOFiX7ILACF7GvCAB67S5nCABEP5rm8lxK66qKIBRApcLlTplbjUACDRfKQbAIwf0SJPuR31rtTKB92ykwKQ== -"@ledgerhq/errors@^6.14.0": - version "6.14.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.14.0.tgz#0bf253983773ef12eebce2091f463bc719223b37" - integrity sha512-ZWJw2Ti6Dq1Ott/+qYqJdDWeZm16qI3VNG5rFlb0TQ3UcAyLIQZbnnzzdcVVwVeZiEp66WIpINd/pBdqsHVyOA== +"@ledgerhq/errors@^6.16.1": + version "6.16.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.16.1.tgz#df650a9ba105397dee2e8c0ceddf6931c5b25ede" + integrity sha512-4D4wKecGzQpIu7sx03Sg4uE1e8g1oZUndWgw9gw776H8h9ov9c5TxPaldTn2j6orPECAERViLf7LTO4L5pE2Cw== "@ledgerhq/hw-app-starknet@^2.0.3": version "2.0.3" @@ -1457,27 +1477,27 @@ "@types/bn.js" "^5.1.1" bn.js "^5.2.1" -"@ledgerhq/hw-transport-node-hid-noevents@^6.27.19": - version "6.27.19" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.27.19.tgz#3bbb6b02c7cab30519b1bf8b8e490d27d70d32a2" - integrity sha512-zOIB1fBiQH9ZYFzoEpNY4n1lE7bGPgRT+k85fKuLM7cxxm5Sy+TgrdxImvBz0IQUS8EvrtZCm+dVWkb2sH/6OA== +"@ledgerhq/hw-transport-node-hid-noevents@^6.29.1": + version "6.29.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.29.1.tgz#e819aa189157d34a1c2beba4f749bd424213e05d" + integrity sha512-eJms10MVMlWQHLrseyThZ5rrVSVRr/fRmqiHsbldprK2Xh3hl9BFp7gCJ7W8BJe8WxrndkztgRvf2ZLknb8+/Q== dependencies: - "@ledgerhq/devices" "^8.0.7" - "@ledgerhq/errors" "^6.14.0" - "@ledgerhq/hw-transport" "^6.28.8" - "@ledgerhq/logs" "^6.10.1" + "@ledgerhq/devices" "^8.2.0" + "@ledgerhq/errors" "^6.16.1" + "@ledgerhq/hw-transport" "^6.30.1" + "@ledgerhq/logs" "^6.12.0" node-hid "^2.1.2" "@ledgerhq/hw-transport-node-hid@^6.27.6": - version "6.27.21" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.27.21.tgz#44bc003a0279296e1d613ddaada5005638aa0217" - integrity sha512-8G3Owpa2ex+TkGQSMkKoAbMEGZ7a23g0wZUvVzalQphMqbayebMhuXxue8iPp7F9pulm7uyLxgMYptYyw5i4yQ== - dependencies: - "@ledgerhq/devices" "^8.0.7" - "@ledgerhq/errors" "^6.14.0" - "@ledgerhq/hw-transport" "^6.28.8" - "@ledgerhq/hw-transport-node-hid-noevents" "^6.27.19" - "@ledgerhq/logs" "^6.10.1" + version "6.28.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.28.1.tgz#4e3c54b4267ad071aa272e2794edcf47feb7f8a6" + integrity sha512-9aM9qVXMq/GLjYg3qm+LuzIdgbdihFhyrKb7mVDXyuUlu2f4JeGGrCnF+DfSXTMuGIMRJ8W6I/2yrO1CcB3sIA== + dependencies: + "@ledgerhq/devices" "^8.2.0" + "@ledgerhq/errors" "^6.16.1" + "@ledgerhq/hw-transport" "^6.30.1" + "@ledgerhq/hw-transport-node-hid-noevents" "^6.29.1" + "@ledgerhq/logs" "^6.12.0" lodash "^4.17.21" node-hid "^2.1.2" usb "2.9.0" @@ -1491,19 +1511,20 @@ "@ledgerhq/errors" "^6.11.1" events "^3.3.0" -"@ledgerhq/hw-transport@^6.28.8": - version "6.28.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.8.tgz#f99a5c71c5c09591e9bfb1b970c42aafbe81351f" - integrity sha512-XxQVl4htd018u/M66r0iu5nlHi+J6QfdPsORzDF6N39jaz+tMqItb7tUlXM/isggcuS5lc7GJo7NOuJ8rvHZaQ== +"@ledgerhq/hw-transport@^6.30.1": + version "6.30.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.30.1.tgz#fd3c825f41197aeaf705e3c066f82843eaf48cae" + integrity sha512-Xeeo4nt33g5Fsp3CdsPvcc2Uk7dwYeKRSlSFLWcYAAKprf/PmxgNekhke1eaNU/wLoeLOWhY2Cki8F8w9nLMdQ== dependencies: - "@ledgerhq/devices" "^8.0.7" - "@ledgerhq/errors" "^6.14.0" + "@ledgerhq/devices" "^8.2.0" + "@ledgerhq/errors" "^6.16.1" + "@ledgerhq/logs" "^6.12.0" events "^3.3.0" -"@ledgerhq/logs@^6.10.1": - version "6.10.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d" - integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w== +"@ledgerhq/logs@^6.10.1", "@ledgerhq/logs@^6.12.0": + version "6.12.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.12.0.tgz#ad903528bf3687a44da435d7b2479d724d374f5d" + integrity sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA== "@manypkg/find-root@^1.1.0": version "1.1.0" @@ -1538,28 +1559,47 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" -"@noble/curves@~1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.0.0.tgz#e40be8c7daf088aaf291887cbc73f43464a92932" - integrity sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw== +"@noble/curves@1.1.0", "@noble/curves@~1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" + integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== dependencies: - "@noble/hashes" "1.3.0" + "@noble/hashes" "1.3.1" + +"@noble/curves@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + +"@noble/curves@~1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" + integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== + dependencies: + "@noble/hashes" "1.3.3" "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== -"@noble/hashes@1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" - integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg== +"@noble/hashes@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" + integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== -"@noble/hashes@~1.3.0": +"@noble/hashes@1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== +"@noble/hashes@1.3.3", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1", "@noble/hashes@~1.3.2", "@noble/hashes@~1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" + integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -1586,31 +1626,31 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/ethereumjs-block@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" - integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-block@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz#13a7968f5964f1697da941281b7f7943b0465d04" + integrity sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" ethereum-cryptography "0.1.3" ethers "^5.7.1" -"@nomicfoundation/ethereumjs-blockchain@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" - integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-ethash" "3.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-blockchain@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz#45323b673b3d2fab6b5008535340d1b8fea7d446" + integrity sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-ethash" "3.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" abstract-level "^1.0.3" debug "^4.3.3" ethereum-cryptography "0.1.3" @@ -1618,103 +1658,103 @@ lru-cache "^5.1.1" memory-level "^1.0.0" -"@nomicfoundation/ethereumjs-common@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" - integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== +"@nomicfoundation/ethereumjs-common@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz#a15d1651ca36757588fdaf2a7d381a150662a3c3" + integrity sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg== dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.2" crc-32 "^1.2.0" -"@nomicfoundation/ethereumjs-ethash@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" - integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== +"@nomicfoundation/ethereumjs-ethash@3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz#da77147f806401ee996bfddfa6487500118addca" + integrity sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg== dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" abstract-level "^1.0.3" bigint-crypto-utils "^3.0.23" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-evm@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" - integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== +"@nomicfoundation/ethereumjs-evm@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz#4c2f4b84c056047102a4fa41c127454e3f0cfcf6" + integrity sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ== dependencies: "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" mcl-wasm "^0.7.1" rustbn.js "~0.2.0" -"@nomicfoundation/ethereumjs-rlp@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" - integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== +"@nomicfoundation/ethereumjs-rlp@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz#4fee8dc58a53ac6ae87fb1fca7c15dc06c6b5dea" + integrity sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA== -"@nomicfoundation/ethereumjs-statemanager@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" - integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== +"@nomicfoundation/ethereumjs-statemanager@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz#3ba4253b29b1211cafe4f9265fee5a0d780976e0" + integrity sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA== dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" ethers "^5.7.1" js-sdsl "^4.1.4" -"@nomicfoundation/ethereumjs-trie@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" - integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== +"@nomicfoundation/ethereumjs-trie@6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz#9a6dbd28482dca1bc162d12b3733acab8cd12835" + integrity sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ== dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" "@types/readable-stream" "^2.3.13" ethereum-cryptography "0.1.3" readable-stream "^3.6.0" -"@nomicfoundation/ethereumjs-tx@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" - integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== +"@nomicfoundation/ethereumjs-tx@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz#117813b69c0fdc14dd0446698a64be6df71d7e56" + integrity sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g== dependencies: "@chainsafe/ssz" "^0.9.2" "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-util@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" - integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== +"@nomicfoundation/ethereumjs-util@9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz#16bdc1bb36f333b8a3559bbb4b17dac805ce904d" + integrity sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ== dependencies: "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-vm@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" - integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-vm@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz#3b0852cb3584df0e18c182d0672a3596c9ca95e6" + integrity sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" mcl-wasm "^0.7.1" @@ -1812,9 +1852,9 @@ integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== "@openzeppelin/contracts@^4.7.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.3.tgz#00d7a8cf35a475b160b3f0293a6403c511099364" - integrity sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg== + version "4.9.5" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" + integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== "@pkgjs/parseargs@^0.11.0": version "0.11.0" @@ -1904,10 +1944,10 @@ resolved "https://registry.yarnpkg.com/@rometools/cli-win32-x64/-/cli-win32-x64-12.1.3.tgz#b4f53491d2ca8f1234b3613b7cc73418ad8d76bb" integrity sha512-yHSKYidqJMV9nADqg78GYA+cZ0hS1twANAjiFibQdXj9aGzD+s/IzIFEIi/U/OBLvWYg/SCw0QVozi2vTlKFDQ== -"@scure/base@~1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== +"@scure/base@~1.1.0", "@scure/base@~1.1.3": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157" + integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== "@scure/bip32@1.1.5": version "1.1.5" @@ -1918,6 +1958,15 @@ "@noble/secp256k1" "~1.7.0" "@scure/base" "~1.1.0" +"@scure/bip32@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" + integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== + dependencies: + "@noble/curves" "~1.1.0" + "@noble/hashes" "~1.3.1" + "@scure/base" "~1.1.0" + "@scure/bip39@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" @@ -1926,6 +1975,30 @@ "@noble/hashes" "~1.2.0" "@scure/base" "~1.1.0" +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" + +"@scure/starknet@~0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@scure/starknet/-/starknet-0.3.0.tgz#b8273a42fc721025f8098b1f1d96368a7067e1c4" + integrity sha512-Ma66yZlwa5z00qI5alSxdWtIpky5LBhy22acVFdoC5kwwbd9uDyMWEYzWHdNyKmQg9t5Y2UOXzINMeb3yez+Gw== + dependencies: + "@noble/curves" "~1.2.0" + "@noble/hashes" "~1.3.2" + +"@scure/starknet@~1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@scure/starknet/-/starknet-1.0.0.tgz#4419bc2fdf70f3dd6cb461d36c878c9ef4419f8c" + integrity sha512-o5J57zY0f+2IL/mq8+AYJJ4Xpc1fOtDhr+mFQKbHnYFmm3WQrC+8zj2HEgxak1a+x86mhmBC1Kq305KUpVf0wg== + dependencies: + "@noble/curves" "~1.3.0" + "@noble/hashes" "~1.3.3" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -1995,9 +2068,9 @@ tslib "^1.9.3" "@shardlabs/starknet-hardhat-plugin@^0.8.0-alpha.0", "@shardlabs/starknet-hardhat-plugin@^0.8.0-alpha.2": - version "0.8.0-alpha.4" - resolved "https://registry.yarnpkg.com/@shardlabs/starknet-hardhat-plugin/-/starknet-hardhat-plugin-0.8.0-alpha.4.tgz#7ba13736cf0abf0ab296eec4550603e38659eb46" - integrity sha512-RlhyXWfLu4CfLR83DcmJHKB5e1VB+t6pF5MVyQgkapSEVScMoBwDaNQJZzM+4nDViAm2/MqXib/gGM5HIW8+0w== + version "0.8.0-alpha.5" + resolved "https://registry.yarnpkg.com/@shardlabs/starknet-hardhat-plugin/-/starknet-hardhat-plugin-0.8.0-alpha.5.tgz#86539fb9840cac45039ed0a62fc919e87608957a" + integrity sha512-CGR4ft6IK8TCTYkX5AXGypUuKBqaEptPcEZq6a6UcFG/DUQqME+l7kPKtVYWwms4QEi3OGrcfexPm7kTYyxkyQ== dependencies: "@iarna/toml" "^2.2.5" "@nomiclabs/hardhat-docker" "^2.0.2" @@ -2008,6 +2081,7 @@ glob "^10.0.0" shelljs "^0.8.5" starknet "~5.19.3" + tar-fs "^3.0.4" "@sinclair/typebox@^0.24.1": version "0.24.51" @@ -2029,9 +2103,9 @@ "@sinonjs/commons" "^1.7.0" "@solidity-parser/parser@^0.16.0": - version "0.16.1" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.1.tgz#f7c8a686974e1536da0105466c4db6727311253c" - integrity sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw== + version "0.16.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.2.tgz#42cb1e3d88b3e8029b0c9befff00b634cd92d2fa" + integrity sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg== dependencies: antlr4ts "^0.5.0-alpha.4" @@ -2051,9 +2125,9 @@ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@types/babel__core@^7.1.14": version "7.1.19" @@ -2088,10 +2162,10 @@ dependencies: "@babel/types" "^7.3.0" -"@types/bn.js@*", "@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== +"@types/bn.js@*", "@types/bn.js@^5.1.0": + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== dependencies: "@types/node" "*" @@ -2102,6 +2176,13 @@ dependencies: "@types/node" "*" +"@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + "@types/chai-as-promised@^7.1.3": version "7.1.5" resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" @@ -2115,14 +2196,14 @@ integrity sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw== "@types/chai@^4.3.3": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" - integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== + version "4.3.11" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c" + integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ== "@types/elliptic@^6.4.14": - version "6.4.14" - resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.14.tgz#7bbaad60567a588c1f08b10893453e6b9b4de48e" - integrity sha512-z4OBcDAU0GVwDTuwJzQCiL6188QvZMkvoERgcVjq0/mPM8jCfdwZ3x5zQEVoL9WCAru3aG5wl3Z5Ww5wBWn7ZQ== + version "6.4.18" + resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.18.tgz#bc96e26e1ccccbabe8b6f0e409c85898635482e1" + integrity sha512-UseG6H5vjRiNpQvrhy4VF/JXdA3V/Fp5amvveaL+fs28BZ6xIKJBPnUPRlEaZpysD9MbpfaLi8lbl7PGUAkpWw== dependencies: "@types/bn.js" "*" @@ -2141,13 +2222,6 @@ dependencies: "@types/node" "*" -"@types/is-ci@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/is-ci/-/is-ci-3.0.0.tgz#7e8910af6857601315592436f030aaa3ed9783c3" - integrity sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ== - dependencies: - ci-info "^3.1.0" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -2176,9 +2250,9 @@ pretty-format "^28.0.0" "@types/json-schema@^7.0.12": - version "7.0.13" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" - integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/long@^4.0.1": version "4.0.2" @@ -2196,9 +2270,9 @@ integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== "@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" + integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/mocha@^9.1.1": version "9.1.1" @@ -2206,9 +2280,11 @@ integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@types/node@*": - version "20.4.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.9.tgz#c7164e0f8d3f12dfae336af0b1f7fdec8c6b204f" - integrity sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ== + version "20.11.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.1.tgz#6a93f94abeda166f688d3d2aca18012afbe5f850" + integrity sha512-DsXojJUES2M+FE8CpptJTKpg+r54moV9ZEncPstni1WHFmTcCzeFLnMFfyhCVS8XNOy/OQG+8lVxRLRrVHmV5A== + dependencies: + undici-types "~5.26.4" "@types/node@>=13.7.0": version "18.11.2" @@ -2221,19 +2297,21 @@ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/node@^18.7.11": - version "18.17.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.5.tgz#c58b12bca8c2a437b38c15270615627e96dd0bc5" - integrity sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA== + version "18.19.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.7.tgz#9a5f6ac7ec42a5dff68fe7faf2dd359710de4a12" + integrity sha512-IGRJfoNX10N/PfrReRZ1br/7SQ+2vF/tK3KXNwzXz82D32z5dMQEoOlFew18nLSN+vMNcLY4GrKfzwi/yWI8/w== + dependencies: + undici-types "~5.26.4" "@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + version "2.4.4" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" + integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== "@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.2.tgz#2dc43808e9985a2c69ff02e2d2027bd4fe33e8dc" + integrity sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew== dependencies: "@types/node" "*" @@ -2251,16 +2329,16 @@ safe-buffer "~5.1.1" "@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" + integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== dependencies: "@types/node" "*" "@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "7.5.6" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" + integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== "@types/stack-utils@^2.0.0": version "2.0.1" @@ -2268,9 +2346,9 @@ integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/w3c-web-usb@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/w3c-web-usb/-/w3c-web-usb-1.0.6.tgz#5d8560d0d9f585ffc80865bc773db7bc975b680c" - integrity sha512-cSjhgrr8g4KbPnnijAr/KJDNKa/bBa+ixYkywFRvrhvi9n1WEl7yYbtRyzE6jqNQiSxxJxoAW3STaOQwJHndaw== + version "1.0.10" + resolved "https://registry.yarnpkg.com/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz#cf89cccd2d93b6245e784c19afe0a9f5038d4528" + integrity sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ== "@types/yargs-parser@*": version "21.0.0" @@ -2285,15 +2363,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz#f18cc75c9cceac8080a9dc2e7d166008c5207b9f" - integrity sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q== + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.1.tgz#0df881a47da1c1a9774f39495f5f7052f86b72e0" + integrity sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.7.2" - "@typescript-eslint/type-utils" "6.7.2" - "@typescript-eslint/utils" "6.7.2" - "@typescript-eslint/visitor-keys" "6.7.2" + "@typescript-eslint/scope-manager" "6.18.1" + "@typescript-eslint/type-utils" "6.18.1" + "@typescript-eslint/utils" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2302,73 +2380,79 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.2.tgz#e0ae93771441b9518e67d0660c79e3a105497af4" - integrity sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw== - dependencies: - "@typescript-eslint/scope-manager" "6.7.2" - "@typescript-eslint/types" "6.7.2" - "@typescript-eslint/typescript-estree" "6.7.2" - "@typescript-eslint/visitor-keys" "6.7.2" + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.18.1.tgz#3c3987e186b38c77b30b6bfa5edf7c98ae2ec9d3" + integrity sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA== + dependencies: + "@typescript-eslint/scope-manager" "6.18.1" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/typescript-estree" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz#cf59a2095d2f894770c94be489648ad1c78dc689" - integrity sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw== +"@typescript-eslint/scope-manager@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.18.1.tgz#28c31c60f6e5827996aa3560a538693cb4bd3848" + integrity sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw== dependencies: - "@typescript-eslint/types" "6.7.2" - "@typescript-eslint/visitor-keys" "6.7.2" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" -"@typescript-eslint/type-utils@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz#ed921c9db87d72fa2939fee242d700561454f367" - integrity sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ== +"@typescript-eslint/type-utils@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.18.1.tgz#115cf535f8b39db8301677199ce51151e2daee96" + integrity sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q== dependencies: - "@typescript-eslint/typescript-estree" "6.7.2" - "@typescript-eslint/utils" "6.7.2" + "@typescript-eslint/typescript-estree" "6.18.1" + "@typescript-eslint/utils" "6.18.1" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.2.tgz#75a615a6dbeca09cafd102fe7f465da1d8a3c066" - integrity sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg== +"@typescript-eslint/types@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.18.1.tgz#91617d8080bcd99ac355d9157079970d1d49fefc" + integrity sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw== -"@typescript-eslint/typescript-estree@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz#ce5883c23b581a5caf878af641e49dd0349238c7" - integrity sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ== +"@typescript-eslint/typescript-estree@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.1.tgz#a12b6440175b4cbc9d09ab3c4966c6b245215ab4" + integrity sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA== dependencies: - "@typescript-eslint/types" "6.7.2" - "@typescript-eslint/visitor-keys" "6.7.2" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" + minimatch "9.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.2.tgz#b9ef0da6f04932167a9222cb4ac59cb187165ebf" - integrity sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ== +"@typescript-eslint/utils@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.18.1.tgz#3451cfe2e56babb6ac657e10b6703393d4b82955" + integrity sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.7.2" - "@typescript-eslint/types" "6.7.2" - "@typescript-eslint/typescript-estree" "6.7.2" + "@typescript-eslint/scope-manager" "6.18.1" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/typescript-estree" "6.18.1" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.7.2": - version "6.7.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz#4cb2bd786f1f459731b0ad1584c9f73e1c7a4d5c" - integrity sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ== +"@typescript-eslint/visitor-keys@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.1.tgz#704d789bda2565a15475e7d22f145b8fe77443f4" + integrity sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA== dependencies: - "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/types" "6.18.1" eslint-visitor-keys "^3.4.1" +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + JSONStream@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" @@ -2417,19 +2501,14 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.4.1, acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== address@^1.0.1: version "1.2.2" @@ -2476,11 +2555,6 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -2498,16 +2572,6 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: dependencies: type-fest "^0.21.3" -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -2518,7 +2582,7 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -2555,7 +2619,7 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -anymatch@~3.1.1, anymatch@~3.1.2: +anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -2594,34 +2658,24 @@ array-union@^2.1.0: integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array.prototype.flat@^1.2.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.reduce@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" - integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -arraybuffer.prototype.slice@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz#9b5ea3868a6eebc30273da577eb888381c0044bb" - integrity sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw== +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== dependencies: array-buffer-byte-length "^1.0.0" call-bind "^1.0.2" define-properties "^1.2.0" + es-abstract "^1.22.1" get-intrinsic "^1.2.1" is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" @@ -2657,9 +2711,9 @@ available-typed-arrays@^1.0.5: integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== axios-retry@^3.5.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.6.0.tgz#3bf6edbce42e526a3f7ac70b1891b645adb4c301" - integrity sha512-jtH4qWTKZ2a17dH6tjq52Y1ssNV0lKge6/Z9Lw67s9Wt01nGTg4hg7/LJBGYfDci44NTANJQlCPHPOT/TSFm9w== + version "3.9.1" + resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.9.1.tgz#c8924a8781c8e0a2c5244abf773deb7566b3830d" + integrity sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w== dependencies: "@babel/runtime" "^7.15.4" is-retry-allowed "^2.2.0" @@ -2672,14 +2726,19 @@ axios@^0.24.0: follow-redirects "^1.14.4" axios@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== + version "1.6.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.5.tgz#2c090da14aeeab3770ad30c3a1461bc970fb0cd8" + integrity sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.4" form-data "^4.0.0" proxy-from-env "^1.1.0" +b4a@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9" + integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== + babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -2823,7 +2882,7 @@ bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -2978,25 +3037,19 @@ bufio@^1.0.7: resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.1.3.tgz#7f8e524fd719ced2caa563a09d50550f283f745f" integrity sha512-W0ydG8t+ST+drUpEwl1N+dU9Ije06g8+43CLtvEIzfKo9nPFLXbKqDYE2XSg4w6RugsBcCj7pEU7jOpBC6BqrA== -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" callsites@^3.0.0: version "3.1.0" @@ -3058,17 +3111,17 @@ chai@^4.3.4: type-detect "^4.0.5" chai@^4.3.6: - version "4.3.7" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" - integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== + version "4.4.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== dependencies: assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.5" + type-detect "^4.0.8" chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" @@ -3097,25 +3150,12 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== +check-error@^1.0.2, check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" + get-func-name "^2.0.2" chokidar@3.5.3, chokidar@^3.4.0: version "3.5.3" @@ -3142,10 +3182,10 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.1.0, ci-info@^3.2.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" - integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== +ci-info@^3.2.0, ci-info@^3.7.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -3176,15 +3216,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -3386,14 +3417,7 @@ death@^1.1.0: resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -3444,7 +3468,7 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-eql@^4.0.1, deep-eql@^4.1.2: +deep-eql@^4.0.1, deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== @@ -3473,11 +3497,21 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== +define-data-property@^1.0.1, define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" has-property-descriptors "^1.0.0" object-keys "^1.1.1" @@ -3519,11 +3553,6 @@ diff-sequences@^28.1.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" @@ -3607,11 +3636,6 @@ emittery@^0.10.2: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3649,26 +3673,26 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: - version "1.22.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" - integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== +es-abstract@^1.22.1: + version "1.22.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" + integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== dependencies: array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.1" + arraybuffer.prototype.slice "^1.0.2" available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + call-bind "^1.0.5" es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.2" get-symbol-description "^1.0.0" globalthis "^1.0.3" gopd "^1.0.1" - has "^1.0.3" has-property-descriptors "^1.0.0" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" internal-slot "^1.0.5" is-array-buffer "^3.0.2" is-callable "^1.2.7" @@ -3676,44 +3700,39 @@ es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" - is-typed-array "^1.1.10" + is-typed-array "^1.1.12" is-weakref "^1.0.2" - object-inspect "^1.12.3" + object-inspect "^1.13.1" object-keys "^1.1.1" object.assign "^4.1.4" - regexp.prototype.flags "^1.5.0" - safe-array-concat "^1.0.0" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" typed-array-buffer "^1.0.0" typed-array-byte-length "^1.0.0" typed-array-byte-offset "^1.0.0" typed-array-length "^1.0.4" unbox-primitive "^1.0.2" - which-typed-array "^1.1.10" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + which-typed-array "^1.1.13" es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" + integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" + get-intrinsic "^1.2.2" has-tostringtag "^1.0.0" + hasown "^2.0.0" es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== dependencies: - has "^1.0.3" + hasown "^2.0.0" es-to-primitive@^1.2.1: version "1.2.1" @@ -3729,16 +3748,16 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + escape-string-regexp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" @@ -3770,17 +3789,18 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.49.0: - version "8.49.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42" - integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ== + version "8.56.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" + integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.49.0" - "@humanwhocodes/config-array" "^0.11.11" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.56.0" + "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -3898,6 +3918,16 @@ ethereum-cryptography@^1.0.3: "@scure/bip32" "1.1.5" "@scure/bip39" "1.1.1" +ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" + integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== + dependencies: + "@noble/curves" "1.1.0" + "@noble/hashes" "1.3.1" + "@scure/bip32" "1.3.1" + "@scure/bip39" "1.2.1" + ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -3919,17 +3949,6 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.1.0: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - ethers@^5.6.8, ethers@^5.6.9, ethers@^5.7.1: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" @@ -4055,10 +4074,15 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-fifo@^1.1.0, fast-fifo@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@^3.0.3, fast-glob@^3.2.9: - version "3.3.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" - integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -4077,9 +4101,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + version "1.16.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.16.0.tgz#83b9a9375692db77a822df081edb6a9cf6839320" + integrity sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA== dependencies: reusify "^1.0.4" @@ -4109,13 +4133,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -4148,32 +4165,30 @@ find-yarn-workspace-root2@1.2.16: pkg-dir "^4.2.0" flat-cache@^3.0.4: - version "3.1.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" - integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.2.7" + flatted "^3.2.9" keyv "^4.5.3" rimraf "^3.0.2" -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.2.7: +flatted@^3.2.9: version "3.2.9" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -follow-redirects@^1.12.1, follow-redirects@^1.14.4, follow-redirects@^1.15.0: +follow-redirects@^1.12.1, follow-redirects@^1.15.4: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + +follow-redirects@^1.14.4: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -4278,37 +4293,37 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -4323,20 +4338,20 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== +get-func-name@^2.0.0, get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== dependencies: - function-bind "^1.1.1" - has "^1.0.3" + function-bind "^1.1.2" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" get-package-type@^0.1.0: version "0.1.0" @@ -4369,7 +4384,7 @@ github-from-package@0.0.0: resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== -glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -4383,18 +4398,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -4408,12 +4411,12 @@ glob@7.2.0: path-is-absolute "^1.0.0" glob@^10.0.0: - version "10.3.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b" - integrity sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw== + version "10.3.10" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" + integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== dependencies: foreground-child "^3.1.0" - jackspeak "^2.0.3" + jackspeak "^2.3.5" minimatch "^9.0.1" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" @@ -4463,9 +4466,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.22.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.22.0.tgz#0c9fcb9c48a2494fbb5edbfee644285543eba9d8" - integrity sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw== + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" @@ -4529,11 +4532,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - handlebars@^4.0.1: version "4.7.8" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" @@ -4552,22 +4550,22 @@ hard-rejection@^2.1.0: integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== hardhat@^*, hardhat@^2.16.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.17.1.tgz#4b6c8c8f624fd23d9f40185a4af24815d05a486a" - integrity sha512-1PxRkfjhEzXs/wDxI5YgzYBxNmvzifBTjYzuopwel+vXpAhCudplusJthN5eig0FTs4qbi828DBIITEDh8x9LA== + version "2.19.4" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.4.tgz#5112c30295d8be2e18e55d847373c50483ed1902" + integrity sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@nomicfoundation/ethereumjs-vm" "7.0.1" + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + "@nomicfoundation/ethereumjs-vm" "7.0.2" "@nomicfoundation/solidity-analyzer" "^0.1.0" "@sentry/node" "^5.18.1" "@types/bn.js" "^5.1.0" @@ -4625,19 +4623,19 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== dependencies: - get-intrinsic "^1.1.1" + get-intrinsic "^1.2.2" has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -4650,11 +4648,9 @@ has-tostringtag@^1.0.0: has-symbols "^1.0.2" has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== hash-base@^3.0.0: version "3.1.0" @@ -4673,6 +4669,13 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -4744,14 +4747,14 @@ ieee754@^1.1.13, ieee754@^1.2.1: integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + version "5.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== immutable@^4.0.0-rc.12: - version "4.3.2" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.2.tgz#f89d910f8dfb6e15c03b2cae2faaf8c1f66455fe" - integrity sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA== + version "4.3.4" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f" + integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== import-fresh@^3.2.1: version "3.3.0" @@ -4798,12 +4801,12 @@ ini@^1.3.5, ini@~1.3.0: integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + version "1.0.6" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" + integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" + get-intrinsic "^1.2.2" + hasown "^2.0.0" side-channel "^1.0.4" interpret@^1.0.0: @@ -4862,7 +4865,7 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@^2.0.5, is-buffer@~2.0.3: +is-buffer@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== @@ -4872,13 +4875,6 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" - integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== - dependencies: - ci-info "^3.2.0" - is-core-module@2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" @@ -4886,7 +4882,14 @@ is-core-module@2.9.0: dependencies: has "^1.0.3" -is-core-module@^2.13.0, is-core-module@^2.9.0: +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-core-module@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -4905,11 +4908,6 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -5010,7 +5008,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.9: +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: version "1.1.12" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== @@ -5104,10 +5102,10 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.0.tgz#aa228a94de830f31d4e4f0184427ce91c4ff1493" - integrity sha512-uKmsITSsF4rUWQHzqaRUuyAir3fZfW3f202Ee34lz/gZCi970CPZwyQXLGNgWJvvZbvFyzeyGq0+4fcG/mBKZg== +jackspeak@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" + integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -5486,14 +5484,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@3.x, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -5580,18 +5570,18 @@ jsonschema@^1.2.4: integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== keccak@^3.0.0, keccak@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" - integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + version "3.0.4" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" + integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== dependencies: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" readable-stream "^3.6.0" keyv@^4.5.3: - version "4.5.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" - integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" @@ -5682,14 +5672,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -5724,13 +5706,6 @@ lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - log-symbols@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -5749,12 +5724,12 @@ lossless-json@^2.0.8: resolved "https://registry.yarnpkg.com/lossless-json/-/lossless-json-2.0.11.tgz#3137684c93fd99481c6f99c985efc9c9c5cc76a5" integrity sha512-BP0vn+NGYvzDielvBZaFain/wgeJ1hTvURCqtKvhr1SCPePdaaTanmmcplrHfEJSJOUql7hk4FHwToNJjWRY3g== -loupe@^2.3.1: - version "2.3.6" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" - integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== +loupe@^2.3.1, loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: - get-func-name "^2.0.0" + get-func-name "^2.0.1" lru-cache@^4.0.1: version "4.1.5" @@ -5779,9 +5754,9 @@ lru-cache@^6.0.0: yallist "^4.0.0" "lru-cache@^9.1.1 || ^10.0.0": - version "10.0.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" - integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== + version "10.1.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" + integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag== lru_map@^0.3.3: version "0.3.3" @@ -5872,13 +5847,10 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micro-starknet@~0.2.1: - version "0.2.3" - resolved "https://registry.yarnpkg.com/micro-starknet/-/micro-starknet-0.2.3.tgz#ff4e7caf599255d2110e9c57bb483dfaf493ccb3" - integrity sha512-6XBcC+GerlwJSR4iA0VaeXtS2wrayWFcA4PEzrJPMuFmWCaUtuGIq5K/DB5F/XgnL54/zl2Bxo690Lj7mYVA8A== - dependencies: - "@noble/curves" "~1.0.0" - "@noble/hashes" "~1.3.0" +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" @@ -5932,13 +5904,6 @@ minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - minimatch@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" @@ -5946,7 +5911,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.1: +minimatch@9.0.3, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== @@ -5968,27 +5933,20 @@ minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== "minipass@^5.0.0 || ^6.0.2 || ^7.0.0": - version "7.0.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" - integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== mixme@^0.5.1: - version "0.5.9" - resolved "https://registry.yarnpkg.com/mixme/-/mixme-0.5.9.tgz#a5a58e17354632179ff3ce5b0fc130899c8ba81c" - integrity sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw== + version "0.5.10" + resolved "https://registry.yarnpkg.com/mixme/-/mixme-0.5.10.tgz#d653b2984b75d9018828f1ea333e51717ead5f51" + integrity sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q== mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - mkdirp@0.5.x, mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -6003,37 +5961,7 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" - integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mocha@^10.0.0: +mocha@10.2.0, mocha@^10.0.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== @@ -6065,11 +5993,6 @@ module-error@^1.0.1, module-error@^1.0.2: resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -6114,9 +6037,9 @@ neo-async@^2.6.2: integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== node-abi@^3.3.0: - version "3.47.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.47.0.tgz#6cbfa2916805ae25c2b7156ca640131632eb05e8" - integrity sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A== + version "3.54.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.54.0.tgz#f6386f7548817acac6434c6cba02999c9aebcc69" + integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA== dependencies: semver "^7.3.5" @@ -6142,14 +6065,6 @@ node-emoji@^1.10.0: dependencies: lodash "^4.17.21" -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -6165,14 +6080,14 @@ node-fetch@^2.6.12, node-fetch@^2.6.6: whatwg-url "^5.0.0" node-gyp-build@^4.2.0, node-gyp-build@^4.3.0, node-gyp-build@^4.5.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + version "4.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== node-hid@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-2.1.2.tgz#3145fa86ed4336a402a71e9f372c54213b88797c" - integrity sha512-qhCyQqrPpP93F/6Wc/xUR7L8mAJW0Z6R7HMQV8jCHHksAxNDe/4z4Un/H9CpLOT+5K39OPyt9tIQlavxWES3lg== + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-2.2.0.tgz#33e039e7530a7bfe2b7a25f0a2f9496af8b02236" + integrity sha512-vj48zh9j555DZzUhMc8tk/qw6xPFrDyPBH1ST1Z/hWaA/juBJw7IuSxPeOgpzNFNU36mGYj+THioRMt1xOdm/g== dependencies: bindings "^1.5.0" node-addon-api "^3.0.2" @@ -6225,47 +6140,26 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1, object-inspect@^1.9.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== -object-keys@^1.0.11, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" + call-bind "^1.0.5" + define-properties "^1.2.1" has-symbols "^1.0.3" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.0.3: - version "2.1.6" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" - integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== - dependencies: - array.prototype.reduce "^1.0.5" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.21.2" - safe-array-concat "^1.0.0" - obliterator@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" @@ -6343,7 +6237,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -6364,13 +6258,6 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -6563,9 +6450,9 @@ prebuild-install@7.1.1, prebuild-install@^7.1.1: tunnel-agent "^0.6.0" preferred-pm@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.0.3.tgz#1b6338000371e3edbce52ef2e4f65eb2e73586d6" - integrity sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.1.2.tgz#aedb70550734a574dffcbf2ce82642bd1753bdd6" + integrity sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q== dependencies: find-up "^5.0.0" find-yarn-workspace-root2 "1.2.16" @@ -6666,15 +6553,20 @@ pump@^3.0.0: once "^1.3.1" punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -6773,13 +6665,6 @@ readable-stream@~1.0.26-4: isarray "0.0.1" string_decoder "~0.10.x" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -6810,18 +6695,18 @@ redent@^3.0.0: strip-indent "^3.0.0" regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -regexp.prototype.flags@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" - functions-have-names "^1.2.3" + set-function-name "^2.0.0" require-directory@^2.1.1: version "2.1.1" @@ -6872,10 +6757,10 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.22.0: - version "1.22.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" - integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== +resolve@^1.1.6, resolve@^1.10.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: is-core-module "^2.13.0" path-parse "^1.0.7" @@ -6890,6 +6775,15 @@ resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.0: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -6917,7 +6811,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.2.3, rlp@^2.2.4: +rlp@^2.2.3: version "2.2.7" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== @@ -6962,13 +6856,20 @@ rxjs@6: dependencies: tslib "^1.9.0" -safe-array-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" - integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" + get-intrinsic "^1.2.1" has-symbols "^1.0.3" isarray "^2.0.5" @@ -6983,12 +6884,12 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + version "1.0.2" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.2.tgz#3ba32bdb3ea35f940ee87e5087c60ee786c3f6c5" + integrity sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" + call-bind "^1.0.5" + get-intrinsic "^1.2.2" is-regex "^1.1.4" "safer-buffer@>= 2.1.2 < 3": @@ -7030,7 +6931,7 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.7.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -7071,6 +6972,26 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1" + integrity sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w== + dependencies: + define-data-property "^1.1.1" + function-bind "^1.1.2" + get-intrinsic "^1.2.2" + gopd "^1.0.1" + has-property-descriptors "^1.0.1" + +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -7193,9 +7114,9 @@ solc@0.7.3: tmp "0.0.33" solidity-coverage@^0.8.2: - version "0.8.4" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.4.tgz#c57a21979f5e86859c5198de9fbae2d3bc6324a5" - integrity sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg== + version "0.8.5" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.5.tgz#64071c3a0c06a0cecf9a7776c35f49edc961e875" + integrity sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ== dependencies: "@ethersproject/abi" "^5.0.9" "@solidity-parser/parser" "^0.16.0" @@ -7209,7 +7130,7 @@ solidity-coverage@^0.8.2: globby "^10.0.1" jsonschema "^1.2.4" lodash "^4.17.15" - mocha "7.1.2" + mocha "10.2.0" node-emoji "^1.10.0" pify "^4.0.1" recursive-readdir "^2.2.2" @@ -7276,9 +7197,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + version "3.0.16" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz#a14f64e0954f6e25cc6587bd4f392522db0d998f" + integrity sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw== split-ca@^1.0.0: version "1.0.1" @@ -7321,28 +7242,30 @@ starknet@^3.5.1: ts-custom-error "^3.2.0" url-join "^4.0.1" -starknet@^5.17.0, starknet@~5.19.3: - version "5.19.3" - resolved "https://registry.yarnpkg.com/starknet/-/starknet-5.19.3.tgz#fa43ed55b1b33718b900eaf67b1ae90e32226303" - integrity sha512-lftyE2mTnkguma3dTnIW2miTjLX25Snu7pBWpOB2LjFr9ja1nfXPITOjAkDHeOFwv1jRXLlGCAxxGbl3lxgbFQ== +starknet@^6.0.0-beta.11: + version "6.0.0-beta.11" + resolved "https://registry.yarnpkg.com/starknet/-/starknet-6.0.0-beta.11.tgz#7570cc81df52f3bc46564471f870f0fbb4e5247e" + integrity sha512-TLnXTKYGoqz943lncbP9cVo04IZpCp+rrHLbHwHRreS7DX4Y1HtS4I04zN1GMZeD/JwvCcg47H5ms/XDmgcAGg== dependencies: - "@noble/curves" "~1.0.0" - abi-wan-kanabi "^1.0.3" + "@noble/curves" "~1.3.0" + "@scure/base" "~1.1.3" + "@scure/starknet" "~1.0.0" isomorphic-fetch "^3.0.0" lossless-json "^2.0.8" - micro-starknet "~0.2.1" pako "^2.0.4" + ts-mixer "^6.0.3" url-join "^4.0.1" -starknet@^5.2.0: - version "5.14.1" - resolved "https://registry.yarnpkg.com/starknet/-/starknet-5.14.1.tgz#97fa5f99c4c24e42ffa315cfda525461d09d6087" - integrity sha512-EtJwQ6RmFsqSLGuMP+PRp4DwNsMYXy63HDnd1plLCdQKl3FMYajqNKf5RbDl03uGU0uE5ctGp+OW3firHuv6IA== +starknet@~5.19.3: + version "5.19.6" + resolved "https://registry.yarnpkg.com/starknet/-/starknet-5.19.6.tgz#61e43e083888ef64598473bc2e4bd3e1e07fe9d4" + integrity sha512-MyO48QKu+d8CBH/7ruI/RPrDwoFRNV/uxql2nBeA4ccqBXs698FkeGkMhZv++VIwf1MRajHcTM91KuyZQMyMLw== dependencies: - "@noble/curves" "~1.0.0" + "@noble/curves" "~1.2.0" + "@scure/starknet" "~0.3.0" + abi-wan-kanabi "^1.0.3" isomorphic-fetch "^3.0.0" lossless-json "^2.0.8" - micro-starknet "~0.2.1" pako "^2.0.4" url-join "^4.0.1" @@ -7372,10 +7295,13 @@ stream-transform@^2.1.3: dependencies: mixme "^0.5.1" -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +streamx@^2.15.0: + version "2.15.6" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.6.tgz#28bf36997ebc7bf6c08f9eba958735231b833887" + integrity sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw== + dependencies: + fast-fifo "^1.1.0" + queue-tick "^1.0.1" string-length@^4.0.1: version "4.0.2" @@ -7394,23 +7320,6 @@ string-length@^4.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -7420,32 +7329,32 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" string_decoder@^1.1.1: version "1.3.0" @@ -7473,20 +7382,6 @@ string_decoder@~1.1.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -7523,22 +7418,15 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== supports-color@8.1.1, supports-color@^8.0.0: version "8.1.1" @@ -7591,6 +7479,15 @@ tar-fs@^2.0.0, tar-fs@^2.1.1: pump "^3.0.0" tar-stream "^2.1.4" +tar-fs@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.4.tgz#a21dc60a2d5d9f55e0089ccd78124f1d3771dbbf" + integrity sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w== + dependencies: + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^3.1.5" + tar-fs@~1.16.3: version "1.16.3" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" @@ -7625,6 +7522,15 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab" + integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + term-size@^2.1.0: version "2.2.1" resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" @@ -7725,10 +7631,15 @@ ts-jest@^28.0.7: semver "7.x" yargs-parser "^21.0.1" +ts-mixer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.3.tgz#69bd50f406ff39daa369885b16c77a6194c7cae6" + integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ== + ts-node@^10.8.0: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -7749,15 +7660,20 @@ tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== tty-table@^4.1.5: - version "4.2.1" - resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-4.2.1.tgz#c06cd76c54542acf4e2b4a0e9a5802984b65cba6" - integrity sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g== + version "4.2.3" + resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-4.2.3.tgz#e33eb4007a0a9c976c97c37fa13ba66329a5c515" + integrity sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA== dependencies: chalk "^4.1.2" csv "^5.5.3" @@ -7798,7 +7714,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: +type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -7902,12 +7818,17 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + undici@^5.14.0: - version "5.23.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" - integrity sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg== + version "5.28.2" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91" + integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w== dependencies: - busboy "^1.6.0" + "@fastify/busboy" "^2.0.0" universalify@^0.1.0: version "0.1.2" @@ -7915,9 +7836,9 @@ universalify@^0.1.0: integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== unpipe@1.0.0: version "1.0.0" @@ -8005,13 +7926,14 @@ wcwidth@^1.0.1: defaults "^1.0.3" web3-utils@^1.3.6: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.0.tgz#ca4c1b431a765c14ac7f773e92e0fd9377ccf578" - integrity sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg== + version "1.10.3" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.3.tgz#f1db99c82549c7d9f8348f04ffe4e0188b449714" + integrity sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ== dependencies: + "@ethereumjs/util" "^8.1.0" bn.js "^5.2.1" ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" + ethereum-cryptography "^2.1.2" ethjs-unit "0.1.6" number-to-bn "1.7.0" randombytes "^2.1.0" @@ -8023,9 +7945,9 @@ webidl-conversions@^3.0.0: integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== whatwg-fetch@^3.4.1: - version "3.6.17" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.17.tgz#009bbbfc122b227b74ba1ff31536b3a1a0e0e212" - integrity sha512-c4ghIvG6th0eudYwKZY5keb81wtFz9/WeAHAoy8+r18kcWlitUIrmGFQ2rWEl4UCKUilD3zCLHOIPheHx5ypRQ== + version "3.6.20" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" + integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== whatwg-url@^5.0.0: version "5.0.0" @@ -8059,18 +7981,18 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" -which-typed-array@^1.1.10, which-typed-array@^1.1.11: - version "1.1.11" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" - integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== +which-typed-array@^1.1.11, which-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" + integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== dependencies: available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + call-bind "^1.0.4" for-each "^0.3.3" gopd "^1.0.1" has-tostringtag "^1.0.0" -which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: +which@^1.1.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -8084,13 +8006,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" @@ -8115,15 +8030,6 @@ workerpool@6.2.1: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -8195,14 +8101,6 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -8226,15 +8124,6 @@ yargs-parser@^21.0.0, yargs-parser@^21.0.1, yargs-parser@^21.1.1: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" @@ -8245,22 +8134,6 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yargs@16.2.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"