-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_provider_test
migrate to devnet
#384
Changes from 20 commits
280dfa4
2ec9c4e
c2c6841
8c654f9
11b5404
7d2a4e2
2c0157f
8a142fb
9791dee
5023bea
cadc8d7
9fd4449
67d1965
f0eb470
877d9ca
2a41b30
09cc352
de6ae0e
9b93b8f
17d150a
5359cf2
bb0c795
0d81f07
bb0cfb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ export DEVNET_DUMP_PATH="./assets/devnet-dump.json" | |
|
||
export CAIRO_VERSION=2.6.2 | ||
export SCARB_VERSION=2.6.2 | ||
export STARKNET_DEVNET_VERSION=0.0.5 | ||
export STARKNET_DEVNET_VERSION=0.0.7 | ||
export STARKLI_VERSION=0.2.9 | ||
|
||
export STARKNET_ACCOUNT=.starkli/account_0.json | ||
export STARKNET_ACCOUNT_ADDRESS="0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691" | ||
export STARKNET_PRIVATE_KEY="0x71d7bb07b9a64f6f78ac4c816aff4da9" | ||
export STARKNET_PUBLIC_KEY="0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b" | ||
Comment on lines
15
to
16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential Security Risk: API Key Exposure The private and public keys are exposed in the environment file, which could lead to unauthorized access if not properly secured. Consider using secrets management tools or environment-specific encryption to protect these keys. ToolsGitleaks
|
||
|
||
export HELLO_CLASS_HASH="0x010ca227019cc2e511a7e6519fc1f547d50e461b330fe5f448476f16c28d677a" | ||
export HELLO_CONTRACT_ADDRESS="0x018b585732af21e763fca1048a2a91c8996b9f477cb2b85310df0a17606433f0" | ||
export HELLO_CLASS_HASH="0x065fa938e267ea36a5f7ba1373fbe5d1af3a6d2ec1b040e4640aaeb706d5df24" | ||
export HELLO_CONTRACT_ADDRESS="0x03cdc588f4f1bff66c8a6896e7008cc39c7804d36b16e93792625bd18bffd249" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,8 @@ coverage/ | |
!contracts/build | ||
|
||
.env.* | ||
!.env.devnet | ||
!.env.devnet | ||
|
||
# deploy for test | ||
.starkli/account_1.json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": 1, | ||
"variant": { | ||
"type": "open_zeppelin", | ||
"version": 1, | ||
"public_key": "0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential Security Risk: Public Key Exposure The public key is exposed in the configuration file, which might lead to security risks if this file is not properly secured. Consider encrypting this key or using environment variables to handle sensitive information securely. ToolsGitleaks
|
||
"legacy": false | ||
}, | ||
"deployment": { | ||
"status": "undeployed", | ||
"class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f", | ||
"salt": "0x38fd00cc183cb6326ff3ae90148331bd76a070ee489608fc832f2cf2c0d5aef" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ scarb 2.6.2 | |
action-validator 0.6.0 | ||
|
||
starkli 0.2.9 | ||
starknet-devnet 0.0.5 | ||
starknet-devnet 0.0.7 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,18 +56,19 @@ scripts: | |
devnet:start: | ||
description: Start local devnet | ||
run: | | ||
starknet-devnet --seed 0 --dump-path $DEVNET_DUMP_PATH | ||
devnet:start-dump: | ||
description: Start local devnet in dump mode | ||
starknet-devnet --seed 0 --dump-path $DEVNET_DUMP_PATH --state-archive-capacity full --port 3030 | ||
devnet:start:dump: | ||
description: Start local devnet from scratch and dump on exit | ||
run: | | ||
rm ./assets/devnet-dump.json | ||
starknet-devnet --seed 0 --dump-path $DEVNET_DUMP_PATH --dump-on exit | ||
rm $DEVNET_DUMP_PATH | ||
starknet-devnet --seed 0 --dump-path $DEVNET_DUMP_PATH --state-archive-capacity full --dump-on exit --port 3030 | ||
devnet:setup: | ||
description: Setup local devnet | ||
run: | | ||
melos contracts:build | ||
melos contracts:declare | ||
melos contracts:deploy | ||
melos contracts:invoke | ||
|
||
contracts:build: | ||
description: Build cairo contracts | ||
|
@@ -82,10 +83,16 @@ scripts: | |
description: Deploy cairo contracts | ||
run: | | ||
starkli deploy $HELLO_CLASS_HASH --salt $SALT 0x0 | ||
hello:get_name: | ||
description: Call hello get_name | ||
|
||
contracts:invoke: | ||
description: creating invoke tx for tests with hash 0x03b2911796e0024f9e23d7337997538058eca267d5ddaa582d482cbe1fb64897 and deploy_account tx with hash 0x055ba13c33a12506d2eab8dfbc618a8ce0d247c24959a64ee18fbf393c873b83 | ||
run: | | ||
starkli call $HELLO_CONTRACT_ADDRESS get_name | ||
starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove trailing spaces to clean up the code. Trailing spaces on lines 90 and 92 should be removed to adhere to good coding practices. - starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
+ starkli invoke $HELLO_CONTRACT_ADDRESS set_name 0x0
-
+ Also applies to: 92-92 Toolsyamllint
|
||
# should create tx hash 0x029583643cd8932f1955bf28bfebf4c907b13df1e5c2d202b133cfbf783697a2 | ||
|
||
cp -f .starkli/account_for_devnet_setup.json .starkli/account_1.json | ||
starkli invoke eth transfer 0x016a0d7df981d681537dc2ce648722ff1d1c2cbe59412b492d35bac69825f104 0x100000000000000000 0x0 | ||
echo | starkli account deploy .starkli/account_1.json | ||
|
||
test: | ||
description: Run all tests | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
starknet-devnet 0.0.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential Security Risk: API Key Exposure
The private and public keys are exposed in the environment file, which could lead to unauthorized access if not properly secured. Consider using secrets management tools or environment-specific encryption to protect these keys.