-
Notifications
You must be signed in to change notification settings - Fork 2
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
9 changed files
with
97 additions
and
507 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
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,62 @@ | ||
#!/usr/bin/env sh | ||
VERSION="$1" | ||
FILE="$2" | ||
|
||
if [ -z "${GH_API_TOKEN}" ]; then | ||
echo "Required GH_API_TOKEN env variable with appropriate GitHub API token" | ||
exit 1 | ||
fi | ||
|
||
REPO="bitfinity-network/evm-canister" | ||
WASM_DIR=".artifact" | ||
|
||
script_dir=$(dirname $0) | ||
assets_dir=$(realpath "${script_dir}/../$WASM_DIR") | ||
|
||
if [ -f "$assets_dir/$FILE" ]; then | ||
echo "File aready downloaded $assets_dir/$FILE" | ||
echo "Skip download and unpacking" | ||
exit 0 | ||
fi | ||
|
||
set -e | ||
|
||
mkdir -p "$assets_dir" | ||
|
||
assets=$( curl -fL \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GH_API_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/$REPO/releases/tags/$VERSION ) | ||
|
||
|
||
# echo "https://api.github.com/repos/$REPO/releases/tags/$VERSION" | ||
echo "$assets" | ||
|
||
echo "Release assets acqured" | ||
|
||
for row in $(echo "${assets}" | jq -c '.assets[]'); do | ||
name=$( jq -r '.name' <<< "${row}" ) | ||
echo ${name} | ||
|
||
if [ "$FILE" = "$name" ]; then | ||
asset_id=$( jq -r '.id' <<< "${row}" ) | ||
|
||
echo "https://api.github.com/repos/$REPO/releases/assets/$asset_id" | ||
|
||
curl -L \ | ||
-H "Accept: application/octet-stream" \ | ||
-H "Authorization: Bearer $GH_API_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/$REPO/releases/assets/$asset_id" \ | ||
-o "$assets_dir/$FILE" | ||
fi | ||
done | ||
|
||
if [ ! -f "$assets_dir/$FILE" ]; then | ||
echo "Release asset not found: $FILE" | ||
exit 33 | ||
fi | ||
|
||
cd $assets_dir | ||
tar -xzf "$FILE" |
Submodule forge-std
updated
9 files
+1 −1 | package.json | |
+2 −2 | src/StdCheats.sol | |
+61 −33 | src/StdUtils.sol | |
+81 −0 | src/Vm.sol | |
+216 −0 | src/mocks/MockERC20.sol | |
+221 −0 | src/mocks/MockERC721.sol | |
+1 −1 | test/Vm.t.sol | |
+441 −0 | test/mocks/MockERC20.t.sol | |
+721 −0 | test/mocks/MockERC721.t.sol |
Oops, something went wrong.