Skip to content

Commit

Permalink
fix: use fixed version of solc when use contractsgen script (#125)
Browse files Browse the repository at this point in the history
* fix: use fixed version of solc when use contractsgen script

* echo and add

---------

Co-authored-by: beer-1 <[email protected]>
  • Loading branch information
djm07073 and beer-1 authored Dec 2, 2024
1 parent a969cd0 commit fcf8caa
Show file tree
Hide file tree
Showing 25 changed files with 30 additions and 24 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ MiniEVM is an optimistic rollup consumer chain powered by EVM, designed to simpl
## Prerequisites

- Go v1.22.7+
- (optional) [solc-select](https://github.com/crytic/solc-select) v1.0.4+ (used in contractsgen.sh)

## Getting Started

Expand Down
7 changes: 6 additions & 1 deletion scripts/contractsgen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
set -e
BUILD_DIR=build
CONTRACTS_DIR=x/evm/contracts
VERSION="0.8.25"

echo "If you don't have solc-select installed, please install it first from https://github.com/crytic/solc-select?tab=readme-ov-file#quickstart"
solc-select use $VERSION --always-install
for CONTRACT_HOME in $CONTRACTS_DIR/*; do
if [ -d "$CONTRACT_HOME" ]; then
PKG_NAME=$(basename $CONTRACT_HOME)
Expand All @@ -8,7 +14,6 @@ for CONTRACT_HOME in $CONTRACTS_DIR/*; do
echo $CONTRACT_PATH
CONTRACT_NAME=$(basename $CONTRACT_PATH .sol)
echo $CONTRACT_HOME $PKG_NAME $CONTRACT_PATH $CONTRACT_NAME

solc $CONTRACT_PATH --bin --abi -o $BUILD_DIR --overwrite
abigen --pkg $PKG_NAME \
--bin=$BUILD_DIR/$CONTRACT_NAME.bin \
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/counter/Counter.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/counter/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../i_ibc_async_callback/IIBCAsyncCallback.sol";
import "../i_cosmos/ICosmos.sol";
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/erc20/ERC20.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/erc20/ERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../i_erc20/IERC20.sol";
import "../ownable/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_acl/ERC20ACL.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_acl/ERC20ACL.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../i_cosmos/ICosmos.sol";

Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_factory/ERC20Factory.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_factory/ERC20Factory.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../erc20/ERC20.sol";
import "../i_erc20_registry/IERC20Registry.sol";
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_registry/ERC20Registry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_registry/ERC20Registry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../i_erc20_registry/IERC20Registry.sol";

Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_wrapper/ERC20Wrapper.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/erc20_wrapper/ERC20Wrapper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../strings/Strings.sol";
import "../i_cosmos/ICosmos.sol";
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/i_cosmos/ICosmos.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

/// @dev The ICosmos contract's address.
address constant COSMOS_ADDRESS = 0x00000000000000000000000000000000000000f1;
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/i_erc20/IERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import {IERC165} from "../i_erc165/IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/i_erc20_registry/IERC20Registry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

/// @dev The IERC20Registry contract's address.
address constant ERC20_REGISTRY_ADDRESS = 0x00000000000000000000000000000000000000F2;
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/i_ibc_async_callback/IIBCAsyncCallback.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

interface IIBCAsyncCallback {
function ibc_ack(uint64 callback_id, bool success) external;
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/ics721_erc721/ICS721ERC721.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/initia_erc20/InitiaERC20.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/evm/contracts/initia_erc20/InitiaERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

import "../i_erc20/IERC20.sol";
import "../ownable/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/ownable/Ownable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/evm/contracts/ownable/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

/**
* @title Ownable
Expand Down
2 changes: 1 addition & 1 deletion x/evm/contracts/strings/Strings.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/evm/contracts/strings/Strings.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.25;

//ref. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol
library Strings {
Expand Down

0 comments on commit fcf8caa

Please sign in to comment.