-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
86 additions
and
5 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
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,2 +1,3 @@ | ||
dist | ||
node_modules | ||
starknet-hardhat-example |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
rm -rf starknet-hardhat-example | ||
git clone [email protected]:Shard-Labs/starknet-hardhat-example.git | ||
cd starknet-hardhat-example | ||
npm install | ||
|
||
TOTAL=0 | ||
SUCCESS=0 | ||
for TEST_CASE in ../test/*; do | ||
TOTAL=$((TOTAL + 1)) | ||
echo "Test $TOTAL) $TEST_CASE" | ||
cp "$TEST_CASE/hardhat.config.js" hardhat.config.js | ||
|
||
INIT_SCRIPT="$TEST_CASE/init.sh" | ||
if [ -f "$INIT_SCRIPT" ]; then | ||
$INIT_SCRIPT | ||
fi | ||
|
||
"$TEST_CASE/check.sh" && SUCCESS=$((SUCCESS + 1)) || echo "Test failed!" | ||
git checkout --force | ||
done | ||
|
||
echo "Tests passing: $SUCCESS / $TOTAL" | ||
exit $((TOTAL - SUCCESS)) |
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,9 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
node --version | ||
npm --version | ||
|
||
#these two commands may return different versions (e.g. if using circleci/node and remote docker) | ||
docker --version | ||
docker version |
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,4 @@ | ||
npx hardhat starknet-compile | ||
npx hardhat starknet-deploy --starknet-network alpha | ||
npx hardhat test | ||
|
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,4 @@ | ||
require("../dist/index.js"); | ||
|
||
module.exports = { | ||
}; |
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,3 @@ | ||
npx hardhat starknet-compile | ||
npx hardhat starknet-deploy --starknet-network alpha | ||
|
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,7 @@ | ||
require("../dist/index.js"); | ||
|
||
module.exports = { | ||
paths: { | ||
starknetArtifacts: "my-starknet-artifacts" | ||
} | ||
}; |
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,3 @@ | ||
npx hardhat starknet-compile | ||
npx hardhat starknet-deploy --starknet-network alpha | ||
|
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,7 @@ | ||
require("../dist/index.js"); | ||
|
||
module.exports = { | ||
cairo: { | ||
version: "0.4.1" | ||
} | ||
}; |
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,3 @@ | ||
npx hardhat starknet-compile | ||
npx hardhat starknet-deploy --starknet-network alpha | ||
|
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,7 @@ | ||
require("../dist/index.js"); | ||
|
||
module.exports = { | ||
paths: { | ||
starknetSources: "my-starknet-sources" | ||
} | ||
}; |
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,4 @@ | ||
#!/bin/bash | ||
|
||
# consider `source`ing the script (caveat: affecting subsequent tests) | ||
mv contracts my-starknet-sources |