-
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.
Merge pull request #49 from persistenceOne/avkr003/v0.6.0
Merging audit report changes, direct staking feature, test cases improvement and bug fixes
- Loading branch information
Showing
110 changed files
with
6,617 additions
and
1,538 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,7 +1,61 @@ | ||
#!/bin/bash | ||
|
||
solc --abi --bin contracts/LiquidStakingV2.sol -o build | ||
abigen --bin ./build/LiquidStakingV2.bin --abi ./build/LiquidStakingV2.abi --pkg=liquidStaking --out=liquidStaking.go | ||
OPENZEPPELIN_DIR_NAME="@openzeppelin" | ||
|
||
solc --abi --bin contracts/TokenWrapperV2.sol -o build --overwrite | ||
abigen --bin ./build/TokenWrapperV2.bin --abi ./build/TokenWrapperV2.abi --pkg=tokenWrapper --out=TokenWrapper.go | ||
rm -rf pStake-smartContracts | ||
rm -rf "$OPENZEPPELIN_DIR_NAME" | ||
rm -rf ./ethereum/abi/liquidStaking/liquidStaking.go | ||
rm -rf ./ethereum/abi/tokenWrapper/tokenWrapper.go | ||
|
||
echo "Downloading pStake-smartContracts..." | ||
git clone [email protected]:persistenceOne/pStake-smartContracts.git | ||
# shellcheck disable=SC2164 | ||
cd pStake-smartContracts | ||
git checkout "$SMART_CONTRACT_VERSION" | ||
# shellcheck disable=SC2103 | ||
cd .. | ||
|
||
echo "Downloading openzeppelin..." | ||
mkdir "$OPENZEPPELIN_DIR_NAME" | ||
# shellcheck disable=SC2164 | ||
cd "$OPENZEPPELIN_DIR_NAME" | ||
|
||
echo "Downloading openzeppelin-contracts..." | ||
git clone https://github.com/OpenZeppelin/openzeppelin-contracts.git | ||
# shellcheck disable=SC2164 | ||
cd openzeppelin-contracts | ||
git checkout "$OPENZEPPELIN_VERSION" | ||
cd .. | ||
mv openzeppelin-contracts/contracts ./ | ||
rm -rf openzeppelin-contracts | ||
|
||
echo "Downloading openzeppelin-contract-upgradeable..." | ||
git clone https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable.git | ||
# shellcheck disable=SC2164 | ||
cd openzeppelin-contracts-upgradeable | ||
git checkout "$OPENZEPPELIN_VERSION" | ||
cd .. | ||
mv openzeppelin-contracts-upgradeable/contracts ./contracts-upgradeable | ||
rm -rf openzeppelin-contracts-upgradeable | ||
|
||
cd .. | ||
mv "$OPENZEPPELIN_DIR_NAME" ./pStake-smartContracts/ | ||
# shellcheck disable=SC2164 | ||
cd pStake-smartContracts | ||
|
||
echo "Compiling smart contracts..." | ||
# shellcheck disable=SC2046 | ||
solc --abi --bin contracts/"$LIQUID_STAKING".sol -o build @openzeppelin/=$(pwd)/@openzeppelin/ | ||
abigen --bin ./build/"$LIQUID_STAKING".bin --abi ./build/"$LIQUID_STAKING".abi --pkg=liquidStaking --out=liquidStaking.go | ||
|
||
# shellcheck disable=SC2046 | ||
solc --abi --bin contracts/"$TOKEN_WRAPPER".sol -o build --overwrite @openzeppelin/=$(pwd)/@openzeppelin/ | ||
abigen --bin ./build/"$TOKEN_WRAPPER".bin --abi ./build/"$TOKEN_WRAPPER".abi --pkg=tokenWrapper --out=tokenWrapper.go | ||
|
||
cd .. | ||
mv pStake-smartContracts/liquidStaking.go ./ethereum/abi/liquidStaking | ||
mv pStake-smartContracts/tokenWrapper.go ./ethereum/abi/tokenWrapper | ||
|
||
rm -rf pStake-smartContracts | ||
|
||
echo "Compilation done." |
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
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
Oops, something went wrong.