Skip to content

Commit

Permalink
Update for 2047 (#1122)
Browse files Browse the repository at this point in the history
* Update for 2047

* Remove rpc field

---------

Co-authored-by: Kaan Uzdoğan <[email protected]>
  • Loading branch information
BoThe1K and kuzdogan authored Aug 1, 2023
1 parent 690b3df commit a9967a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 3 additions & 5 deletions src/sourcify-chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,11 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
txRegex: getBlockscoutRegex(),
},
"2047": {
// Turned off support as RPCs are failing
// Stratos Testnet
supported: false,
// Stratos Testnet (Mesos)
supported: true,
monitored: false,
contractFetchAddress:
"https://web3-testnet-explorer.thestratos.org/" + BLOCKSCOUT_SUFFIX,
rpc: ["https://web3-testnet-rpc.thestratos.org"],
"https://web3-explorer-mesos.thestratos.org/" + BLOCKSCOUT_SUFFIX,
txRegex: getBlockscoutRegex(),
},
"641230": {
Expand Down
9 changes: 5 additions & 4 deletions test/chains/chain-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const rimraf = require("rimraf");
const addContext = require("mochawesome/addContext");
const { assertVerification } = require("../helpers/assertions");

const TEST_TIME = 30000; // 30 seconds
const TEST_TIME = process.env.TEST_TIME || 30000; // 30 seconds

// Extract the chainId from new chain support pull request, if exists
const newAddedChainId = process.env.NEW_CHAIN_ID;
Expand All @@ -30,6 +30,7 @@ let anyTestsPass = false; // Fail when zero tests passing
chai.use(chaiHttp);

describe("Test Supported Chains", function () {
console.log(`Set up tests timeout with ${Math.floor(TEST_TIME / 1000)} secs`)
this.timeout(TEST_TIME);
const server = new Server();
let currentResponse = null; // to log server response when test fails
Expand All @@ -51,8 +52,8 @@ describe("Test Supported Chains", function () {
if (!anyTestsPass && newAddedChainId) {
throw new Error(
"There needs to be at least one passing test. Did you forget to add a test for your new chain with the id " +
newAddedChainId +
"?"
newAddedChainId +
"?"
);
}
});
Expand Down Expand Up @@ -764,7 +765,7 @@ describe("Test Supported Chains", function () {

// Stratos Testnet
verifyContract(
"0x9082db5F71534984DEAC8E4ed66cFe364d77dd36",
"0x999986dE5D86Ae4bbd4b9AbFBD65352622D11326",
"2047",
"Stratos Testnet",
["shared/1_Storage.sol"],
Expand Down
9 changes: 5 additions & 4 deletions test/chains/deployContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { deployFromPrivateKey } = require("../helpers/helpers");
const StorageArtifact = require("./sources/shared/1_Storage.json");
const { supportedChainsArray } = require("../../dist/sourcify-chains");
const { program } = require("commander");
const { JsonRpcApiProvider } = require("ethers");
const { JsonRpcProvider } = require("ethers");

program
.description(
Expand All @@ -18,9 +18,10 @@ program
"--privateKey <privateKey>",
"Private key of the account that will deploy the contract"
)
// DEPRECATED
.option(
"--immutableValue <uint256>",
"Value to be stored as the immutable value. "
"Value to be stored as the immutable value. (DEPRECATED)"
)
.showSuggestionAfterError()
.showHelpAfterError("(add --help for additional information)");
Expand All @@ -44,10 +45,10 @@ async function main(chainId, privateKey) {
let provider;
console.log("Using rpc: " + chain.rpc[0]);
try {
provider = new JsonRpcApiProvider(chain.rpc[0]);
provider = new JsonRpcProvider(chain.rpc[0]);
} catch (err) {
console.log(
`Can't initiate a Provider instance with the chain: ${chain}. \n\nMake sure the chainId is added to src/sourcify-chains.ts and built with npx lerna run build`
`Can't initiate a Provider instance with the chain: ${JSON.stringify(chain)}. \n\nMake sure the chainId is added to src/sourcify-chains.ts and built with npx lerna run build`
);
throw new Error(err);
}
Expand Down

0 comments on commit a9967a2

Please sign in to comment.