-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: build failed after rebase develop
- Loading branch information
Showing
8 changed files
with
53 additions
and
230 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 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
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
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Default values | ||
OUTPUT="./contracts/AirDrop.sol" | ||
SOURCE_CHAIN_ID="" | ||
APPROVAL_ADDRESS="0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa" | ||
MERKLE_ROOT="0x0000000000000000000000000000000000000000000000000000000000000000" | ||
|
||
# Parse command line arguments | ||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
--sourceChainId) | ||
SOURCE_CHAIN_ID="$2" | ||
shift | ||
;; | ||
--approvalAddress) | ||
APPROVAL_ADDRESS="$2" | ||
shift | ||
;; | ||
--merkleRoot) | ||
MERKLE_ROOT="$2" | ||
shift | ||
;; | ||
*) | ||
echo "Unknown parameter passed: $1" | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
basedir=$( | ||
cd $(dirname $0) | ||
pwd | ||
) | ||
|
||
# Replace the specific line | ||
sed -i -e "s/string public constant sourceChainID = .*;/string public constant sourceChainID = \"${SOURCE_CHAIN_ID}\";/g" "$OUTPUT" | ||
sed -i -e "s/address public approvalAddress = .*;/address public approvalAddress = ${APPROVAL_ADDRESS};/g" "$OUTPUT" | ||
sed -i -e "s/bytes32 public constant override merkleRoot = .*;/bytes32 public constant override merkleRoot = ${MERKLE_ROOT};/g" "$OUTPUT" | ||
|
||
echo "AirDrop file updated." |
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
Oops, something went wrong.