-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from amanusk/v6-beta
Migration to new starknet.js V6
- Loading branch information
Showing
19 changed files
with
1,895 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
MNEMONIC="test test test test test test test test test test test junk" | ||
TOKEN_ADDRESS=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 | ||
STARKNET_RPC_URL="https://starknet-goerli.infura.io/v3/<infura_api_key>" | ||
STARKNET_RPC_URL="https://starknet-sepolia.infura.io/v3/<infura_api_key>" | ||
ACCOUNT_CLASS_HASH = "0x0450f568a8cb6ea1bcce446355e8a1c2e5852a6b8dc3536f495cdceb62e8a7e2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Tests | ||
|
||
env: | ||
DEVNET_SHA: "c6ffb99" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
|
||
# This job runs on Ubuntu-latest, but you can choose other runners if needed | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] # Define Node.js versions to test against | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' # Caches dependencies to speed up workflows | ||
|
||
- name: Install Devnet | ||
run: cargo install --locked --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --rev ${{ env.DEVNET_SHA }} | ||
|
||
- name: Run Devnet in background | ||
run: nohup starknet-devnet --seed 0 & sleep 2 | ||
|
||
|
||
- name: Install dependencies | ||
run: yarn install # Installs dependencies defined in package.json | ||
|
||
- name: Run tests | ||
run: yarn test # Runs your test script defined in package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ node_modules | |
.env-* | ||
|
||
package-lock.json | ||
yarn.lock | ||
|
||
node.json | ||
yarn-error.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import { RpcProvider, ProviderInterface, SequencerProvider } from "starknet"; | ||
import { RpcProvider, ProviderInterface } from "starknet"; | ||
|
||
export function getProvider(nodeUrl: string): ProviderInterface { | ||
const provider = new RpcProvider({ | ||
nodeUrl, | ||
}); | ||
// const provider = new SequencerProvider({ | ||
// baseUrl: nodeUrl, | ||
// }); | ||
return provider; | ||
} |
Oops, something went wrong.