Skip to content

Commit

Permalink
Use older solc to avoid 'invalid opcode'
Browse files Browse the repository at this point in the history
  • Loading branch information
madis committed Dec 22, 2023
1 parent a04098f commit cab328b
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion contracts/Ethlance.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "./EthlanceStructs.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/EthlanceStructs.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/Job.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "./EthlanceStructs.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/JobHelpers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "./EthlanceStructs.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
pragma solidity ^0.8.0;

contract Migrations {
address public owner = msg.sender;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"solc": "0.8.21"
},
"resolutions": {
"solc": "0.8.21"
"solc": "0.8.19"
},
"engines": {
"node": "^18.17.0"
Expand Down
19 changes: 16 additions & 3 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
const ETHLANCE_ENV = process.env.ETHLANCE_ENV || "dev";

const ETHLANCE_MNEMONIC = process.env.ETHLANCE_MNEMONIC;
const ETHLANCE_ETH_NODE_ADDRESS = process.env.ETHLANCE_ETH_NODE_ADDRESS;

const smartContractsPaths = {
"dev" : '/shared/src/ethlance/shared/smart_contracts_dev.cljs',
Expand All @@ -24,7 +25,8 @@ parameters.dev = parameters.qa;


const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonic = "easy leave proof verb wait patient fringe laptop intact opera slab shine";
const DEFAULT_DEV_MNEMONIC = "easy leave proof verb wait patient fringe laptop intact opera slab shine";
const mnemonic = ETHLANCE_MNEMONIC || DEFAULT_DEV_MNEMONIC;

module.exports = {
env: ETHLANCE_ENV,
Expand All @@ -35,7 +37,7 @@ module.exports = {

compilers: {
solc: {
version: "0.8.21",
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
Expand Down Expand Up @@ -77,6 +79,17 @@ module.exports = {
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*',
from: "0xeba108B12593336bBa461b8a6e7DC5A4b597Bc7E" // 6) address
},

"arbitrum-sepolia": {
provider: new HDWalletProvider({mnemonic: {phrase: mnemonic},
providerOrUrl: ETHLANCE_ETH_NODE_ADDRESS || 'https://sepolia-rollup.arbitrum.io/rpc'
}),
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*',
from: "0x642fAE80d3C74559A18B0558A518cDBF6b047968" // 1st address
}

}
}
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5609,7 +5609,20 @@ snake-case@^2.1.0:
dependencies:
no-case "^2.2.0"

[email protected], solc@^0.4.20:
[email protected], solc@^0.4.20:
version "0.8.19"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3"
integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA==
dependencies:
command-exists "^1.2.8"
commander "^8.1.0"
follow-redirects "^1.12.1"
js-sha3 "0.8.0"
memorystream "^0.3.1"
semver "^5.5.0"
tmp "0.0.33"

[email protected]:
version "0.8.21"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.21.tgz#c3cd505c360ea2fa0eaa5ab574ef96bffb1a2766"
integrity sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==
Expand Down

0 comments on commit cab328b

Please sign in to comment.