Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use fixed version of solc when use contractsgen script #125

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
beer-1 marked this conversation as resolved.
Show resolved Hide resolved
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
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
Loading