diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c1fa39f..c941519 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,13 +8,13 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.11" - name: Set up uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 with: enable-cache: true - name: Install dependencies @@ -31,23 +31,35 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.11" - name: Set up uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 with: enable-cache: true - name: Set up Foundry - uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 + uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # v1.7.0 with: version: stable - name: Install dependencies run: | uv sync --frozen --no-install-project npm ci + - name: Install Solidity compiler + run: | + set -euo pipefail + solcx_dir="$HOME/.solcx" + temp_dir="$(mktemp -d)" + compiler_path="$temp_dir/solc-static-linux" + compiler_url="https://github.com/ethereum/solidity/releases/download/v0.8.34/solc-static-linux" + compiler_sha256="d40adc6f9fdbb22a97d32a02fa05688bf2ee7886affc48c9851b0afd4a726b39" + mkdir -p "$solcx_dir" + curl -fsSL "$compiler_url" -o "$compiler_path" + echo "$compiler_sha256 $compiler_path" | sha256sum --check --status + install -m 0755 "$compiler_path" "$solcx_dir/solc-v0.8.34" - name: Import Brownie network settings run: uv run brownie networks import data/networks.yml true - name: Compile contracts diff --git a/README.md b/README.md index 40292ff..d0e737a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A prototype implementation of escrow information concealment using Joux's Tripar - bls12_381 curve operations - [Solidity](https://docs.soliditylang.org/) - We are using Solidity to implement our smart contracts. - - Currently, we are using v0.8.23. + - Currently, we are using v0.8.34. - [eth-brownie](https://github.com/eth-brownie/brownie) - We are using the eth-brownie framework for developing and testing our contracts. - [Anvil](https://www.getfoundry.sh/anvil) diff --git a/brownie-config.yaml b/brownie-config.yaml index dd49aa7..a8472b9 100644 --- a/brownie-config.yaml +++ b/brownie-config.yaml @@ -8,6 +8,6 @@ networks: compiler: evm_version: berlin solc: - version: 0.8.23 + version: 0.8.34 dependencies: OpenZeppelin/openzeppelin-contracts@4.9.3 diff --git a/contracts/access/Ownable.sol b/contracts/access/Ownable.sol index 2e9a1b8..18311a6 100644 --- a/contracts/access/Ownable.sol +++ b/contracts/access/Ownable.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "../utils/Errors.sol"; diff --git a/contracts/exchange/DVPStorage.sol b/contracts/exchange/DVPStorage.sol index eb75d29..1eaa120 100644 --- a/contracts/exchange/DVPStorage.sol +++ b/contracts/exchange/DVPStorage.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "../access/Ownable.sol"; import "../utils/Errors.sol"; diff --git a/contracts/exchange/IbetSecurityTokenDVP.sol b/contracts/exchange/IbetSecurityTokenDVP.sol index 82cc8b3..6c73851 100644 --- a/contracts/exchange/IbetSecurityTokenDVP.sol +++ b/contracts/exchange/IbetSecurityTokenDVP.sol @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "OpenZeppelin/openzeppelin-contracts@4.9.3/contracts/utils/math/SafeMath.sol"; import "./DVPStorage.sol"; diff --git a/contracts/ledger/PersonalInfo.sol b/contracts/ledger/PersonalInfo.sol index 112661c..c857636 100644 --- a/contracts/ledger/PersonalInfo.sol +++ b/contracts/ledger/PersonalInfo.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "../utils/Errors.sol"; diff --git a/contracts/token/IbetShare.sol b/contracts/token/IbetShare.sol index 2d5e4ae..579629f 100644 --- a/contracts/token/IbetShare.sol +++ b/contracts/token/IbetShare.sol @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "OpenZeppelin/openzeppelin-contracts@4.9.3/contracts/utils/math/SafeMath.sol"; import "../access/Ownable.sol"; diff --git a/contracts/token/IbetStandardToken.sol b/contracts/token/IbetStandardToken.sol index 4de6075..ab5b225 100644 --- a/contracts/token/IbetStandardToken.sol +++ b/contracts/token/IbetStandardToken.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "OpenZeppelin/openzeppelin-contracts@4.9.3/contracts/utils/math/SafeMath.sol"; import "../access/Ownable.sol"; diff --git a/contracts/token/IbetStraightBond.sol b/contracts/token/IbetStraightBond.sol index 637eedb..d2e266f 100644 --- a/contracts/token/IbetStraightBond.sol +++ b/contracts/token/IbetStraightBond.sol @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "OpenZeppelin/openzeppelin-contracts@4.9.3/contracts/utils/math/SafeMath.sol"; import "../access/Ownable.sol"; diff --git a/contracts/utils/Errors.sol b/contracts/utils/Errors.sol index d09a990..7cdb1f2 100644 --- a/contracts/utils/Errors.sol +++ b/contracts/utils/Errors.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; library ErrorCode { // 10XXXX diff --git a/contracts/utils/TripartiteKeyExchange.sol b/contracts/utils/TripartiteKeyExchange.sol index c5fd970..bf7c57d 100644 --- a/contracts/utils/TripartiteKeyExchange.sol +++ b/contracts/utils/TripartiteKeyExchange.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; /// @title Joux's tripartite diffie-hellmann key exchange contract TripartiteKeyExchange { diff --git a/interfaces/ContractReceiver.sol b/interfaces/ContractReceiver.sol index 3902cf5..b2d8c57 100644 --- a/interfaces/ContractReceiver.sol +++ b/interfaces/ContractReceiver.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; interface ContractReceiver { function tokenFallback( diff --git a/interfaces/IbetExchangeInterface.sol b/interfaces/IbetExchangeInterface.sol index 0604690..d69d811 100644 --- a/interfaces/IbetExchangeInterface.sol +++ b/interfaces/IbetExchangeInterface.sol @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "./ContractReceiver.sol"; diff --git a/interfaces/IbetSecurityTokenInterface.sol b/interfaces/IbetSecurityTokenInterface.sol index e2bb49e..98e72e4 100644 --- a/interfaces/IbetSecurityTokenInterface.sol +++ b/interfaces/IbetSecurityTokenInterface.sol @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; import "./IbetStandardTokenInterface.sol"; diff --git a/interfaces/IbetStandardTokenInterface.sol b/interfaces/IbetStandardTokenInterface.sol index 080b252..92008ac 100644 --- a/interfaces/IbetStandardTokenInterface.sol +++ b/interfaces/IbetStandardTokenInterface.sol @@ -16,7 +16,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -pragma solidity ^0.8.0; +pragma solidity ^0.8.34; /// @title ibet Standard Token Interface abstract contract IbetStandardTokenInterface {