From 83f9faf5157886bf4e1a895112916e74dda90cde Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 19 Apr 2023 14:04:28 +0200
Subject: [PATCH 01/48] Disable match with simulation
---
packages/lib-sourcify/src/lib/verification.ts | 11 ++++++++---
packages/lib-sourcify/test/verification.spec.ts | 4 +++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index 0fafbeae5..f0ca0598d 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -62,6 +62,7 @@ export async function verifyDeployed(
if (match.status) return match;
// Try to match with simulating the creation bytecode
+ /*
await matchWithSimulation(
match,
recompiled.creationBytecode,
@@ -74,6 +75,7 @@ export async function verifyDeployed(
match.contextVariables = contextVariables;
return match;
}
+ */
// Try to match with creationTx, if available
if (creatorTxHash) {
@@ -193,6 +195,7 @@ export function matchWithDeployedBytecode(
}
}
+/*
export async function matchWithSimulation(
match: Match,
recompiledCreaionBytecode: string,
@@ -234,7 +237,7 @@ export async function matchWithSimulation(
data: initcode,
gasLimit: BigInt(0xffffffffff),
// prettier vs. eslint indentation conflict here
- /* eslint-disable indent */
+ // eslint-disable indent
caller: msgSender
? new Address(
Buffer.from(
@@ -243,7 +246,7 @@ export async function matchWithSimulation(
)
)
: undefined,
- /* eslint-enable indent */
+ // eslint-disable indent
});
const simulationDeployedBytecode =
'0x' + result.execResult.returnValue.toString('hex');
@@ -253,7 +256,9 @@ export async function matchWithSimulation(
simulationDeployedBytecode,
deployedBytecode
);
-}
+}
+*/
+
/**
* Matches the contract via the transaction that created the contract, if that tx is known.
* Checks if the tx.input matches the recompiled creation bytecode. Double checks that the contract address matches the address being verified.
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index f79b91943..c691d77cd 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -16,7 +16,7 @@ import { expect } from 'chai';
import {
calculateCreate2Address,
getBytecode,
- matchWithSimulation,
+ /* matchWithSimulation, */
matchWithCreationTx,
replaceImmutableReferences,
verifyCreate2,
@@ -377,6 +377,7 @@ describe('lib-sourcify tests', () => {
expect(replacedBytecode).equals(recompiledDeployedBytecode);
});
+ /*
it('should matchWithSimulation', async () => {
const childFolderPath = path.join(
__dirname,
@@ -436,6 +437,7 @@ describe('lib-sourcify tests', () => {
expectMatch(match, 'perfect', childAddress);
});
+ */
it('should fail to matchWithCreationTx with wrong creationTxHash', async () => {
const contractFolderPath = path.join(
From d1d693fceff700271cd5ca61b581efb37c9f8aa9 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 19 Apr 2023 14:42:47 +0200
Subject: [PATCH 02/48] Comment out all contextVariables * matchWithSimulation
totally commented
---
packages/lib-sourcify/README.md | 1 -
packages/lib-sourcify/src/lib/types.ts | 6 ++--
packages/lib-sourcify/src/lib/verification.ts | 6 ++--
packages/lib-sourcify/test/utils.ts | 10 +++++--
.../lib-sourcify/test/verification.spec.ts | 15 ++++++----
src/monitor/monitor.ts | 2 +-
.../VerificationController-util.ts | 22 ++++++++------
.../controllers/VerificationController.ts | 14 ++++-----
src/server/services/RepositoryService.ts | 6 ++--
src/server/services/VerificationService.ts | 10 +++----
.../ChainAddressForm/index.tsx | 29 ++++++++++---------
ui/src/types.ts | 4 +--
12 files changed, 69 insertions(+), 56 deletions(-)
diff --git a/packages/lib-sourcify/README.md b/packages/lib-sourcify/README.md
index 2eb24e060..e143fa845 100644
--- a/packages/lib-sourcify/README.md
+++ b/packages/lib-sourcify/README.md
@@ -51,7 +51,6 @@ export async function verifyDeployed(
checkedContract: CheckedContract,
sourcifyChain: SourcifyChain,
address: string,
- contextVariables?: ContextVariables,
creatorTxHash?: string
): Promise;
```
diff --git a/packages/lib-sourcify/src/lib/types.ts b/packages/lib-sourcify/src/lib/types.ts
index 143da6f40..076454bb8 100644
--- a/packages/lib-sourcify/src/lib/types.ts
+++ b/packages/lib-sourcify/src/lib/types.ts
@@ -82,7 +82,7 @@ export interface Match {
abiEncodedConstructorArguments?: string;
create2Args?: Create2Args;
libraryMap?: StringMap;
- contextVariables?: ContextVariables;
+ /* contextVariables?: ContextVariables; */
creatorTxHash?: string;
immutableReferences?: ImmutableReferences;
}
@@ -135,10 +135,10 @@ type Currency = {
decimals: number;
};
-export type ContextVariables = {
+/* export type ContextVariables = {
abiEncodedConstructorArguments?: string;
msgSender?: string;
-};
+}; */
interface File {
keccak256?: string;
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index f0ca0598d..53cbeb737 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -1,6 +1,6 @@
import { CheckedContract } from './CheckedContract';
import {
- ContextVariables,
+ /* ContextVariables, */
Create2Args,
ImmutableReferences,
Match,
@@ -14,12 +14,14 @@ import {
decode as bytecodeDecode,
splitAuxdata,
} from '@ethereum-sourcify/bytecode-utils';
+/*
import { EVM } from '@ethereumjs/evm';
import { EEI } from '@ethereumjs/vm';
import { Address } from '@ethereumjs/util';
import { Common } from '@ethereumjs/common';
import { DefaultStateManager } from '@ethereumjs/statemanager';
import { Blockchain } from '@ethereumjs/blockchain';
+*/
import { hexZeroPad, isHexString } from '@ethersproject/bytes';
import { BigNumber } from '@ethersproject/bignumber';
import { getAddress, getContractAddress } from '@ethersproject/address';
@@ -31,7 +33,7 @@ export async function verifyDeployed(
checkedContract: CheckedContract,
sourcifyChain: SourcifyChain,
address: string,
- contextVariables?: ContextVariables,
+ /* _contextVariables?: ContextVariables, */
creatorTxHash?: string
): Promise {
const match: Match = {
diff --git a/packages/lib-sourcify/test/utils.ts b/packages/lib-sourcify/test/utils.ts
index 3fb0979a9..a76fa727e 100644
--- a/packages/lib-sourcify/test/utils.ts
+++ b/packages/lib-sourcify/test/utils.ts
@@ -10,7 +10,11 @@
import path from 'path';
import Web3 from 'web3';
import fs from 'fs';
-import { ContextVariables, Match, SourcifyChain, verifyDeployed } from '../src';
+import {
+ /* ContextVariables, */ Match,
+ SourcifyChain,
+ verifyDeployed,
+} from '../src';
import { checkFiles } from '../src';
import { expect } from 'chai';
@@ -76,7 +80,7 @@ export const checkAndVerifyDeployed = async (
contractFolderPath: string,
sourcifyChain: SourcifyChain,
address: string,
- contextVariables?: ContextVariables,
+ /* contextVariables?: ContextVariables, */
creatorTxHash?: string
) => {
const checkedContracts = await checkFilesFromContractFolder(
@@ -87,7 +91,7 @@ export const checkAndVerifyDeployed = async (
checkedContracts[0],
sourcifyChain,
address,
- contextVariables,
+ /* contextVariables, */
creatorTxHash
);
return match;
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index c691d77cd..9371422d5 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -4,7 +4,7 @@ import { SourcifyChain } from '../src/lib/types';
import Web3 from 'web3';
import Ganache from 'ganache';
import {
- callContractMethodWithTx,
+ /* callContractMethodWithTx, */
checkAndVerifyDeployed,
checkFilesFromContractFolder,
deployCheckAndVerify,
@@ -15,13 +15,15 @@ import { describe, it, before } from 'mocha';
import { expect } from 'chai';
import {
calculateCreate2Address,
+ /*
getBytecode,
- /* matchWithSimulation, */
+ matchWithSimulation,
+ */
matchWithCreationTx,
replaceImmutableReferences,
verifyCreate2,
} from '../src';
-import { Match } from '@ethereum-sourcify/lib-sourcify';
+// import { Match } from '@ethereum-sourcify/lib-sourcify';
const ganacheServer = Ganache.server({
wallet: { totalAccounts: 1 },
@@ -253,7 +255,7 @@ describe('lib-sourcify tests', () => {
expectMatch(match, 'perfect', deployedAddress);
});
- it('should verify a contract created by a factory contract and has immutables', async () => {
+ /* it('should verify a contract created by a factory contract and has immutables', async () => {
const deployValue = 12345;
const childFolderPath = path.join(
__dirname,
@@ -298,9 +300,9 @@ describe('lib-sourcify tests', () => {
);
expectMatch(match, 'perfect', childAddress);
- });
+ }); */
- it('should verify a contract created by a factory contract and has immutables without constructor arguments but with msg.sender assigned immutable', async () => {
+ /* it('should verify a contract created by a factory contract and has immutables without constructor arguments but with msg.sender assigned immutable', async () => {
const childFolderPath = path.join(
__dirname,
'sources',
@@ -341,6 +343,7 @@ describe('lib-sourcify tests', () => {
expectMatch(match, 'perfect', childAddress);
});
+ */
});
describe('Unit tests', function () {
diff --git a/src/monitor/monitor.ts b/src/monitor/monitor.ts
index ccf57543a..756351f48 100755
--- a/src/monitor/monitor.ts
+++ b/src/monitor/monitor.ts
@@ -272,7 +272,7 @@ class ChainMonitor extends EventEmitter {
contract,
this.chainId,
address,
- undefined,
+ /* undefined, */
creatorTxHash
);
await this.repositoryService.storeMatch(contract, match);
diff --git a/src/server/controllers/VerificationController-util.ts b/src/server/controllers/VerificationController-util.ts
index 5bed0e413..c8509702a 100644
--- a/src/server/controllers/VerificationController-util.ts
+++ b/src/server/controllers/VerificationController-util.ts
@@ -47,10 +47,10 @@ export type LegacyVerifyRequest = Request & {
addresses: string[];
chain: string;
chosenContract: number;
- contextVariables?: {
+ /* contextVariables?: {
abiEncodedConstructorArguments?: string;
msgSender?: string;
- };
+ }; */
};
type PathBuffer = {
@@ -158,10 +158,10 @@ export type ContractMeta = {
name?: string;
address?: string;
chainId?: string;
- contextVariables?: {
+ /* contextVariables?: {
abiEncodedConstructorArguments?: string;
msgSender?: string;
- };
+ }; */
creatorTxHash?: string;
status?: Status;
statusMessage?: string;
@@ -388,8 +388,12 @@ export const verifyContractsInSession = async (
continue;
}
- const { address, chainId, contract, contextVariables, creatorTxHash } =
- contractWrapper;
+ const {
+ address,
+ chainId,
+ contract,
+ /* contextVariables, */ creatorTxHash,
+ } = contractWrapper;
// The session saves the CheckedContract as a simple object, so we need to reinstantiate it
const checkedContract = new CheckedContract(
@@ -412,7 +416,7 @@ export const verifyContractsInSession = async (
checkedContract,
chainId as string,
address as string,
- contextVariables,
+ /* contextVariables, */
creatorTxHash
);
// Send to verification again with all source files.
@@ -431,8 +435,8 @@ export const verifyContractsInSession = async (
const tempMatch = await verificationService.verifyDeployed(
contractWithAllSources,
chainId as string,
- address as string,
- contextVariables
+ address as string
+ /* contextVariables */
);
if (
tempMatch.status === "perfect" ||
diff --git a/src/server/controllers/VerificationController.ts b/src/server/controllers/VerificationController.ts
index 437571ed7..2f7d8eda9 100644
--- a/src/server/controllers/VerificationController.ts
+++ b/src/server/controllers/VerificationController.ts
@@ -132,7 +132,7 @@ export default class VerificationController
contract,
req.body.chain,
req.addresses[0], // Due to the old API taking an array of addresses.
- req.body.contextVariables,
+ /* req.body.contextVariables, */
req.body.creatorTxHash
);
// Send to verification again with all source files.
@@ -145,7 +145,7 @@ export default class VerificationController
contractWithAllSources,
req.body.chain,
req.addresses[0], // Due to the old API taking an array of addresses.
- req.body.contextVariables,
+ /* req.body.contextVariables, */
req.body.creatorTxHash
);
if (tempMatch.status === "perfect") {
@@ -231,7 +231,7 @@ export default class VerificationController
if (contractWrapper) {
contractWrapper.address = receivedContract.address;
contractWrapper.chainId = receivedContract.chainId;
- contractWrapper.contextVariables = receivedContract.contextVariables;
+ /* contractWrapper.contextVariables = receivedContract.contextVariables; */
contractWrapper.creatorTxHash = receivedContract.creatorTxHash;
if (isVerifiable(contractWrapper)) {
verifiable[id] = contractWrapper;
@@ -550,10 +550,10 @@ export default class VerificationController
.exists()
.bail()
.custom((chain, { req }) => (req.chain = checkChainId(chain))),
- body("contextVariables.msgSender").optional(),
- body("contextVariables.abiEncodedConstructorArguments").optional(),
+ /* body("contextVariables.msgSender").optional(),
+ body("contextVariables.abiEncodedConstructorArguments").optional(), */
// Handle non-json multipart/form-data requests.
- body("abiEncodedConstructorArguments")
+ /* body("abiEncodedConstructorArguments")
.optional()
.custom(
(abiEncodedConstructorArguments, { req }) =>
@@ -570,7 +570,7 @@ export default class VerificationController
msgSender,
...req.body.contextVariables,
})
- ),
+ ), */
body("creatorTxHash")
.optional()
.custom(
diff --git a/src/server/services/RepositoryService.ts b/src/server/services/RepositoryService.ts
index 0b9ea66ca..34628f113 100644
--- a/src/server/services/RepositoryService.ts
+++ b/src/server/services/RepositoryService.ts
@@ -7,7 +7,7 @@ import {
Create2Args,
StringMap,
Metadata,
- ContextVariables,
+ /* ContextVariables, */
CheckedContract,
} from "@ethereum-sourcify/lib-sourcify";
import { toChecksumAddress } from "web3-utils";
@@ -424,7 +424,7 @@ export default class RepositoryService implements IRepositoryService {
);
}
- if (
+ /* if (
match.contextVariables &&
Object.keys(match.contextVariables).length > 0
) {
@@ -435,7 +435,7 @@ export default class RepositoryService implements IRepositoryService {
"context-variables.json",
match.contextVariables
);
- }
+ } */
if (match.creatorTxHash) {
this.storeTxt(
diff --git a/src/server/services/VerificationService.ts b/src/server/services/VerificationService.ts
index b33e4cc7c..5a4e213af 100644
--- a/src/server/services/VerificationService.ts
+++ b/src/server/services/VerificationService.ts
@@ -3,7 +3,7 @@ import {
CheckedContract,
SourcifyChainMap,
Match,
- ContextVariables,
+ /* ContextVariables, */
} from "@ethereum-sourcify/lib-sourcify";
import { SourcifyEventManager } from "../../common/SourcifyEventManager/SourcifyEventManager";
import { getCreatorTx } from "./VerificationService-util";
@@ -13,7 +13,7 @@ export interface IVerificationService {
checkedContract: CheckedContract,
chainId: string,
address: string,
- contextVariables?: ContextVariables,
+ /* contextVariables?: ContextVariables, */
creatorTxHash?: string
): Promise;
}
@@ -28,7 +28,7 @@ export default class VerificationService implements IVerificationService {
checkedContract: CheckedContract,
chainId: string,
address: string,
- contextVariables?: ContextVariables,
+ /* contextVariables?: ContextVariables, */
creatorTxHash?: string
): Promise {
const sourcifyChain = this.supportedChainsMap[chainId];
@@ -38,7 +38,7 @@ export default class VerificationService implements IVerificationService {
checkedContract,
sourcifyChain,
address,
- contextVariables,
+ /* contextVariables, */
creatorTxHash
);
return match;
@@ -59,7 +59,7 @@ export default class VerificationService implements IVerificationService {
checkedContract,
sourcifyChain,
address,
- contextVariables,
+ /* contextVariables, */
foundCreatorTxHash
);
return match;
diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
index feabc1e91..d902e020a 100644
--- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
+++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
@@ -45,16 +45,16 @@ const ChainAddressForm = ({
const { sourcifyChains } = useContext(Context);
const verifyButtonRef = useRef(null);
const [isMoreFieldsOpen, setIsMoreFieldsOpen] = useState(false);
- const [abiEncodedConstructorArguments, setAbiEncodedConstructorArguments] =
+ /* const [abiEncodedConstructorArguments, setAbiEncodedConstructorArguments] =
useState("");
- const [msgSender, setMsgSender] = useState("");
+ const [msgSender, setMsgSender] = useState(""); */
const [isInvalidMsgSender, setIsInvalidMsgSender] = useState(false);
const [creatorTxHash, setCreatorTxHash] = useState("");
const [isInvalidCreatorTxHash, setIsInvalidCreatorTxHash] =
useState(false);
- const [showRawAbiInput, setShowRawAbiInput] = useState(false);
+ /* const [showRawAbiInput, setShowRawAbiInput] = useState(false);
const [isInvalidConstructorArguments, setIsInvalidConstructorArguments] =
- useState(false);
+ useState(false); */
useEffect(() => {
if (checkedContract.address) {
@@ -94,7 +94,7 @@ const ChainAddressForm = ({
console.log(`New id is: ${newChainId}`);
};
- const handleMsgSenderChange: ChangeEventHandler = (e) => {
+ /* const handleMsgSenderChange: ChangeEventHandler = (e) => {
const tempAddr = e.target.value;
setMsgSender(tempAddr);
const isValid = isAddress(tempAddr);
@@ -103,7 +103,7 @@ const ChainAddressForm = ({
return setIsInvalidMsgSender(true);
}
setIsInvalidMsgSender(false);
- };
+ }; */
const handleCreatorTxHashChange: ChangeEventHandler = (
e
@@ -124,10 +124,10 @@ const ChainAddressForm = ({
verificationId: checkedContract.verificationId || "",
address: address || "",
chainId: chainId,
- contextVariables: {
+ /* contextVariables: {
abiEncodedConstructorArguments,
msgSender,
- },
+ }, */
creatorTxHash,
}).finally(() => setIsLoading(false));
};
@@ -222,13 +222,15 @@ const ChainAddressForm = ({
className="mb-2"
/>
+ {/* Inputs below are used for verification with simulation
+
Inputs below will be used to simulate the creation of the contract.
This helps us verify contracts created by a factory contract.
If there are other variables your contract makes use of during
creation, please let us know.
- {/* Constructor arguments */}
+
{checkedContract?.constructorArgumentsArray &&
checkedContract?.constructorArgumentsArray.length > 0 && (
@@ -254,7 +256,7 @@ const ChainAddressForm = ({
/>
)}
- {/* msg.sender */}
+
Verify
diff --git a/ui/src/types.ts b/ui/src/types.ts
index 27abbed05..339830873 100644
--- a/ui/src/types.ts
+++ b/ui/src/types.ts
@@ -65,10 +65,10 @@ export type VerificationInput = {
verificationId: string;
chainId: string;
address: string;
- contextVariables: {
+ /* contextVariables: {
abiEncodedConstructorArguments?: string;
msgSender?: string;
- };
+ }; */
creatorTxHash?: string;
};
From 9f586b29e743a53a4e94f4adfb46dd852d6d9b3b Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 19 Apr 2023 14:49:11 +0200
Subject: [PATCH 03/48] Fix linting problem while creating ui build after
commenting out matchWithSimulation
---
.../CheckedContract/ChainAddressForm/index.tsx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
index d902e020a..2fe558120 100644
--- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
+++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
@@ -21,8 +21,8 @@ import { checkAllByAddresses } from "../../../../../utils/api";
import Message from "./Message";
import { HiChevronDown } from "react-icons/hi";
import ReactTooltip from "react-tooltip";
-import Constructorarguments from "../../../../../components/ConstructorArguments";
-import InputToggle from "../../../../../components/InputToggle";
+/* import Constructorarguments from "../../../../../components/ConstructorArguments";
+import InputToggle from "../../../../../components/InputToggle"; */
type ChainAddressFormProps = {
customStatus: string;
@@ -48,7 +48,7 @@ const ChainAddressForm = ({
/* const [abiEncodedConstructorArguments, setAbiEncodedConstructorArguments] =
useState("");
const [msgSender, setMsgSender] = useState(""); */
- const [isInvalidMsgSender, setIsInvalidMsgSender] = useState(false);
+ /* const [isInvalidMsgSender, setIsInvalidMsgSender] = useState(false); */
const [creatorTxHash, setCreatorTxHash] = useState("");
const [isInvalidCreatorTxHash, setIsInvalidCreatorTxHash] =
useState(false);
@@ -118,7 +118,8 @@ const ChainAddressForm = ({
const handleSubmit: FormEventHandler = (e) => {
e.preventDefault();
- if (!address || !chainId || isInvalidAddress || isInvalidMsgSender) return;
+ if (!address || !chainId || isInvalidAddress /* || isInvalidMsgSender */)
+ return;
setIsLoading(true);
verifyCheckedContract({
verificationId: checkedContract.verificationId || "",
From 486732cc5d7d0c24db3efaf263e97797f8f88260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Thu, 20 Apr 2023 14:08:10 +0300
Subject: [PATCH 04/48] Etherscan metadata variations (#976)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* #936 file variation while importing from etherscan
experiment to create files varations before running verification searching for perfect matches
* #936 generate the metadata with the hash that matches the one in the bytecode WIP
* add tryToFindOriginalMetadata to CheckedContract: tries to recontruct the original metadata by iterating on all files variations
* call tryToFindOriginalMetadata after `matchWithDeployedBytecode` if match is not perfect
* restore etherscan standard verification
* #936 tests working
* update package-json lib-sourcify
* #936 fix linting issues
* wait 1 second between every etherscan request
* #936 update non-session verify from etherscan controler
* #936 better function naming `getMetadataFromCompiler`
* #936 instead of recompiling each variation, recalculate the metadata hash by updating the source section of the metadata and generating the metadata CID
* #936 fix error on non existance of the path in sources
* #936 add coments to group by variations to make it more clear
* #936 replace the ipfs calculate hash
* I translated the ipfsHash.cpp file from the solidity repo
* now that everything is synchronous I simplified the code that replace the ipfs and bzz hash in the urls array in metadata.sources
* I added some comments to clearify the storebyhash grouped by variation
* fix default ipfs gateway
* #936 add test for tryToFindOriginalMetadata
* #936 add swarmBzzr0Hash and test metadata with both ipfs and swarm
* Add comments
* #936 refactor tryToFindOriginalMetadata adding types
* test in verification.spec.ts
* #976 add license type in MetadataSources
* #976 change test name for wrong end of line
* Update packages/lib-sourcify/test/verification.spec.ts
Co-authored-by: Kaan Uzdoğan
* #976 try to find original metadata for each verification method
* refactor `verifyDeployed` so that it uses the new function ´tryToFindOriginalMetadataAndMatch´
---------
Co-authored-by: Marco Castignoli
---
packages/lib-sourcify/package-lock.json | 86 ++++----
packages/lib-sourcify/package.json | 2 +
.../lib-sourcify/src/lib/CheckedContract.ts | 194 ++++++++++++++++--
.../src/lib/hashFunctions/ipfsHash.ts | 179 ++++++++++++++++
.../src/lib/hashFunctions/swarmHash.ts | 68 ++++++
packages/lib-sourcify/src/lib/types.ts | 14 +-
packages/lib-sourcify/src/lib/validation.ts | 32 ++-
packages/lib-sourcify/src/lib/verification.ts | 97 ++++++++-
packages/lib-sourcify/test/functions.spec.ts | 17 ++
.../test/sources/WrongMetadata/SimplyLog.json | 4 +
.../test/sources/WrongMetadata/artifact.json | 40 ++++
.../test/sources/WrongMetadata/metadata.json | 1 +
.../WrongMetadata/sources/SimplyLog.sol | 26 +++
.../lib-sourcify/test/verification.spec.ts | 19 ++
.../VerificationController-util.ts | 42 +++-
.../controllers/VerificationController.ts | 21 +-
test/etherscan.js | 4 +
test/server.js | 2 +-
18 files changed, 765 insertions(+), 83 deletions(-)
create mode 100644 packages/lib-sourcify/src/lib/hashFunctions/ipfsHash.ts
create mode 100644 packages/lib-sourcify/src/lib/hashFunctions/swarmHash.ts
create mode 100644 packages/lib-sourcify/test/sources/WrongMetadata/SimplyLog.json
create mode 100644 packages/lib-sourcify/test/sources/WrongMetadata/artifact.json
create mode 100644 packages/lib-sourcify/test/sources/WrongMetadata/metadata.json
create mode 100644 packages/lib-sourcify/test/sources/WrongMetadata/sources/SimplyLog.sol
diff --git a/packages/lib-sourcify/package-lock.json b/packages/lib-sourcify/package-lock.json
index 4fe0e0cd1..4eac17ef6 100644
--- a/packages/lib-sourcify/package-lock.json
+++ b/packages/lib-sourcify/package-lock.json
@@ -20,6 +20,8 @@
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
+ "@fairdatasociety/bmt-js": "^2.0.1",
+ "bs58": "^5.0.0",
"http-status-codes": "^2.2.0",
"isomorphic-fetch": "^3.0.0",
"jszip": "^3.10.1",
@@ -925,19 +927,6 @@
"node": ">=10"
}
},
- "node_modules/@ethereum-sourcify/bytecode-utils/node_modules/base-x": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
- "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
- },
- "node_modules/@ethereum-sourcify/bytecode-utils/node_modules/bs58": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
- "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
- "dependencies": {
- "base-x": "^4.0.0"
- }
- },
"node_modules/@ethereumjs/block": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-4.2.1.tgz",
@@ -1791,6 +1780,11 @@
"@ethersproject/strings": "^5.7.0"
}
},
+ "node_modules/@fairdatasociety/bmt-js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@fairdatasociety/bmt-js/-/bmt-js-2.0.1.tgz",
+ "integrity": "sha512-GyUy+BgJH8cbxbTWcKXDsvBJRNXjFdek9q+4HiMgMP5Fz/1fFxYn9xRdz8tu+evzAVNT57o8BeOVD3zPUoLMfw=="
+ },
"node_modules/@humanwhocodes/config-array": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz",
@@ -3150,13 +3144,18 @@
}
},
"node_modules/bs58": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
- "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
"dependencies": {
- "base-x": "^3.0.2"
+ "base-x": "^4.0.0"
}
},
+ "node_modules/bs58/node_modules/base-x": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
+ "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
+ },
"node_modules/bs58check": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz",
@@ -3167,6 +3166,14 @@
"safe-buffer": "^5.1.2"
}
},
+ "node_modules/bs58check/node_modules/bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "dependencies": {
+ "base-x": "^3.0.2"
+ }
+ },
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
@@ -15170,21 +15177,6 @@
"bs58": "^5.0.0",
"cbor-x": "^1.4.1",
"ethereum-provider": "^0.7.7"
- },
- "dependencies": {
- "base-x": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
- "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
- },
- "bs58": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
- "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
- "requires": {
- "base-x": "^4.0.0"
- }
- }
}
},
"@ethereumjs/block": {
@@ -15702,6 +15694,11 @@
"@ethersproject/strings": "^5.7.0"
}
},
+ "@fairdatasociety/bmt-js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@fairdatasociety/bmt-js/-/bmt-js-2.0.1.tgz",
+ "integrity": "sha512-GyUy+BgJH8cbxbTWcKXDsvBJRNXjFdek9q+4HiMgMP5Fz/1fFxYn9xRdz8tu+evzAVNT57o8BeOVD3zPUoLMfw=="
+ },
"@humanwhocodes/config-array": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz",
@@ -16718,11 +16715,18 @@
}
},
"bs58": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
- "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
"requires": {
- "base-x": "^3.0.2"
+ "base-x": "^4.0.0"
+ },
+ "dependencies": {
+ "base-x": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
+ "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
+ }
}
},
"bs58check": {
@@ -16733,6 +16737,16 @@
"bs58": "^4.0.0",
"create-hash": "^1.1.0",
"safe-buffer": "^5.1.2"
+ },
+ "dependencies": {
+ "bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "requires": {
+ "base-x": "^3.0.2"
+ }
+ }
}
},
"buffer": {
diff --git a/packages/lib-sourcify/package.json b/packages/lib-sourcify/package.json
index b1040aaa9..a3f9e7781 100644
--- a/packages/lib-sourcify/package.json
+++ b/packages/lib-sourcify/package.json
@@ -53,6 +53,8 @@
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
+ "@fairdatasociety/bmt-js": "^2.0.1",
+ "bs58": "^5.0.0",
"http-status-codes": "^2.2.0",
"isomorphic-fetch": "^3.0.0",
"jszip": "^3.10.1",
diff --git a/packages/lib-sourcify/src/lib/CheckedContract.ts b/packages/lib-sourcify/src/lib/CheckedContract.ts
index 36d8b8498..14e14d098 100644
--- a/packages/lib-sourcify/src/lib/CheckedContract.ts
+++ b/packages/lib-sourcify/src/lib/CheckedContract.ts
@@ -4,13 +4,19 @@ import {
InvalidSources,
JsonInput,
Metadata,
+ MetadataSources,
MissingSources,
+ PathContent,
RecompilationResult,
StringMap,
} from './types';
import semver from 'semver';
import { useCompiler } from './solidityCompiler';
import { fetchWithTimeout } from './utils';
+import { storeByHash } from './validation';
+import { decode as decodeBytecode } from '@ethereum-sourcify/bytecode-utils';
+import { ipfsHash } from './hashFunctions/ipfsHash';
+import { swarmBzzr0Hash, swarmBzzr1Hash } from './hashFunctions/swarmHash';
// TODO: find a better place for these constants. Reminder: this sould work also in the browser
const IPFS_PREFIX = 'dweb:/ipfs/';
@@ -20,10 +26,10 @@ const FETCH_TIMEOUT = parseInt(process.env.FETCH_TIMEOUT || '') || 3000; // ms
*/
export class CheckedContract {
/** Object containing contract metadata keys and values. */
- metadata: Metadata;
+ metadata!: Metadata;
/** SourceMap mapping the original compilation path to PathContent. */
- solidity: StringMap;
+ solidity!: StringMap;
/** Object containing the information about missing source files. */
missing: MissingSources;
@@ -35,19 +41,19 @@ export class CheckedContract {
solcJsonInput: any;
/** The path of the contract during compile-time. */
- compiledPath: string;
+ compiledPath!: string;
/** The version of the Solidity compiler to use for compilation. */
- compilerVersion: string;
+ compilerVersion!: string;
/** The name of the contract. */
- name: string;
+ name!: string;
/** The bytecodes of the contract. */
creationBytecode?: string;
/** The raw string representation of the contract's metadata. Needed to generate a unique session id for the CheckedContract*/
- metadataRaw: string;
+ metadataRaw!: string;
/** Checks whether this contract is valid or not.
* This is a static method due to persistence issues.
@@ -65,17 +71,10 @@ export class CheckedContract {
);
}
- public constructor(
- metadata: Metadata,
- solidity: StringMap,
- missing: MissingSources = {},
- invalid: InvalidSources = {}
- ) {
+ initSolcJsonInput(metadata: Metadata, solidity: StringMap) {
this.metadataRaw = JSON.stringify(metadata);
this.metadata = JSON.parse(JSON.stringify(metadata));
this.solidity = solidity;
- this.missing = missing;
- this.invalid = invalid;
if (metadata.compiler && metadata.compiler.version) {
this.compilerVersion = metadata.compiler.version;
@@ -91,6 +90,137 @@ export class CheckedContract {
this.name = contractName;
}
+ public constructor(
+ metadata: Metadata,
+ solidity: StringMap,
+ missing: MissingSources = {},
+ invalid: InvalidSources = {}
+ ) {
+ this.missing = missing;
+ this.invalid = invalid;
+ this.initSolcJsonInput(metadata, solidity);
+ }
+
+ /**
+ * Function to try to generate variations of the metadata of the contract such that it will match the one in the bytecode.
+ * Generates variations of the given source files and replaces the hashes in the metadata with the hashes of the variations.
+ * If found, replaces this.metadata and this.solidity with the found variations.
+ * Useful for finding perfect matches for known types of variations such as different line endings.
+ *
+ * @param deployedBytecode
+ * @returns
+ */
+ async tryToFindOriginalMetadata(
+ deployedBytecode: string
+ ): Promise {
+ const decodedAuxdata = decodeBytecode(deployedBytecode);
+
+ const pathContent: PathContent[] = Object.keys(this.solidity).map(
+ (path) => {
+ return {
+ path,
+ content: this.solidity[path] || '',
+ };
+ }
+ );
+
+ const byHash = storeByHash(pathContent);
+
+ /*
+ * storeByHash returns a mapping like this one:
+ * Map({
+ * Web3.utils.keccak256(variation.content): {
+ * content,
+ * path: pathContent.path,
+ * variation: contentVariator + '.' + endingVariator,
+ * }
+ * })
+ *
+ * we need to group all the different files by variation:
+ *
+ * {
+ * "1.1": [
+ * {
+ * content,
+ * path: pathContent.path,
+ * variation: "1.1",
+ * },
+ * ...
+ * ],
+ * "1.2": [...]
+ * }
+ */
+ const byVariation = groupBy(
+ // the second parameter of Array.from is needed to pass to the groupBy function
+ // an array of all the values of the the mapping, othwerise [key,value] is passed
+ Array.from(byHash, ([, value]) => value),
+ 'variation'
+ );
+
+ const metadata: Metadata = JSON.parse(this.metadataRaw);
+
+ // For each variation
+ // 1. replace: "keccak256" and "url" fields in the metadata with the hashes of the variation
+ // 2. take the hash of the modified metadata
+ // 3. Check if this will match the hash in the bytecode
+ for (const sources of Object.values(byVariation)) {
+ metadata.sources = sources.reduce((sources: MetadataSources, source) => {
+ if (metadata.sources[source.path]) {
+ sources[source.path] = metadata.sources[source.path];
+ sources[source.path].keccak256 = Web3.utils.keccak256(source.content);
+ if (sources[source.path].content) {
+ sources[source.path].content = source.content;
+ }
+ if (sources[source.path].urls) {
+ sources[source.path].urls = sources[source.path].urls?.map(
+ (url: string) => {
+ if (url.includes('dweb:/ipfs/')) {
+ return `dweb:/ipfs/${ipfsHash(source.content)}`;
+ }
+ if (url.includes('bzz-raw://')) {
+ // Here swarmBzzr1Hash is always used
+ // https://github.com/ethereum/solidity/blob/eb2f874eac0aa871236bf5ff04b7937c49809c33/libsolidity/interface/CompilerStack.cpp#L1549
+ return `bzz-raw://${swarmBzzr1Hash(source.content)}`;
+ }
+ return '';
+ }
+ );
+ }
+ }
+ return sources;
+ }, {});
+
+ if (decodedAuxdata?.ipfs) {
+ const compiledMetadataIpfsCID = ipfsHash(JSON.stringify(metadata));
+ if (decodedAuxdata?.ipfs === compiledMetadataIpfsCID) {
+ return new CheckedContract(
+ metadata,
+ getSolidityFromPathContents(sources)
+ );
+ }
+ }
+ if (decodedAuxdata?.bzzr1) {
+ const compiledMetadataBzzr1 = swarmBzzr1Hash(JSON.stringify(metadata));
+ if (decodedAuxdata?.bzzr1 === compiledMetadataBzzr1) {
+ return new CheckedContract(
+ metadata,
+ getSolidityFromPathContents(sources)
+ );
+ }
+ }
+ if (decodedAuxdata?.bzzr0) {
+ const compiledMetadataBzzr0 = swarmBzzr0Hash(JSON.stringify(metadata));
+ if (decodedAuxdata?.bzzr0 === compiledMetadataBzzr0) {
+ return new CheckedContract(
+ metadata,
+ getSolidityFromPathContents(sources)
+ );
+ }
+ }
+ }
+ return null;
+ }
+
public async recompile(): Promise {
if (!CheckedContract.isValid(this)) {
await CheckedContract.fetchMissing(this);
@@ -334,3 +464,39 @@ function createJsonInputFromMetadata(
export function getIpfsGateway(): string {
return process.env.IPFS_GATEWAY || 'https://ipfs.io/ipfs/';
}
+
+export const findContractPathFromContractName = (
+ contracts: any,
+ contractName: string
+): string | null => {
+ for (const key of Object.keys(contracts)) {
+ const contractsList = contracts[key];
+ if (Object.keys(contractsList).includes(contractName)) {
+ return key;
+ }
+ }
+ return null;
+};
+
+/**
+ * The groupBy function is a function that takes an
+ * array and a key as input,and returns an object containing
+ * an index of the array elements grouped by the value of
+ * the specified key.
+ */
+const groupBy = function (
+ xs: T[],
+ key: string
+): { index?: T[] } {
+ return xs.reduce(function (rv: { [index: string]: T[] }, x: T) {
+ (rv[x[key]] = rv[x[key]] || []).push(x);
+ return rv;
+ }, {});
+};
+
+const getSolidityFromPathContents = function (sources: PathContent[]) {
+ return sources.reduce((sources: StringMap, source) => {
+ sources[source.path] = source.content;
+ return sources;
+ }, {});
+};
diff --git a/packages/lib-sourcify/src/lib/hashFunctions/ipfsHash.ts b/packages/lib-sourcify/src/lib/hashFunctions/ipfsHash.ts
new file mode 100644
index 000000000..483a850bc
--- /dev/null
+++ b/packages/lib-sourcify/src/lib/hashFunctions/ipfsHash.ts
@@ -0,0 +1,179 @@
+// This is a ChatGPT typescript translation of the file https://github.com/ethereum/solidity/blob/develop/libsolutil/IpfsHash.cpp
+
+import bs58 from 'bs58';
+import * as crypto from 'crypto';
+
+interface Link {
+ hash: Buffer;
+ size: number;
+ blockSize: number;
+}
+
+function varintEncoding(n: number) {
+ const encoded = [];
+ while (n > 0x7f) {
+ encoded.push(0x80 | (n & 0x7f));
+ n >>= 7;
+ }
+ encoded.push(n);
+ return Buffer.from(encoded);
+}
+
+function encodeByteArray(data: Buffer) {
+ return Buffer.concat([
+ Buffer.from([0x0a]),
+ varintEncoding(data.length),
+ data,
+ ]);
+}
+
+function encodeHash(data: Buffer) {
+ return Buffer.concat([
+ Buffer.from([0x12, 0x20]),
+ crypto.createHash('sha256').update(data).digest(),
+ ]);
+}
+
+function encodeLinkData(data: Buffer) {
+ return Buffer.concat([
+ Buffer.from([0x12]),
+ varintEncoding(data.length),
+ data,
+ ]);
+}
+
+function base58Encode(data: Buffer) {
+ return bs58.encode(data);
+}
+
+function combineLinks(links: Link[]) {
+ let data = Buffer.alloc(0);
+ let lengths = Buffer.alloc(0);
+ const chunk = {
+ hash: Buffer.alloc(0),
+ size: 0,
+ blockSize: 0,
+ };
+
+ for (const link of links) {
+ chunk.size += link.size;
+ chunk.blockSize += link.blockSize;
+
+ data = Buffer.concat([
+ data,
+ encodeLinkData(
+ Buffer.concat([
+ Buffer.from([0x0a]),
+ varintEncoding(link.hash.length),
+ link.hash,
+ Buffer.from([0x12, 0x00, 0x18]),
+ varintEncoding(link.blockSize),
+ ])
+ ),
+ ]);
+
+ lengths = Buffer.concat([
+ lengths,
+ Buffer.from([0x20]),
+ varintEncoding(link.size),
+ ]);
+ }
+
+ const blockData = Buffer.concat([
+ data,
+ encodeByteArray(
+ Buffer.concat([
+ Buffer.from([0x08, 0x02, 0x18]),
+ varintEncoding(chunk.size),
+ lengths,
+ ])
+ ),
+ ]);
+
+ chunk.blockSize += blockData.length;
+ chunk.hash = encodeHash(blockData);
+
+ return chunk;
+}
+
+function buildNextLevel(currentLevel: Link[]) {
+ const maxChildNum = 174;
+ const nextLevel = [];
+ const links = [];
+
+ for (const chunk of currentLevel) {
+ links.push({
+ hash: chunk.hash,
+ size: chunk.size,
+ blockSize: chunk.blockSize,
+ });
+
+ if (links.length === maxChildNum) {
+ nextLevel.push(combineLinks(links));
+ links.length = 0;
+ }
+ }
+
+ if (links.length > 0) {
+ nextLevel.push(combineLinks(links));
+ }
+
+ return nextLevel;
+}
+
+function groupChunksBottomUp(currentLevel: Link[]) {
+ while (currentLevel.length !== 1) {
+ currentLevel = buildNextLevel(currentLevel);
+ }
+
+ return currentLevel[0].hash;
+}
+
+function ipfsHashData(data: Uint8Array) {
+ const maxChunkSize = 1024 * 256;
+ const chunkCount = Math.ceil(data.length / maxChunkSize);
+
+ const allChunks = [];
+
+ for (let chunkIndex = 0; chunkIndex < chunkCount; chunkIndex++) {
+ const chunkBytes = Buffer.from(
+ data.slice(chunkIndex * maxChunkSize, (chunkIndex + 1) * maxChunkSize)
+ );
+
+ const lengthAsVarint = varintEncoding(chunkBytes.length);
+
+ let protobufEncodedData = Buffer.concat([Buffer.from([0x08, 0x02])]);
+ if (chunkBytes.length > 0) {
+ protobufEncodedData = Buffer.concat([
+ protobufEncodedData,
+ Buffer.from([0x12]),
+ lengthAsVarint,
+ chunkBytes,
+ ]);
+ }
+ protobufEncodedData = Buffer.concat([
+ protobufEncodedData,
+ Buffer.from([0x18]),
+ lengthAsVarint,
+ ]);
+
+ const blockData = encodeByteArray(protobufEncodedData);
+
+ allChunks.push({
+ hash: encodeHash(blockData),
+ size: chunkBytes.length,
+ blockSize: blockData.length,
+ });
+ }
+
+ return groupChunksBottomUp(allChunks);
+}
+
+function ipfsHashBase58(data: Uint8Array): string {
+ return base58Encode(ipfsHashData(data));
+}
+
+export function ipfsHash(str: string) {
+ const buffer = new TextEncoder().encode(str);
+ return ipfsHashBase58(buffer);
+}
diff --git a/packages/lib-sourcify/src/lib/hashFunctions/swarmHash.ts b/packages/lib-sourcify/src/lib/hashFunctions/swarmHash.ts
new file mode 100644
index 000000000..d8eb75ee9
--- /dev/null
+++ b/packages/lib-sourcify/src/lib/hashFunctions/swarmHash.ts
@@ -0,0 +1,68 @@
+import { makeChunkedFile } from '@fairdatasociety/bmt-js';
+import Web3 from 'web3';
+
+export function swarmBzzr1Hash(file: string) {
+ // convert file to Uint8Array
+ const encoder = new TextEncoder();
+ const fileBytes = encoder.encode(file);
+
+ // Binary Merkle Tree on the file
+ const chunkedFile = makeChunkedFile(fileBytes);
+
+ // get the address from the chunked file
+ const bytes = chunkedFile.address();
+
+ // convert the address to hex string
+ const hexByte = (n: number) => n.toString(16).padStart(2, '0');
+ return Array.from(bytes, hexByte).join('');
+}
+
+function toLittleEndian(size: number): Uint8Array {
+ const encoded = new Uint8Array(8);
+ for (let i = 0; i < 8; ++i) {
+ encoded[i] = (size >> (8 * i)) & 0xff;
+ }
+ return encoded;
+}
+
+function swarmHashSimple(data: Uint8Array, size: number): string {
+ const combinedData = new Uint8Array([...toLittleEndian(size), ...data]);
+ return Web3.utils.keccak256(Buffer.from(combinedData.buffer).toString('hex'));
+}
+
+function swarmHashIntermediate(
+ input: Uint8Array,
+ offset: number,
+ length: number
+): string {
+ let ref: Uint8Array;
+ let innerNodes = new Uint8Array();
+
+ if (length <= 0x1000) {
+ ref = input.slice(offset, offset + length);
+ } else {
+ let maxRepresentedSize = 0x1000;
+ while (maxRepresentedSize * (0x1000 / 32) < length) {
+ maxRepresentedSize *= 0x1000 / 32;
+ }
+
+ for (let i = 0; i < length; i += maxRepresentedSize) {
+ const size = Math.min(maxRepresentedSize, length - i);
+ const innerNode = swarmHashIntermediate(input, offset + i, size);
+ innerNodes = new Uint8Array([
+ ...innerNodes,
+ ...new Uint8Array(Buffer.from(innerNode, 'hex')),
+ ]);
+ }
+
+ ref = innerNodes;
+ }
+
+ return swarmHashSimple(ref, length);
+}
+
+export function swarmBzzr0Hash(file: string): string {
+ const encoder = new TextEncoder();
+ const fileBytes = encoder.encode(file);
+ return swarmHashIntermediate(fileBytes, 0, fileBytes.length);
+}
diff --git a/packages/lib-sourcify/src/lib/types.ts b/packages/lib-sourcify/src/lib/types.ts
index 076454bb8..467d5efbb 100644
--- a/packages/lib-sourcify/src/lib/types.ts
+++ b/packages/lib-sourcify/src/lib/types.ts
@@ -27,7 +27,15 @@ export interface MissingSources {
};
}
-// @TODO: Fully define metadata
+export interface MetadataSources {
+ [index: string]: {
+ keccak256: string;
+ content?: string;
+ urls?: string[];
+ license?: string;
+ };
+}
+
export interface Metadata {
compiler: {
version: string;
@@ -48,9 +56,9 @@ export interface Metadata {
enabled: boolean;
runs: number;
};
- outputSelection: any;
+ outputSelection?: any;
};
- sources: any;
+ sources: MetadataSources;
}
// TODO: Fully define solcJsonInput
diff --git a/packages/lib-sourcify/src/lib/validation.ts b/packages/lib-sourcify/src/lib/validation.ts
index 1d63fdf32..5d645b01f 100644
--- a/packages/lib-sourcify/src/lib/validation.ts
+++ b/packages/lib-sourcify/src/lib/validation.ts
@@ -286,7 +286,7 @@ function rearrangeSources(metadata: any, byHash: Map) {
* @param {string[]} files Array containing sources.
* @returns Map object that maps hash to PathContent.
*/
-function storeByHash(files: PathContent[]): Map {
+export function storeByHash(files: PathContent[]): Map {
const byHash: Map = new Map();
for (const pathContent of files) {
@@ -300,18 +300,36 @@ function storeByHash(files: PathContent[]): Map {
}
function generateVariations(pathContent: PathContent): PathContent[] {
- const variations: string[] = [];
+ const variations: {
+ content: string;
+ contentVariator: number;
+ endingVariator: number;
+ }[] = [];
const original = pathContent.content;
- for (const contentVariator of CONTENT_VARIATORS) {
+ for (const [
+ CONTENT_VARIATORS_INDEX,
+ contentVariator,
+ ] of CONTENT_VARIATORS.entries()) {
const variatedContent = contentVariator(original);
- for (const endingVariator of ENDING_VARIATORS) {
+ for (const [
+ ENDING_VARIATORS_INDEX,
+ endingVariator,
+ ] of ENDING_VARIATORS.entries()) {
const variation = endingVariator(variatedContent);
- variations.push(variation);
+ variations.push({
+ content: variation,
+ contentVariator: CONTENT_VARIATORS_INDEX,
+ endingVariator: ENDING_VARIATORS_INDEX,
+ });
}
}
- return variations.map((content) => {
- return { content, path: pathContent.path };
+ return variations.map(({ content, contentVariator, endingVariator }) => {
+ return {
+ content,
+ path: pathContent.path,
+ variation: contentVariator + '.' + endingVariator,
+ };
});
}
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index 53cbeb737..8ff15b931 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -4,6 +4,7 @@ import {
Create2Args,
ImmutableReferences,
Match,
+ RecompilationResult,
SourcifyChain,
StringMap,
} from './types';
@@ -61,7 +62,22 @@ export async function verifyDeployed(
deployedBytecode,
recompiled.immutableReferences
);
- if (match.status) return match;
+ if (isPerfectMatch(match)) {
+ return match;
+ } else if (isPartialMatch(match)) {
+ return await tryToFindOriginalMetadataAndMatch(
+ checkedContract,
+ deployedBytecode,
+ match,
+ async (match, recompiled) => {
+ matchWithDeployedBytecode(
+ match,
+ recompiled.deployedBytecode,
+ deployedBytecode
+ );
+ }
+ );
+ }
// Try to match with simulating the creation bytecode
/*
@@ -73,9 +89,26 @@ export async function verifyDeployed(
sourcifyChain.chainId.toString(),
contextVariables
);
- if (match.status) {
- match.contextVariables = contextVariables;
+ if (isPerfectMatch(match)) {
+ (match as Match).contextVariables = contextVariables;
return match;
+ } else if (isPartialMatch(match)) {
+ return await tryToFindOriginalMetadataAndMatch(
+ checkedContract,
+ deployedBytecode,
+ match,
+ async (match, recompiled) => {
+ await matchWithSimulation(
+ match,
+ recompiled.creationBytecode,
+ deployedBytecode,
+ checkedContract.metadata.settings.evmVersion,
+ sourcifyChain.chainId.toString(),
+ contextVariables
+ );
+ match.contextVariables = contextVariables;
+ }
+ );
}
*/
@@ -88,7 +121,24 @@ export async function verifyDeployed(
address,
creatorTxHash
);
- if (match.status) return match;
+ if (isPerfectMatch(match)) {
+ return match;
+ } else if (isPartialMatch(match)) {
+ return await tryToFindOriginalMetadataAndMatch(
+ checkedContract,
+ deployedBytecode,
+ match,
+ async (match, recompiled) => {
+ await matchWithCreationTx(
+ match,
+ recompiled.creationBytecode,
+ sourcifyChain,
+ address,
+ creatorTxHash
+ );
+ }
+ );
+ }
}
// Case when extra unused files in compiler input cause different bytecode (https://github.com/ethereum/sourcify/issues/618)
@@ -103,8 +153,8 @@ export async function verifyDeployed(
const [, recompiledAuxdata] = splitAuxdata(recompiled.deployedBytecode);
// Metadata hashes match but bytecodes don't match.
if (deployedAuxdata === recompiledAuxdata) {
- match.status = 'extra-file-input-bug';
- match.message =
+ (match as Match).status = 'extra-file-input-bug';
+ (match as Match).message =
'It seems your contract has either Solidity v0.6.12 or v0.7.0, and the metadata hashes match but not the bytecodes. You should add all the files input to the compiler during compilation and remove all others. See the issue for more information: https://github.com/ethereum/sourcify/issues/618';
return match;
}
@@ -113,6 +163,33 @@ export async function verifyDeployed(
throw Error("The deployed and recompiled bytecode don't match.");
}
+async function tryToFindOriginalMetadataAndMatch(
+ checkedContract: CheckedContract,
+ deployedBytecode: string,
+ match: Match,
+ matchFunction: (
+ match: Match,
+ recompilationResult: RecompilationResult
+ ) => Promise
+): Promise {
+ const checkedContractWithOriginalMetadata =
+ await checkedContract.tryToFindOriginalMetadata(deployedBytecode);
+ if (checkedContractWithOriginalMetadata) {
+ const matchWithOriginalMetadata = { ...match };
+ const recompiled = await checkedContractWithOriginalMetadata.recompile();
+
+ await matchFunction(matchWithOriginalMetadata, recompiled);
+ if (isPerfectMatch(matchWithOriginalMetadata)) {
+ checkedContract.initSolcJsonInput(
+ checkedContractWithOriginalMetadata.metadata,
+ checkedContractWithOriginalMetadata.solidity
+ );
+ return matchWithOriginalMetadata;
+ }
+ }
+ return match;
+}
+
export async function verifyCreate2(
checkedContract: CheckedContract,
deployerAddress: string,
@@ -532,3 +609,11 @@ function doesContainMetadataHash(bytecode: string) {
}
return containsMetadata;
}
+
+function isPerfectMatch(match: Match): match is Match {
+ return match.status === 'perfect';
+}
+
+function isPartialMatch(match: Match): match is Match {
+ return match.status === 'partial';
+}
diff --git a/packages/lib-sourcify/test/functions.spec.ts b/packages/lib-sourcify/test/functions.spec.ts
index 1ee5b6d75..4ab5c44e5 100644
--- a/packages/lib-sourcify/test/functions.spec.ts
+++ b/packages/lib-sourcify/test/functions.spec.ts
@@ -14,6 +14,8 @@ import {
} from '../src/lib/CheckedContract';
import storageMetadata from './sources/Storage/metadata.json';
import { Metadata, MissingSources } from '../src/lib/types';
+import WrongMetadata from './sources/WrongMetadata/metadata.json';
+import SimplyLog from './sources/WrongMetadata/SimplyLog.json';
describe('Verify Solidity Compiler', () => {
it('Should fetch latest SolcJS compiler', async () => {
@@ -160,4 +162,19 @@ describe('Checked contract', () => {
expect(sources).lengthOf(1);
expect(sources[0]).equals('Storage.sol');
});
+ it('Should tryToFindOriginalMetadata from checked contract', async () => {
+ const contract = new CheckedContract(WrongMetadata as Metadata, {
+ 'SimplyLog.sol': SimplyLog.source,
+ });
+
+ const contractWithOriginalMetadata =
+ await contract.tryToFindOriginalMetadata(SimplyLog.bytecode);
+ expect(contractWithOriginalMetadata).is.not.equal(null);
+ expect(
+ contractWithOriginalMetadata?.metadata?.sources['SimplyLog.sol']
+ ?.keccak256
+ ).equals(
+ '0x8e7a1207ba791693fd76c6cf3e99908f53b8c67a5ae9f7b4ab628c74901711c9'
+ );
+ });
});
diff --git a/packages/lib-sourcify/test/sources/WrongMetadata/SimplyLog.json b/packages/lib-sourcify/test/sources/WrongMetadata/SimplyLog.json
new file mode 100644
index 000000000..e542dbb33
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WrongMetadata/SimplyLog.json
@@ -0,0 +1,4 @@
+{
+ "bytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806341304fac1461003b578063eefbf17e14610060575b600080fd5b61004e6100493660046100ca565b610069565b60405190815260200160405180910390f35b61004e60005481565b6000805460405181907f48197b8eaf01bc9d46384d798a981a4537fc58dcd35ece37054dddbba8418edf906100a1908790879061013c565b60405180910390a260016000808282546100bb919061016b565b90915550909150505b92915050565b600080602083850312156100dd57600080fd5b823567ffffffffffffffff808211156100f557600080fd5b818501915085601f83011261010957600080fd5b81358181111561011857600080fd5b86602082850101111561012a57600080fd5b60209290920196919550909350505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b808201808211156100c457634e487b7160e01b600052601160045260246000fdfea2646970667358221220d47692de99253af8b2a9835fa8c6cde8d7f24fe3a76c340c9b9462e24144124264736f6c63430008130033",
+ "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.8.19;\r\n\r\n/**\r\n * @notice Simply logs strings\r\n */\r\ncontract SimplyLog {\r\n /**\r\n * @notice The ID of the next message to be logged\r\n */\r\n uint256 public nextMessageId = 0;\r\n event Log(uint256 indexed messageId, string message);\r\n \r\n /**\r\n * @notice Log a message.\r\n * @param message Message to log\r\n * @return message id that was logged\r\n */\r\n function log(string calldata message) public returns (uint256) {\r\n uint256 messageId = nextMessageId;\r\n emit Log(messageId, message);\r\n nextMessageId += 1;\r\n return messageId;\r\n }\r\n}"
+}
diff --git a/packages/lib-sourcify/test/sources/WrongMetadata/artifact.json b/packages/lib-sourcify/test/sources/WrongMetadata/artifact.json
new file mode 100644
index 000000000..95e6f0cd3
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WrongMetadata/artifact.json
@@ -0,0 +1,40 @@
+{
+ "abi": [
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "messageId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "message",
+ "type": "string"
+ }
+ ],
+ "name": "Log",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ { "internalType": "string", "name": "message", "type": "string" }
+ ],
+ "name": "log",
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextMessageId",
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60806040526000805534801561001457600080fd5b506101c2806100246000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806341304fac1461003b578063eefbf17e14610060575b600080fd5b61004e6100493660046100ca565b610069565b60405190815260200160405180910390f35b61004e60005481565b6000805460405181907f48197b8eaf01bc9d46384d798a981a4537fc58dcd35ece37054dddbba8418edf906100a1908790879061013c565b60405180910390a260016000808282546100bb919061016b565b90915550909150505b92915050565b600080602083850312156100dd57600080fd5b823567ffffffffffffffff808211156100f557600080fd5b818501915085601f83011261010957600080fd5b81358181111561011857600080fd5b86602082850101111561012a57600080fd5b60209290920196919550909350505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b808201808211156100c457634e487b7160e01b600052601160045260246000fdfea26469706673582212202b316dd16def116bc86710e208b5bc3b14461349681445b3f3fcb0aae41ec9b964736f6c63430008130033"
+}
diff --git a/packages/lib-sourcify/test/sources/WrongMetadata/metadata.json b/packages/lib-sourcify/test/sources/WrongMetadata/metadata.json
new file mode 100644
index 000000000..4c5d4fde0
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WrongMetadata/metadata.json
@@ -0,0 +1 @@
+{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"messageId","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"Log","type":"event"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"log","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nextMessageId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"devdoc":{"kind":"dev","methods":{"log(string)":{"params":{"message":"Message to log"},"returns":{"_0":"message id that was logged"}}},"version":1},"userdoc":{"kind":"user","methods":{"log(string)":{"notice":"Log a message."},"nextMessageId()":{"notice":"The ID of the next message to be logged"}},"notice":"Simply logs strings","version":1}},"settings":{"compilationTarget":{"SimplyLog.sol":"SimplyLog"},"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"SimplyLog.sol":{"keccak256":"0x07cbf4f3331eb939fc37ecde50f9685a595f554a3ed3a7f828d485c3d7cac3f5","license":"MIT","urls":["bzz-raw://96f37b60ba400074ef99e48659a811834df4cbfc42219c759fc28661cf5233da","dweb:/ipfs/QmRB4GmE2Egu5R5xUu1BKHRScAmxu5xjuKfVZXjNVnxoms"]}},"version":1}
\ No newline at end of file
diff --git a/packages/lib-sourcify/test/sources/WrongMetadata/sources/SimplyLog.sol b/packages/lib-sourcify/test/sources/WrongMetadata/sources/SimplyLog.sol
new file mode 100644
index 000000000..e5a3bd73e
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WrongMetadata/sources/SimplyLog.sol
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: MIT
+
+pragma solidity ^0.8.19;
+
+/**
+ * @notice Simply logs strings
+ */
+contract SimplyLog {
+ /**
+ * @notice The ID of the next message to be logged
+ */
+ uint256 public nextMessageId = 0;
+ event Log(uint256 indexed messageId, string message);
+
+ /**
+ * @notice Log a message.
+ * @param message Message to log
+ * @return message id that was logged
+ */
+ function log(string calldata message) public returns (uint256) {
+ uint256 messageId = nextMessageId;
+ emit Log(messageId, message);
+ nextMessageId += 1;
+ return messageId;
+ }
+}
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index 9371422d5..ea32b7f16 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -344,6 +344,25 @@ describe('lib-sourcify tests', () => {
expectMatch(match, 'perfect', childAddress);
});
*/
+ it('should fully verify a contract which is originally compiled and deployed with Unix style End Of Line (EOL) source code, but being verified with Windows style (CRLF) EOL source code', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'WrongMetadata'
+ );
+ const [deployedAddress] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0]
+ );
+
+ const match = await checkAndVerifyDeployed(
+ contractFolderPath,
+ sourcifyChainGanache,
+ deployedAddress
+ );
+ expectMatch(match, 'perfect', deployedAddress);
+ });
});
describe('Unit tests', function () {
diff --git a/src/server/controllers/VerificationController-util.ts b/src/server/controllers/VerificationController-util.ts
index c8509702a..b6538910d 100644
--- a/src/server/controllers/VerificationController-util.ts
+++ b/src/server/controllers/VerificationController-util.ts
@@ -15,6 +15,7 @@ import {
useAllSources,
useCompiler,
JsonInput,
+ Metadata,
} from "@ethereum-sourcify/lib-sourcify";
import { checkChainId } from "../../sourcify-chains";
import { validationResult } from "express-validator";
@@ -509,7 +510,7 @@ export const getSolcJsonInputFromEtherscanResult = (
},
outputSelection: {
"*": {
- "*": ["metadata"],
+ "*": ["metadata", "evm.deployedBytecode.object"],
},
},
evmVersion:
@@ -571,12 +572,18 @@ export const processRequestFromEtherscan = async (
// TODO: this is not used by lib-sourcify's useCompiler
const contractName = contractResultJson.ContractName;
- let solcJsonInput;
+ let solcJsonInput: JsonInput;
// SourceCode can be the Solidity code if there is only one contract file, or the json object if there are multiple files
if (isEtherscanSolcJsonInput(sourceCodeObject)) {
solcJsonInput = parseSolcJsonInput(sourceCodeObject);
- // Tell compiler to output metadata
- solcJsonInput.settings.outputSelection["*"]["*"] = ["metadata"];
+
+ if (solcJsonInput?.settings) {
+ // Tell compiler to output metadata and bytecode
+ solcJsonInput.settings.outputSelection["*"]["*"] = [
+ "metadata",
+ "evm.deployedBytecode.object",
+ ];
+ }
} else if (isEtherscanMultipleFilesObject(sourceCodeObject)) {
solcJsonInput = getSolcJsonInputFromEtherscanResult(
contractResultJson,
@@ -595,6 +602,24 @@ export const processRequestFromEtherscan = async (
);
}
+ if (!solcJsonInput) {
+ throw new BadRequestError(
+ "Sourcify cannot generate the solcJsonInput from Etherscan result"
+ );
+ }
+
+ return {
+ compilerVersion,
+ solcJsonInput,
+ contractName,
+ };
+};
+
+export const getMetadataFromCompiler = async (
+ compilerVersion: string,
+ solcJsonInput: JsonInput,
+ contractName: string
+): Promise => {
const compilationResult = await useCompiler(compilerVersion, solcJsonInput);
const contractPath = findContractPathFromContractName(
@@ -608,12 +633,9 @@ export const processRequestFromEtherscan = async (
);
}
- return {
- metadata: JSON.parse(
- compilationResult.contracts[contractPath][contractName].metadata
- ),
- solcJsonInput,
- };
+ return JSON.parse(
+ compilationResult.contracts[contractPath][contractName].metadata
+ );
};
export const getMappedSourcesFromJsonInput = (jsonInput: JsonInput) => {
diff --git a/src/server/controllers/VerificationController.ts b/src/server/controllers/VerificationController.ts
index 2f7d8eda9..6013a5ce7 100644
--- a/src/server/controllers/VerificationController.ts
+++ b/src/server/controllers/VerificationController.ts
@@ -38,6 +38,7 @@ import {
Create2VerifyRequest,
extractFilesFromJSON,
SessionCreate2VerifyRequest,
+ getMetadataFromCompiler,
} from "./VerificationController-util";
import { body } from "express-validator";
import {
@@ -309,9 +310,13 @@ export default class VerificationController
const chain = req.body.chain as string;
const address = req.body.address;
- const { metadata, solcJsonInput } = await processRequestFromEtherscan(
- chain,
- address
+ const { compilerVersion, solcJsonInput, contractName } =
+ await processRequestFromEtherscan(chain, address);
+
+ const metadata = await getMetadataFromCompiler(
+ compilerVersion,
+ solcJsonInput,
+ contractName
);
const mappedSources = getMappedSourcesFromJsonInput(solcJsonInput);
@@ -338,9 +343,13 @@ export default class VerificationController
const chain = req.body.chainId as string;
const address = req.body.address;
- const { metadata, solcJsonInput } = await processRequestFromEtherscan(
- chain,
- address
+ const { compilerVersion, solcJsonInput, contractName } =
+ await processRequestFromEtherscan(chain, address);
+
+ const metadata = await getMetadataFromCompiler(
+ compilerVersion,
+ solcJsonInput,
+ contractName
);
const pathContents: PathContent[] = Object.keys(solcJsonInput.sources).map(
diff --git a/test/etherscan.js b/test/etherscan.js
index 4a1a318dd..f9ae2a420 100644
--- a/test/etherscan.js
+++ b/test/etherscan.js
@@ -31,6 +31,10 @@ chai.use(chaiHttp);
const CUSTOM_PORT = 5678;
describe("Import From Etherscan and Verify", function () {
+ this.beforeEach(async function () {
+ await waitSecs(1);
+ });
+
// Don't run if it's an external PR. Etherscan tests need API keys that can't be exposed to external PRs.
if (process.env.CIRCLE_PR_REPONAME !== undefined) {
return;
diff --git a/test/server.js b/test/server.js
index 97ccf0db2..441e9feda 100644
--- a/test/server.js
+++ b/test/server.js
@@ -707,7 +707,7 @@ describe("Server", function () {
);
});
- it("should verify a contract with immutables and save creator-tx-hash.txt", async () => {
+ it("should verify a contract with immutables and save immutable-references.json", async () => {
const artifact = require("./testcontracts/WithImmutables/artifact.json");
const [address] = await deployFromAbiAndBytecodeForCreatorTxHash(
localWeb3Provider,
From b69c940224d87fa3f93f5d9b123ae42bf93ab861 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Fri, 21 Apr 2023 11:37:23 +0200
Subject: [PATCH 05/48] fix #989 EventManager fails if listeners are not set
---
src/common/EventManager.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/EventManager.ts b/src/common/EventManager.ts
index e3179138d..d171ff123 100644
--- a/src/common/EventManager.ts
+++ b/src/common/EventManager.ts
@@ -27,7 +27,7 @@ export class EventManager {
listener(event, ...(args as Array))
);
}
- return this.listeners[event].map((listener: any) =>
+ return this.listeners[event]?.map((listener: any) =>
listener(...(args as Array))
);
}
From 5af31a06d5c2eb8f9b040274599fa54deb602f61 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Fri, 21 Apr 2023 11:42:04 +0200
Subject: [PATCH 06/48] #983 update h5ai-nging submodule to latest version *
fix address checksum in repository
---
h5ai-nginx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/h5ai-nginx b/h5ai-nginx
index db81f893c..35418954f 160000
--- a/h5ai-nginx
+++ b/h5ai-nginx
@@ -1 +1 @@
-Subproject commit db81f893cc73e97df4f5317661af6b3994921d23
+Subproject commit 35418954f6cd11023a2a644b5fb9db0e5cc7a981
From 5bf04ed65f947556cc872440db7ceac403922242 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Fri, 21 Apr 2023 11:45:07 +0200
Subject: [PATCH 07/48] #936 fix how the ui handles non-checksummed addresses
(#990)
* instead of verifying if an address is valid, tries to checksum it
---
.../ChainAddressForm/index.tsx | 21 ++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
index 2fe558120..f9865052e 100644
--- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
+++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
@@ -1,5 +1,5 @@
import { isHexString } from "@ethersproject/bytes";
-import { isAddress } from "@ethersproject/address";
+import { getAddress } from "@ethersproject/address";
import React, {
ChangeEventHandler,
FormEventHandler,
@@ -68,20 +68,27 @@ const ChainAddressForm = ({
const handleAddressChange: ChangeEventHandler = (e) => {
const tempAddr = e.target.value;
- setAddress(tempAddr);
- const isValid = isAddress(tempAddr);
- if (!isValid) {
+ let checksummedAddress: string;
+ try {
+ // getAddress: returns the checksummed address only if you pass all lowercase
+ // if you pass a wrong checksum then in throws, so I'm converting the address
+ // to lowercase
+ checksummedAddress = getAddress(tempAddr.toLowerCase());
+ setAddress(checksummedAddress);
+ setIsInvalidAddress(false);
+ } catch (e) {
setFoundMatches(undefined);
+ setAddress(tempAddr);
return setIsInvalidAddress(true);
}
- setIsInvalidAddress(false);
+
checkAllByAddresses(
- tempAddr,
+ checksummedAddress,
sourcifyChains.map((c) => c.chainId.toString()).join(",")
).then((res) => {
// checkAllByAddresses inputs and outptus multiple addresses.
const currentAddressMatches = res.find(
- (match) => (match.address = tempAddr)
+ (match) => (match.address = checksummedAddress)
);
setFoundMatches(currentAddressMatches);
});
From d8efcb4f8c1ce555c8c4a0b37fa1016c169e1062 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Fri, 21 Apr 2023 17:04:16 +0300
Subject: [PATCH 08/48] Add github star button
---
ui/src/assets/icons/github.svg | 1 -
ui/src/components/Header/index.tsx | 21 ++++++++++++---------
2 files changed, 12 insertions(+), 10 deletions(-)
delete mode 100644 ui/src/assets/icons/github.svg
diff --git a/ui/src/assets/icons/github.svg b/ui/src/assets/icons/github.svg
deleted file mode 100644
index f376c3efe..000000000
--- a/ui/src/assets/icons/github.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/ui/src/components/Header/index.tsx b/ui/src/components/Header/index.tsx
index 43e9a85ea..a5bb749bb 100644
--- a/ui/src/components/Header/index.tsx
+++ b/ui/src/components/Header/index.tsx
@@ -2,7 +2,6 @@ import { useState } from "react";
import { HiMenu } from "react-icons/hi";
import { Link } from "react-router-dom";
import ReactTooltip from "react-tooltip";
-import { ReactComponent as Github } from "../../assets/icons/github.svg";
import { ReactComponent as Matrix } from "../../assets/icons/matrix.svg";
import { ReactComponent as Twitter } from "../../assets/icons/twitter.svg";
import logoText from "../../assets/logo-rounded.svg";
@@ -68,16 +67,20 @@ const Header = () => {
>
Playground
+
+
+
{/* Icons */}
-
-
-
-
+
Date: Mon, 24 Apr 2023 15:29:08 +0800
Subject: [PATCH 09/48] Add chain 999
---
src/sourcify-chains.ts | 9 +++++++--
test/chains/chain-tests.js | 19 +++++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index 990b49842..59f620f9c 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -699,6 +699,11 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
contractFetchAddress: "https://goerli.basescan.org/" + ETHERSCAN_SUFFIX,
txRegex: ETHERSCAN_REGEX,
},
+ "999": {
+ supported: true,
+ monitored: false,
+ txRegex: ETHERSCAN_REGEX,
+ },
};
const sourcifyChainsMap: SourcifyChainMap = {};
@@ -765,8 +770,8 @@ export function getSortedChainsArray(
getPrimarySortKey(a) > getPrimarySortKey(b)
? 1
: getPrimarySortKey(b) > getPrimarySortKey(a)
- ? -1
- : 0
+ ? -1
+ : 0
);
const sortedChains = etherumChains.concat(otherChains);
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index 504a3dc23..7b5f1a015 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1354,6 +1354,25 @@ describe("Test Supported Chains", function () {
"shared/withImmutables.metadata.json"
);
+ // Wanchain Testnet
+ verifyContract(
+ "0x500E12a948E9Fc594bC6Fe86B3B270B5a67332D8",
+ "999",
+ "Wanchain Testnet",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+
+ verifyContractWithImmutables(
+ "0x0E23Ac3B13094CDe8667C7B2aAC3900781d7b2c1",
+ "999",
+ "Wanchain Testnet",
+ ["uint256"],
+ [0x12345678],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
+
//////////////////////
// Helper functions //
//////////////////////
From 57458eaed08dac068f368bd9dac72d26fda8cd8e Mon Sep 17 00:00:00 2001
From: lolieatapple <54833180+lolieatapple@users.noreply.github.com>
Date: Mon, 24 Apr 2023 15:46:41 +0800
Subject: [PATCH 10/48] Add chain 888
---
src/sourcify-chains.ts | 7 +++++++
test/chains/chain-tests.js | 18 ++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index 59f620f9c..b90de1ca4 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -699,7 +699,14 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
contractFetchAddress: "https://goerli.basescan.org/" + ETHERSCAN_SUFFIX,
txRegex: ETHERSCAN_REGEX,
},
+ "888": {
+ // Wanchain Mainnet
+ supported: true,
+ monitored: false,
+ txRegex: ETHERSCAN_REGEX,
+ },
"999": {
+ // Wanchain Testnet
supported: true,
monitored: false,
txRegex: ETHERSCAN_REGEX,
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index 7b5f1a015..c661eb5e1 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1354,6 +1354,24 @@ describe("Test Supported Chains", function () {
"shared/withImmutables.metadata.json"
);
+ // Wanchain Mainnet
+ verifyContract(
+ "0xC3649123BCa36c0c38A71bDbd2F508AB4f939f47",
+ "888",
+ "Wanchain Mainnet",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+ verifyContractWithImmutables(
+ "0xAc7Df63C447201965222dF9675E8d4A78c3CA315",
+ "888",
+ "Wanchain Mainnet",
+ ["uint256"],
+ [888],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
+
// Wanchain Testnet
verifyContract(
"0x500E12a948E9Fc594bC6Fe86B3B270B5a67332D8",
From dcadfe5f132dad7e50bbe9a074e4bcf2535849ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Mon, 24 Apr 2023 17:00:02 +0200
Subject: [PATCH 11/48] Change Etherscan chain 43113 test
Change the contract since it required creatorTxHash scarping and causes
CAPTCHA in regular etherscan instance tests
---
test/helpers/etherscanInstanceContracts.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/helpers/etherscanInstanceContracts.json b/test/helpers/etherscanInstanceContracts.json
index 0669655c4..91896ce29 100644
--- a/test/helpers/etherscanInstanceContracts.json
+++ b/test/helpers/etherscanInstanceContracts.json
@@ -108,7 +108,7 @@
"expectedStatus": "partial"
},
{
- "address": "0x28CA70cc5732D042381F9240bf45aB1b493aEFef",
+ "address": "0x2F7cD28b85ffA84F62b068f5b586B14Abea5E05c",
"type": "standard-json",
"expectedStatus": "perfect"
}
From 0c9b0a4f73040e6cf5b72fe5e9142b41c423fead Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Mon, 24 Apr 2023 18:13:51 +0200
Subject: [PATCH 12/48] fix #978 reorder the metadata object before generating
the variations
---
.../lib-sourcify/src/lib/CheckedContract.ts | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/packages/lib-sourcify/src/lib/CheckedContract.ts b/packages/lib-sourcify/src/lib/CheckedContract.ts
index 14e14d098..898aa99b5 100644
--- a/packages/lib-sourcify/src/lib/CheckedContract.ts
+++ b/packages/lib-sourcify/src/lib/CheckedContract.ts
@@ -157,7 +157,12 @@ export class CheckedContract {
'variation'
);
- const metadata: Metadata = JSON.parse(this.metadataRaw);
+ // We should canonicalize the metadata when we are generation "metadata variations" when we have a partial match.
+ // It could be that the verifier somehow mixed the orderings of the metadata or added whitespaces etc.
+ // For more information read https://github.com/ethereum/sourcify/issues/978
+ const metadata: Metadata = reorderAlphabetically(
+ JSON.parse(this.metadataRaw)
+ ) as Metadata;
// For each variation
// 1. replace: "keccak256" and "url" fields in the metadata with the hashes of the variation
@@ -500,3 +505,20 @@ const getSolidityFromPathContents = function (sources: PathContent[]) {
return sources;
}, {});
};
+
+function reorderAlphabetically(obj: any): any {
+ // Do not reorder arrays or other types
+ if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
+ return obj;
+ }
+
+ const ordered: any = {};
+
+ Object.keys(obj)
+ .sort((a, b) => a.localeCompare(b))
+ .forEach((key: string) => {
+ ordered[key] = reorderAlphabetically(obj[key]);
+ });
+
+ return ordered;
+}
From 3178bd32085165c520d00f3b64568a0a73a6da95 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 26 Apr 2023 09:03:21 +0200
Subject: [PATCH 13/48] fix #978 add test for not alphabetically sorted
metadata
---
.../StorageUnsortedMetadata/metadata.json | 62 +++++++++++++++++++
.../lib-sourcify/test/verification.spec.ts | 35 +++++++++++
2 files changed, 97 insertions(+)
create mode 100644 packages/lib-sourcify/test/sources/StorageUnsortedMetadata/metadata.json
diff --git a/packages/lib-sourcify/test/sources/StorageUnsortedMetadata/metadata.json b/packages/lib-sourcify/test/sources/StorageUnsortedMetadata/metadata.json
new file mode 100644
index 000000000..6de88b14b
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/StorageUnsortedMetadata/metadata.json
@@ -0,0 +1,62 @@
+{
+ "version": 1,
+ "compiler": { "version": "0.8.4+commit.c7e474f2" },
+ "language": "Solidity",
+ "output": {
+ "abi": [
+ {
+ "inputs": [],
+ "name": "retrieve",
+ "outputs": [
+ { "internalType": "uint256", "name": "", "type": "uint256" }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "uint256", "name": "num", "type": "uint256" }
+ ],
+ "name": "store",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+ ],
+ "devdoc": {
+ "version": 1,
+ "details": "Store & retrieve value in a variable",
+ "kind": "dev",
+ "methods": {
+ "retrieve()": {
+ "details": "Return value ",
+ "returns": { "_0": "value of 'number'" }
+ },
+ "store(uint256)": {
+ "details": "Store value in variable",
+ "params": { "num": "value to store" }
+ }
+ },
+ "title": "Storage"
+ },
+ "userdoc": { "kind": "user", "methods": {}, "version": 1 }
+ },
+ "settings": {
+ "compilationTarget": { "project:/contracts/Storage.sol": "Storage" },
+ "evmVersion": "istanbul",
+ "libraries": {},
+ "metadata": { "bytecodeHash": "ipfs" },
+ "optimizer": { "enabled": false, "runs": 200 },
+ "remappings": []
+ },
+ "sources": {
+ "project:/contracts/Storage.sol": {
+ "keccak256": "0x88c47206b5ec3d60ab820e9d126c4ac54cb17fa7396ff49ebe27db2862982ad8",
+ "license": "GPL-3.0",
+ "urls": [
+ "bzz-raw://5d1eeb01c8c10bed9e290f4a80a8d4081422a7b298a13049d72867022522cf6b",
+ "dweb:/ipfs/QmaFRC9ZtT7y3t9XNWCbDuMTEwKkyaQJzYFzw3NbeohSn5"
+ ]
+ }
+ }
+}
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index ea32b7f16..8a3675638 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -22,7 +22,9 @@ import {
matchWithCreationTx,
replaceImmutableReferences,
verifyCreate2,
+ verifyDeployed,
} from '../src';
+import fs from 'fs';
// import { Match } from '@ethereum-sourcify/lib-sourcify';
const ganacheServer = Ganache.server({
@@ -363,6 +365,39 @@ describe('lib-sourcify tests', () => {
);
expectMatch(match, 'perfect', deployedAddress);
});
+
+ it('should fully verify a contract when a not alphabetically sorted metadata is provided', async () => {
+ const contractFolderPath = path.join(__dirname, 'sources', 'Storage');
+ const [deployedAddress] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0]
+ );
+
+ const checkedContracts = await checkFilesFromContractFolder(
+ contractFolderPath
+ );
+
+ // Get the unsorted metadata
+ const metadataPath = path.join(
+ path.join(__dirname, 'sources', 'StorageUnsortedMetadata'),
+ 'metadata.json'
+ );
+ const metadataBuffer = fs.readFileSync(metadataPath);
+
+ // Replace the metadata witht he unsorted one
+ checkedContracts[0].initSolcJsonInput(
+ JSON.parse(metadataBuffer.toString()),
+ checkedContracts[0].solidity
+ );
+
+ const match = await verifyDeployed(
+ checkedContracts[0],
+ sourcifyChainGanache,
+ deployedAddress
+ );
+ expectMatch(match, 'perfect', deployedAddress);
+ });
});
describe('Unit tests', function () {
From 3028f6387d88d32196c0436fce45f1f1a34f612b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Wed, 26 Apr 2023 09:39:25 +0200
Subject: [PATCH 14/48] Update chains.json
---
src/chains.json | 2659 ++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 2500 insertions(+), 159 deletions(-)
diff --git a/src/chains.json b/src/chains.json
index 98768015d..c5454e9c8 100644
--- a/src/chains.json
+++ b/src/chains.json
@@ -7,7 +7,8 @@
"https://mainnet.infura.io/v3/${INFURA_API_KEY}",
"wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}",
"https://api.mycryptoapi.com/eth",
- "https://cloudflare-eth.com"
+ "https://cloudflare-eth.com",
+ "https://ethereum.publicnode.com"
],
"features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": [],
@@ -465,7 +466,7 @@
{
"name": "Cronos Mainnet Beta",
"chain": "CRO",
- "rpc": ["https://evm.cronos.org"],
+ "rpc": ["https://evm.cronos.org", "https://cronos-evm.publicnode.com"],
"features": [{ "name": "EIP1559" }],
"faucets": [],
"nativeCurrency": { "name": "Cronos", "symbol": "CRO", "decimals": 18 },
@@ -882,6 +883,25 @@
}
]
},
+ {
+ "name": "Acria IntelliChain",
+ "chain": "AIC",
+ "rpc": ["https://aic.acria.ai"],
+ "faucets": [],
+ "nativeCurrency": { "name": "ACRIA", "symbol": "ACRIA", "decimals": 18 },
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "infoURL": "https://acria.ai",
+ "shortName": "aic",
+ "chainId": 47,
+ "networkId": 47,
+ "explorers": [
+ {
+ "name": "Acria IntelliChain-Explorer",
+ "url": "https://explorer.acria.ai",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Ennothem Mainnet Proterozoic",
"chain": "ETMP",
@@ -917,7 +937,6 @@
{
"name": "etmp",
"url": "https://pioneer.etmscan.network",
- "icon": "etmpscan",
"standard": "EIP3091"
}
]
@@ -928,7 +947,8 @@
"rpc": [
"https://erpc.xinfin.network",
"https://rpc.xinfin.network",
- "https://rpc1.xinfin.network"
+ "https://rpc1.xinfin.network",
+ "https://rpc-xdc.icecreamswap.com"
],
"faucets": [],
"nativeCurrency": { "name": "XinFin", "symbol": "XDC", "decimals": 18 },
@@ -1078,6 +1098,7 @@
"https://bsc-dataseed2.ninicoin.io",
"https://bsc-dataseed3.ninicoin.io",
"https://bsc-dataseed4.ninicoin.io",
+ "https://bsc.publicnode.com",
"wss://bsc-ws-node.nariox.org"
],
"faucets": ["https://free-online-app.com/faucet-for-eth-evm-chains/"],
@@ -1142,22 +1163,17 @@
]
},
{
- "name": "EOS Mainnet",
+ "name": "EOS EVM Legacy",
"chain": "EOS",
"rpc": ["https://api.eosargentina.io"],
"faucets": [],
"nativeCurrency": { "name": "EOS", "symbol": "EOS", "decimals": 18 },
- "infoURL": "https://eoscommunity.org/",
- "shortName": "EOSMainnet",
+ "infoURL": "https://eosargentina.io",
+ "shortName": "eos-legacy",
"chainId": 59,
"networkId": 59,
- "explorers": [
- {
- "name": "bloks",
- "url": "https://bloks.eosargentina.io",
- "standard": "EIP3091"
- }
- ]
+ "explorers": [],
+ "status": "deprecated"
},
{
"name": "GoChain",
@@ -1448,7 +1464,6 @@
{
"name": "explorer",
"url": "https://explorer.idchain.one",
- "icon": "etherscan",
"standard": "EIP3091"
}
]
@@ -1625,6 +1640,24 @@
}
]
},
+ {
+ "name": "Linqto Devnet",
+ "chain": "LNQ",
+ "rpc": ["https://linqto-dev.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "XRP", "symbol": "XRP", "decimals": 18 },
+ "infoURL": "https://linqto.com",
+ "shortName": "linqto-devnet",
+ "chainId": 84,
+ "networkId": 84,
+ "explorers": [
+ {
+ "name": "Linqto Devnet Explorer",
+ "url": "https://explorer.linqto-dev.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "GateChain Testnet",
"chainId": 85,
@@ -1798,16 +1831,11 @@
"faucets": [],
"nativeCurrency": { "name": "EOS", "symbol": "EOS", "decimals": 18 },
"infoURL": "https://www.cryptokylin.io/",
- "shortName": "KylinTestnet",
+ "shortName": "kylin",
"chainId": 95,
"networkId": 95,
- "explorers": [
- {
- "name": "eosq",
- "url": "https://kylin.eosargentina.io",
- "standard": "EIP3091"
- }
- ]
+ "explorers": [],
+ "status": "deprecated"
},
{
"name": "Bitkub Chain",
@@ -1913,7 +1941,6 @@
{
"name": "gnosisscan",
"url": "https://gnosisscan.io",
- "icon": "gnosisscan",
"standard": "EIP3091"
},
{
@@ -2163,6 +2190,26 @@
"networkId": 116,
"explorers": []
},
+ {
+ "name": "Uptick Mainnet",
+ "chain": "Uptick",
+ "rpc": ["https://json-rpc.uptick.network"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Uptick", "symbol": "UPTICK", "decimals": 18 },
+ "infoURL": "https://www.uptick.network",
+ "shortName": "auptick",
+ "chainId": 117,
+ "networkId": 117,
+ "icon": "uptick",
+ "explorers": [
+ {
+ "name": "Uptick Explorer",
+ "url": "https://evm-explorer.uptick.network",
+ "icon": "uptick",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Arcology Testnet",
"chain": "Arcology",
@@ -2380,6 +2427,26 @@
}
]
},
+ {
+ "name": "iExec Sidechain",
+ "chain": "Bellecour",
+ "icon": "rlc",
+ "rpc": ["https://bellecour.iex.ec"],
+ "faucets": [],
+ "nativeCurrency": { "name": "xRLC", "symbol": "xRLC", "decimals": 18 },
+ "infoURL": "https://iex.ec",
+ "shortName": "rlc",
+ "chainId": 134,
+ "networkId": 134,
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://blockscout.bellecour.iex.ec",
+ "icon": "blockscout",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Alyx Chain Testnet",
"chain": "Alyx Chain Testnet",
@@ -2431,6 +2498,51 @@
}
]
},
+ {
+ "name": "Defi Oracle Meta Mainnet",
+ "chain": "dfiometa",
+ "icon": "defioraclemeta",
+ "rpc": [
+ "https://rpc.public-0138.defi-oracle.io",
+ "wss://rpc.public-0138.defi-oracle.io"
+ ],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://defi-oracle.io/",
+ "shortName": "dfio-meta-main",
+ "chainId": 138,
+ "networkId": 1,
+ "slip44": 60,
+ "ens": { "registry": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85" },
+ "explorers": [
+ {
+ "name": "Quorum Explorer",
+ "url": "https://public-0138.defi-oracle.io",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "WoopChain Mainnet",
+ "chain": "WOOP",
+ "icon": "woopchain",
+ "rpc": ["https://rpc.woop.ai/rpc"],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "WoopCoin", "symbol": "WOOC", "decimals": 18 },
+ "infoURL": "https://wikiwoop.com",
+ "shortName": "woop",
+ "chainId": 139,
+ "networkId": 139,
+ "explorers": [
+ {
+ "name": "wikiwoop",
+ "url": "https://explorer.wikiwoop.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Openpiece Testnet",
"chain": "OPENPIECE",
@@ -2481,6 +2593,26 @@
}
]
},
+ {
+ "name": "OEBlock Testnet",
+ "chain": "OEBt",
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "rpc": ["https://testnet-rpc.oeblock.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "OEBlock", "symbol": "OEB", "decimals": 18 },
+ "infoURL": "https://www.oeblock.com/",
+ "shortName": "obe",
+ "chainId": 156,
+ "networkId": 156,
+ "icon": "oescan",
+ "explorers": [
+ {
+ "name": "OEScan explorer",
+ "url": "https://testnet.oescan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Armonia Eva Chain Mainnet",
"chain": "Eva",
@@ -2703,6 +2835,70 @@
{ "name": "cemscan", "url": "https://cemscan.com", "standard": "EIP3091" }
]
},
+ {
+ "name": "OKBChain Testnet",
+ "chain": "okbchain",
+ "rpc": ["https://okbtestrpc.okbchain.org"],
+ "faucets": ["https://www.oklink.com/okbc-test"],
+ "nativeCurrency": {
+ "name": "OKBChain Global Utility Token in testnet",
+ "symbol": "OKB",
+ "decimals": 18
+ },
+ "features": [],
+ "infoURL": "https://www.okx.com/okbc/docs/dev/quick-start/introduction/introduction-to-okbchain",
+ "shortName": "tokb",
+ "chainId": 195,
+ "networkId": 195,
+ "explorers": [
+ {
+ "name": "OKLink",
+ "url": "https://www.oklink.com/okbc-test",
+ "standard": "EIP3091"
+ }
+ ],
+ "status": "active"
+ },
+ {
+ "name": "OKBChain Mainnet",
+ "chain": "okbchain",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "OKBChain Global Utility Token",
+ "symbol": "OKB",
+ "decimals": 18
+ },
+ "features": [],
+ "infoURL": "https://www.okex.com/okc",
+ "shortName": "okb",
+ "chainId": 196,
+ "networkId": 196,
+ "explorers": [],
+ "status": "incubating"
+ },
+ {
+ "name": "Neutrinos TestNet",
+ "chain": "NEUTR",
+ "rpc": ["https://testnet-rpc.neutrinoschain.com"],
+ "faucets": ["https://neutrinoschain.com/faucet"],
+ "nativeCurrency": {
+ "name": "Neutrinos",
+ "symbol": "NEUTR",
+ "decimals": 18
+ },
+ "infoURL": "https://docs.neutrinoschain.com",
+ "shortName": "NEUTR",
+ "chainId": 197,
+ "networkId": 197,
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://testnet.neutrinoschain.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "BitTorrent Chain Mainnet",
"chain": "BTTC",
@@ -2929,7 +3125,7 @@
{
"name": "Fantom Opera",
"chain": "FTM",
- "rpc": ["https://rpc.ftm.tools"],
+ "rpc": ["https://rpc.ftm.tools", "https://fantom.publicnode.com"],
"faucets": ["https://free-online-app.com/faucet-for-eth-evm-chains/"],
"nativeCurrency": { "name": "Fantom", "symbol": "FTM", "decimals": 18 },
"infoURL": "https://fantom.foundation",
@@ -2975,6 +3171,30 @@
"chainId": 258,
"networkId": 258
},
+ {
+ "name": "Neonlink Mainnet",
+ "chain": "Neonlink",
+ "rpc": ["https://mainnet.neonlink.io"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Neonlink Native Token",
+ "symbol": "NEON",
+ "decimals": 18
+ },
+ "infoURL": "https://neonlink.io",
+ "shortName": "neon",
+ "chainId": 259,
+ "networkId": 259,
+ "icon": "neonlink",
+ "explorers": [
+ {
+ "name": "Neon Blockchain Explorer",
+ "url": "https://scan.neonlink.io",
+ "standard": "EIP3091",
+ "icon": "neonlink"
+ }
+ ]
+ },
{
"name": "SUR Blockchain Network",
"chain": "SUR",
@@ -3017,7 +3237,7 @@
{
"name": "zkSync Era Testnet",
"chain": "ETH",
- "rpc": ["https://zksync2-testnet.zksync.dev"],
+ "rpc": ["https://testnet.era.zksync.dev"],
"faucets": ["https://goerli.portal.zksync.io/faucet"],
"nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
"infoURL": "https://era.zksync.io/docs/",
@@ -3070,7 +3290,7 @@
"rpc": ["https://mainnet.hashio.io/api"],
"features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": [],
- "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 8 },
+ "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 18 },
"infoURL": "https://hedera.com",
"shortName": "hedera-mainnet",
"chainId": 295,
@@ -3111,7 +3331,7 @@
"rpc": ["https://testnet.hashio.io/api"],
"features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": ["https://portal.hedera.com"],
- "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 8 },
+ "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 18 },
"infoURL": "https://hedera.com",
"shortName": "hedera-testnet",
"chainId": 296,
@@ -3152,7 +3372,7 @@
"rpc": ["https://previewnet.hashio.io/api"],
"features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": ["https://portal.hedera.com"],
- "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 8 },
+ "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 18 },
"infoURL": "https://hedera.com",
"shortName": "hedera-previewnet",
"chainId": 297,
@@ -3173,7 +3393,7 @@
"rpc": [],
"features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": [],
- "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 8 },
+ "nativeCurrency": { "name": "hbar", "symbol": "HBAR", "decimals": 18 },
"infoURL": "https://hedera.com",
"shortName": "hedera-localnet",
"chainId": 298,
@@ -3254,7 +3474,11 @@
"name": "Filecoin - Mainnet",
"chain": "FIL",
"icon": "filecoin",
- "rpc": ["https://api.node.glif.io/", "https://rpc.ankr.com/filecoin"],
+ "rpc": [
+ "https://api.node.glif.io/",
+ "https://rpc.ankr.com/filecoin",
+ "https://filecoin-mainnet.chainstacklabs.com/rpc/v1"
+ ],
"faucets": [],
"nativeCurrency": { "name": "filecoin", "symbol": "FIL", "decimals": 18 },
"infoURL": "https://filecoin.io",
@@ -3264,6 +3488,17 @@
"slip44": 461,
"explorers": [
{ "name": "Filfox", "url": "https://filfox.info/en", "standard": "none" },
+ { "name": "Beryx", "url": "https://beryx.zondax.ch", "standard": "none" },
+ {
+ "name": "Glif Explorer",
+ "url": "https://explorer.glif.io",
+ "standard": "EIP3091"
+ },
+ {
+ "name": "Dev.storage",
+ "url": "https://dev.storage",
+ "standard": "none"
+ },
{ "name": "Filscan", "url": "https://filscan.io", "standard": "none" },
{
"name": "Filscout",
@@ -3327,7 +3562,7 @@
{
"name": "zkSync Era Mainnet",
"chain": "ETH",
- "rpc": ["https://zksync2-mainnet.zksync.io"],
+ "rpc": ["https://mainnet.era.zksync.io"],
"faucets": [],
"nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
"infoURL": "https://zksync.io/",
@@ -3346,7 +3581,7 @@
"parent": {
"type": "L2",
"chain": "eip155-1",
- "bridges": [{ "url": "https://portal.zksync.io/bridge" }]
+ "bridges": [{ "url": "https://bridge.zksync.io/" }]
}
},
{
@@ -3615,6 +3850,23 @@
}
]
},
+ {
+ "name": "LA Testnet",
+ "chain": "LATestnet",
+ "rpc": ["https://rpc.testnet.lachain.network"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Test La Coin",
+ "symbol": "TLA",
+ "decimals": 18
+ },
+ "features": [{ "name": "EIP155" }],
+ "infoURL": "",
+ "shortName": "latestnet",
+ "chainId": 418,
+ "networkId": 418,
+ "explorers": []
+ },
{
"name": "Optimism Goerli Testnet",
"chain": "ETH",
@@ -3690,7 +3942,7 @@
"rpc": [],
"faucets": [],
"nativeCurrency": { "name": "Camino", "symbol": "CAM", "decimals": 18 },
- "infoURL": "https://camino.foundation/",
+ "infoURL": "https://camino.network/",
"shortName": "Camino",
"chainId": 500,
"networkId": 1000,
@@ -3706,10 +3958,10 @@
{
"name": "Columbus Test Network",
"chain": "CAM",
- "rpc": [],
+ "rpc": ["https://columbus.camino.network/ext/bc/C/rpc"],
"faucets": [],
"nativeCurrency": { "name": "Camino", "symbol": "CAM", "decimals": 18 },
- "infoURL": "https://camino.foundation/",
+ "infoURL": "https://camino.network/",
"shortName": "Columbus",
"chainId": 501,
"networkId": 1001,
@@ -4234,10 +4486,11 @@
"explorers": [
{
"name": "Canto Tesnet Explorer (Neobase)",
- "url": "http://testnet-explorer.canto.neobase.one",
+ "url": "https://testnet-explorer.canto.neobase.one",
"standard": "none"
}
- ]
+ ],
+ "status": "deprecated"
},
{
"name": "Vention Smart Chain Testnet",
@@ -4356,7 +4609,7 @@
},
{
"name": "Lucid Blockchain",
- "chain": "Lucid Blockchain",
+ "chain": "Lucid",
"icon": "lucid",
"rpc": ["https://rpc.lucidcoin.io"],
"faucets": ["https://faucet.lucidcoin.io"],
@@ -4423,11 +4676,43 @@
"explorers": [
{
"name": "meerscan",
+ "icon": "meer",
"url": "https://evm.meerscan.com",
"standard": "none"
}
]
},
+ {
+ "name": "BeOne Chain Mainnet",
+ "chain": "BOC",
+ "icon": "beonechain",
+ "rpc": [
+ "https://dataseed1.beonechain.com",
+ "https://dataseed2.beonechain.com",
+ "https://dataseed-us1.beonechain.com",
+ "https://dataseed-us2.beonechain.com",
+ "https://dataseed-uk1.beonechain.com",
+ "https://dataseed-uk2.beonechain.com"
+ ],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "BeOne Chain Mainnet",
+ "symbol": "BOC",
+ "decimals": 18
+ },
+ "infoURL": "https://beonechain.com",
+ "shortName": "BOC",
+ "chainId": 818,
+ "networkId": 818,
+ "slip44": 8181,
+ "explorers": [
+ {
+ "name": "BeOne Chain Mainnet",
+ "url": "https://beonescan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Callisto Mainnet",
"chain": "CLO",
@@ -4707,6 +4992,21 @@
"explorers": [],
"status": "incubating"
},
+ {
+ "name": "DecentraBone Layer1 Testnet",
+ "chain": "DBONE",
+ "rpc": ["https://layer1test.decentrabone.com"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "DecentraBone",
+ "symbol": "DBONE",
+ "decimals": 18
+ },
+ "infoURL": "https://decentrabone.com",
+ "shortName": "DBONE",
+ "chainId": 910,
+ "networkId": 910
+ },
{
"name": "Rinia Testnet",
"chain": "FIRE",
@@ -4733,6 +5033,7 @@
"wss://rpc.v2.testnet.pulsechain.com/"
],
"faucets": ["https://faucet.v2.testnet.pulsechain.com/"],
+ "status": "deprecated",
"nativeCurrency": { "name": "Test Pulse", "symbol": "tPLS", "decimals": 18 }
},
{
@@ -4747,6 +5048,7 @@
"wss://rpc.v2b.testnet.pulsechain.com/"
],
"faucets": ["https://faucet.v2b.testnet.pulsechain.com/"],
+ "status": "deprecated",
"nativeCurrency": { "name": "Test Pulse", "symbol": "tPLS", "decimals": 18 }
},
{
@@ -4763,6 +5065,25 @@
"faucets": ["https://faucet.v3.testnet.pulsechain.com/"],
"nativeCurrency": { "name": "Test Pulse", "symbol": "tPLS", "decimals": 18 }
},
+ {
+ "name": "PulseChain Testnet v4",
+ "shortName": "t4pls",
+ "chain": "t4PLS",
+ "chainId": 943,
+ "networkId": 943,
+ "icon": "pulsechain",
+ "infoURL": "https://pulsechain.com",
+ "rpc": [
+ "https://rpc.v4.testnet.pulsechain.com/",
+ "wss://rpc.v4.testnet.pulsechain.com/"
+ ],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": ["https://faucet.v4.testnet.pulsechain.com/"],
+ "ens": { "registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
+ "status": "incubating",
+ "explorers": [],
+ "nativeCurrency": { "name": "Test Pulse", "symbol": "tPLS", "decimals": 18 }
+ },
{
"name": "muNode Testnet",
"chain": "munode",
@@ -4866,7 +5187,7 @@
{
"name": "Memo Mainnet Explorer",
"url": "https://scan.metamemo.one:8080",
- "icon": "memoscan",
+ "icon": "memo",
"standard": "EIP3091"
}
]
@@ -4890,6 +5211,30 @@
}
]
},
+ {
+ "name": "5ireChain Thunder",
+ "chain": "5ireChain",
+ "rpc": ["https://rpc-testnet.5ire.network"],
+ "faucets": ["https://explorer.5ire.network/faucet"],
+ "nativeCurrency": {
+ "name": "5ire Token",
+ "symbol": "5ire",
+ "decimals": 18
+ },
+ "infoURL": "https://5ire.org",
+ "shortName": "5ire",
+ "chainId": 997,
+ "networkId": 997,
+ "icon": "5ireChain",
+ "explorers": [
+ {
+ "name": "5ireChain Explorer",
+ "url": "https://explorer.5ire.network",
+ "standard": "none",
+ "icon": "5ireChain"
+ }
+ ]
+ },
{
"name": "Lucky Network",
"chain": "LN",
@@ -5158,6 +5503,29 @@
}
]
},
+ {
+ "name": "ShimmerEVM Testnet",
+ "title": "ShimmerEVM Testnet",
+ "chain": "ShimmerEVM",
+ "icon": "shimmerevm",
+ "rpc": ["https://json-rpc.evm.testnet.shimmer.network"],
+ "faucets": [
+ "https://evm-toolkit.evm.testnet.shimmer.network",
+ "https://evm-faucet.testnet.shimmer.network"
+ ],
+ "nativeCurrency": { "name": "SMR", "symbol": "SMR", "decimals": 18 },
+ "infoURL": "https://shimmer.network",
+ "shortName": "shimmerevm-testnet",
+ "chainId": 1071,
+ "networkId": 1071,
+ "explorers": [
+ {
+ "name": "explorer",
+ "url": "https://explorer.evm.testnet.shimmer.network",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Metis Andromeda Mainnet",
"chain": "ETH",
@@ -5200,6 +5568,32 @@
}
]
},
+ {
+ "name": "Polygon zkEVM",
+ "title": "Polygon zkEVM",
+ "chain": "Polygon",
+ "rpc": ["https://zkevm-rpc.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://polygon.technology/polygon-zkevm",
+ "shortName": "zkevm",
+ "chainId": 1101,
+ "networkId": 1101,
+ "icon": "zkevm",
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://zkevm.polygonscan.com",
+ "icon": "zkevm",
+ "standard": "EIP3091"
+ }
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-1",
+ "bridges": [{ "url": "https://bridge.zkevm-rpc.com" }]
+ }
+ },
{
"name": "WEMIX3.0 Mainnet",
"chain": "WEMIX",
@@ -5268,7 +5662,7 @@
"name": "Core Blockchain Mainnet",
"chain": "Core",
"icon": "core",
- "rpc": ["https://rpc.coredao.org/"],
+ "rpc": ["https://rpc.coredao.org/", "https://rpc-core.icecreamswap.com"],
"faucets": [],
"nativeCurrency": {
"name": "Core Blockchain Native Token",
@@ -5292,7 +5686,7 @@
"name": "Dogcoin Mainnet",
"chain": "DOGS",
"icon": "dogs",
- "rpc": ["https://mainnet-rpc.dogcoin.network"],
+ "rpc": ["https://mainnet-rpc.dogcoin.me"],
"faucets": ["https://faucet.dogcoin.network"],
"nativeCurrency": { "name": "Dogcoin", "symbol": "DOGS", "decimals": 18 },
"infoURL": "https://dogcoin.network",
@@ -5380,6 +5774,30 @@
"chainId": 1140,
"networkId": 1140
},
+ {
+ "name": "Symplexia Smart Chain",
+ "chain": "Plexchain",
+ "rpc": ["https://plex-rpc.plexfinance.us"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Plex Native Token",
+ "symbol": "PLEX",
+ "decimals": 18
+ },
+ "infoURL": "https://plexfinance.us/",
+ "shortName": "Plexchain",
+ "chainId": 1149,
+ "networkId": 1149,
+ "icon": "plexchain",
+ "explorers": [
+ {
+ "name": "Plexchain Explorer",
+ "url": "https://explorer.plexfinance.us",
+ "icon": "plexchain",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Smart Host Teknoloji TESTNET",
"chain": "SHT",
@@ -5798,7 +6216,7 @@
"decimals": 18
},
"infoURL": "http://doschain.io/",
- "shortName": "DOS",
+ "shortName": "TDOS",
"chainId": 1311,
"networkId": 1311,
"explorers": [
@@ -5917,7 +6335,7 @@
"name": "Elysium Mainnet",
"title": "An L1, carbon-neutral, tree-planting, metaverse dedicated blockchain created by VulcanForged",
"chain": "Elysium",
- "rpc": ["https://elysium-rpc.vulcanforged.com"],
+ "rpc": ["https://rpc.elysiumchain.tech/"],
"faucets": [],
"nativeCurrency": { "name": "LAVA", "symbol": "LAVA", "decimals": 18 },
"infoURL": "https://elysiumscan.vulcanforged.com",
@@ -5956,6 +6374,29 @@
}
]
},
+ {
+ "name": "Zafirium Mainnet",
+ "chain": "ZAFIC",
+ "icon": "zafirium",
+ "rpc": ["https://mainnet.zakumi.io"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Zakumi Chain Native Token",
+ "symbol": "ZAFIC",
+ "decimals": 18
+ },
+ "infoURL": "https://www.zakumi.io",
+ "shortName": "zafic",
+ "chainId": 1369,
+ "networkId": 1369,
+ "explorers": [
+ {
+ "name": "zafirium-explorer",
+ "url": "https://explorer.zakumi.io",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "AmStar Mainnet",
"chain": "AmStar",
@@ -5996,14 +6437,14 @@
"status": "deprecated"
},
{
- "name": "Polygon zkEVM Testnet",
- "title": "Polygon zkEVM Testnet",
+ "name": "Polygon zkEVM Testnet Pre Audit-Upgraded",
+ "title": "Polygon zkEVM Testnet Pre Audit-Upgraded",
"chain": "Polygon",
- "rpc": ["https://rpc.public.zkevm-test.net"],
+ "rpc": [],
"faucets": [],
"nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
"infoURL": "https://polygon.technology/solutions/polygon-zkevm/",
- "shortName": "testnet-zkEVM-mango",
+ "shortName": "testnet-zkEVM-mango-pre-audit-upgraded",
"chainId": 1422,
"networkId": 1422,
"explorers": [
@@ -6012,23 +6453,63 @@
"url": "https://explorer.public.zkevm-test.net",
"standard": "EIP3091"
}
- ]
+ ],
+ "status": "deprecated"
},
{
- "name": "Ctex Scan Blockchain",
- "chain": "Ctex Scan Blockchain",
- "icon": "ctex",
- "rpc": ["https://mainnet-rpc.ctexscan.com/"],
- "faucets": ["https://faucet.ctexscan.com"],
- "nativeCurrency": { "name": "CTEX", "symbol": "CTEX", "decimals": 18 },
- "infoURL": "https://ctextoken.io",
- "shortName": "CTEX",
- "chainId": 1455,
- "networkId": 1455,
+ "name": "Rikeza Network Mainnet",
+ "title": "Rikeza Network Mainnet",
+ "chain": "Rikeza",
+ "icon": "rikeza",
+ "rpc": ["https://rpc.rikscan.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Rikeza", "symbol": "RIK", "decimals": 18 },
+ "infoURL": "https://rikeza.io",
+ "shortName": "RIK",
+ "chainId": 1433,
+ "networkId": 1433,
"explorers": [
{
- "name": "Ctex Scan Explorer",
- "url": "https://ctexscan.com",
+ "name": "Rikeza Blockchain explorer",
+ "url": "https://rikscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Polygon zkEVM Testnet",
+ "title": "Polygon zkEVM Testnet",
+ "chain": "Polygon",
+ "rpc": ["https://rpc.public.zkevm-test.net"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://polygon.technology/solutions/polygon-zkevm/",
+ "shortName": "testnet-zkEVM-mango",
+ "chainId": 1442,
+ "networkId": 1442,
+ "explorers": [
+ {
+ "name": "Polygon zkEVM explorer",
+ "url": "https://explorer.public.zkevm-test.net",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Ctex Scan Blockchain",
+ "chain": "Ctex Scan Blockchain",
+ "icon": "ctex",
+ "rpc": ["https://mainnet-rpc.ctexscan.com/"],
+ "faucets": ["https://faucet.ctexscan.com"],
+ "nativeCurrency": { "name": "CTEX", "symbol": "CTEX", "decimals": 18 },
+ "infoURL": "https://ctextoken.io",
+ "shortName": "CTEX",
+ "chainId": 1455,
+ "networkId": 1455,
+ "explorers": [
+ {
+ "name": "Ctex Scan Explorer",
+ "url": "https://ctexscan.com",
"standard": "none"
}
]
@@ -6129,6 +6610,58 @@
"chainId": 1657,
"networkId": 1657
},
+ {
+ "name": "Horizen Yuma Testnet",
+ "shortName": "Yuma",
+ "chain": "Yuma",
+ "icon": "eon",
+ "rpc": ["https://yuma-testnet.horizenlabs.io/ethv1"],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": ["https://yuma-testnet-faucet.horizen.io"],
+ "nativeCurrency": {
+ "name": "Testnet Zen",
+ "symbol": "tZEN",
+ "decimals": 18
+ },
+ "infoURL": "https://horizen.io/",
+ "chainId": 1662,
+ "networkId": 1662,
+ "slip44": 121,
+ "explorers": [
+ {
+ "name": "Yuma Testnet Block Explorer",
+ "url": "https://yuma-explorer.horizen.io",
+ "icon": "eon",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Horizen Gobi Testnet",
+ "shortName": "Gobi",
+ "chain": "Gobi",
+ "icon": "eon",
+ "rpc": ["https://gobi-testnet.horizenlabs.io/ethv1"],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": ["https://faucet.horizen.io"],
+ "nativeCurrency": {
+ "name": "Testnet Zen",
+ "symbol": "tZEN",
+ "decimals": 18
+ },
+ "infoURL": "https://horizen.io/",
+ "chainId": 1663,
+ "networkId": 1663,
+ "slip44": 121,
+ "explorers": [
+ {
+ "name": "Gobi Testnet Block Explorer",
+ "url": "https://gobi-explorer.horizen.io",
+ "icon": "eon",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "LUDAN Mainnet",
"chain": "LUDAN",
@@ -6185,6 +6718,52 @@
"chainId": 1708,
"networkId": 1708
},
+ {
+ "name": "Palette Chain Mainnet",
+ "chain": "PLT",
+ "rpc": ["https://palette-rpc.com:22000"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Palette Token",
+ "symbol": "PLT",
+ "decimals": 18
+ },
+ "features": [],
+ "infoURL": "https://hashpalette.com/",
+ "shortName": "PCM",
+ "chainId": 1718,
+ "networkId": 1718,
+ "icon": "PLT",
+ "explorers": [
+ {
+ "name": "Palettescan",
+ "url": "https://palettescan.com",
+ "icon": "PLT",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "PartyChain",
+ "chain": "mainnet",
+ "rpc": ["https://tea.mining4people.com/rpc", "http://172.104.194.36:8545"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Grams", "symbol": "GRAMS", "decimals": 18 },
+ "infoURL": "TeaPartyCrypto.com",
+ "shortName": "TeaParty",
+ "chainId": 1773,
+ "networkId": 1773,
+ "icon": "grams",
+ "status": "incubating",
+ "explorers": [
+ {
+ "name": "PartyExplorer",
+ "url": "https://partyexplorer.co",
+ "icon": "grams",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Kerleano",
"title": "Proof of Carbon Reduction testnet",
@@ -6340,6 +6919,54 @@
}
]
},
+ {
+ "name": "Lightlink Phoenix Mainnet",
+ "chain": "Lightlink Phoenix Mainnet",
+ "icon": "lightlink",
+ "rpc": [
+ "https://replicator-01.phoenix.lightlink.io/rpc/v1",
+ "https://replicator-02.phoenix.lightlink.io/rpc/v1"
+ ],
+ "features": [{ "name": "EIP155" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ethereum", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://lightlink.io",
+ "shortName": "lightlink_phoenix",
+ "chainId": 1890,
+ "networkId": 1890,
+ "explorers": [
+ {
+ "name": "phoenix",
+ "url": "https://phoenix.lightlink.io",
+ "icon": "lightlink",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Lightlink Pegasus Testnet",
+ "chain": "Lightlink Pegasus Testnet",
+ "icon": "lightlink",
+ "rpc": [
+ "https://replicator-01.pegasus.lightlink.io/rpc/v1",
+ "https://replicator-02.pegasus.lightlink.io/rpc/v1"
+ ],
+ "features": [{ "name": "EIP155" }],
+ "faucets": ["https://pegasus-faucet-react.vercel.app"],
+ "nativeCurrency": { "name": "Ethereum", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://lightlink.io",
+ "shortName": "lightlink_pegasus",
+ "chainId": 1891,
+ "networkId": 1891,
+ "explorers": [
+ {
+ "name": "pegasus",
+ "url": "https://pegasus.lightlink.io",
+ "icon": "lightlink",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "BON Network",
"chain": "BON",
@@ -6434,6 +7061,106 @@
"faucets": [],
"infoURL": ""
},
+ {
+ "name": "Dexilla Testnet",
+ "chain": "Dexilla",
+ "rpc": ["https://rpc.dexilla.com"],
+ "faucets": [],
+ "icon": "dxz",
+ "nativeCurrency": {
+ "name": "Dexilla Native Token",
+ "symbol": "DXZ",
+ "decimals": 18
+ },
+ "infoURL": "https://dexilla.com",
+ "shortName": "Dexilla",
+ "chainId": 1954,
+ "networkId": 1954,
+ "explorers": [
+ {
+ "name": "dos-mainnet",
+ "url": "https://exp.dexilla.com",
+ "standard": "EIP3091"
+ }
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-11155111",
+ "bridges": [{ "url": "https://bridge.dexilla.com" }]
+ }
+ },
+ {
+ "name": "Eleanor",
+ "title": "Metatime Testnet Eleanor",
+ "chain": "MTC",
+ "rpc": [
+ "https://rpc.metatime.com/eleanor",
+ "wss://ws.metatime.com/eleanor"
+ ],
+ "faucets": ["https://faucet.metatime.com/eleanor"],
+ "nativeCurrency": {
+ "name": "Eleanor Metacoin",
+ "symbol": "MTC",
+ "decimals": 18
+ },
+ "infoURL": "https://eleanor.metatime.com",
+ "shortName": "mtc",
+ "chainId": 1967,
+ "networkId": 1967,
+ "explorers": [
+ {
+ "name": "metaexplorer-eleanor",
+ "url": "https://explorer.metatime.com/eleanor",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Super Smart Chain Testnet",
+ "chain": "TSCS",
+ "rpc": ["https://testnet.superexchain.com:8544"],
+ "faucets": ["https://testnet.superexchain.com"],
+ "nativeCurrency": {
+ "name": "Super Chain Native Token",
+ "symbol": "TSCS",
+ "decimals": 18
+ },
+ "infoURL": "https://testnet.superexchain.com",
+ "shortName": "tscs",
+ "chainId": 1969,
+ "networkId": 1969,
+ "icon": "super",
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://testnetscan.superexchain.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Super Smart Chain Mainnet",
+ "chain": "SCS",
+ "rpc": ["https://superexchain.com:8545"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Super Chain Native Token",
+ "symbol": "SCS",
+ "decimals": 18
+ },
+ "infoURL": "https://superexchain.com",
+ "shortName": "scs",
+ "chainId": 1970,
+ "networkId": 1970,
+ "icon": "super",
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://scan.superexchain.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Atelier",
"title": "Atelier Test Network",
@@ -6526,7 +7253,10 @@
{
"name": "edeXa Testnet",
"chain": "edeXa TestNetwork",
- "rpc": ["https://testnet.edexa.com/rpc"],
+ "rpc": [
+ "https://testnet.edexa.com/rpc",
+ "https://io-dataseed1.testnet.edexa.io-market.com/rpc"
+ ],
"faucets": ["https://faucet.edexa.com/"],
"nativeCurrency": { "name": "EDEXA", "symbol": "EDX", "decimals": 18 },
"infoURL": "https://edexa.com/",
@@ -6537,7 +7267,7 @@
"explorers": [
{
"name": "edexa-testnet",
- "url": "https://explorer.edexa.com",
+ "url": "https://explorer.testnet.edexa.com",
"standard": "EIP3091"
}
]
@@ -6733,30 +7463,67 @@
]
},
{
- "name": "Edgeware Mainnet",
+ "name": "Edgeware EdgeEVM Mainnet",
"chain": "EDG",
- "rpc": ["https://mainnet1.edgewa.re"],
+ "icon": "edgeware",
+ "rpc": [
+ "https://edgeware-evm.jelliedowl.net",
+ "https://mainnet2.edgewa.re/evm",
+ "https://mainnet3.edgewa.re/evm",
+ "https://mainnet4.edgewa.re/evm",
+ "https://mainnet5.edgewa.re/evm",
+ "wss://edgeware.jelliedowl.net",
+ "wss://mainnet2.edgewa.re",
+ "wss://mainnet3.edgewa.re",
+ "wss://mainnet4.edgewa.re",
+ "wss://mainnet5.edgewa.re"
+ ],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
"faucets": [],
- "nativeCurrency": { "name": "Edge", "symbol": "EDG", "decimals": 18 },
- "infoURL": "http://edgewa.re",
+ "nativeCurrency": { "name": "Edgeware", "symbol": "EDG", "decimals": 18 },
+ "infoURL": "https://edgeware.io",
"shortName": "edg",
"chainId": 2021,
- "networkId": 2021
+ "networkId": 2021,
+ "slip44": 523,
+ "explorers": [
+ {
+ "name": "Edgscan by Bharathcoorg",
+ "url": "https://edgscan.live",
+ "standard": "EIP3091"
+ },
+ {
+ "name": "Subscan",
+ "url": "https://edgeware.subscan.io",
+ "standard": "none",
+ "icon": "subscan"
+ }
+ ]
},
{
- "name": "Beresheet Testnet",
+ "name": "Beresheet BereEVM Testnet",
"chain": "EDG",
- "rpc": ["https://beresheet1.edgewa.re"],
+ "rpc": [
+ "https://beresheet-evm.jelliedowl.net",
+ "wss://beresheet.jelliedowl.net"
+ ],
"faucets": [],
"nativeCurrency": {
- "name": "Testnet Edge",
+ "name": "Testnet EDG",
"symbol": "tEDG",
"decimals": 18
},
- "infoURL": "http://edgewa.re",
+ "infoURL": "https://edgeware.io/build",
"shortName": "edgt",
"chainId": 2022,
- "networkId": 2022
+ "networkId": 2022,
+ "explorers": [
+ {
+ "name": "Edgscan by Bharathcoorg",
+ "url": "https://testnet.edgscan.live",
+ "standard": "EIP3091"
+ }
+ ]
},
{
"name": "Taycan Testnet",
@@ -6972,6 +7739,51 @@
}
]
},
+ {
+ "name": "Metaplayerone Network",
+ "chain": "MP1 Dubai-Testnet",
+ "icon": "meu",
+ "rpc": ["https://rpc-dubai.mp1network.com/"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Metaunit", "symbol": "MEU", "decimals": 18 },
+ "infoURL": "https://docs.metaplayer.one/",
+ "shortName": "MEU",
+ "chainId": 2124,
+ "networkId": 2124,
+ "explorers": [
+ {
+ "name": "MP1Scan",
+ "url": "https://dubai.mp1scan.io",
+ "icon": "meu",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Defi Oracle Meta Testnet",
+ "chain": "dfiometatest",
+ "icon": "defioraclemeta",
+ "rpc": [
+ "https://rpc.public-2138.defi-oracle.io",
+ "wss://rpc.public-2138.defi-oracle.io"
+ ],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "testEther", "symbol": "tETH", "decimals": 18 },
+ "infoURL": "https://defi-oracle.io/",
+ "shortName": "dfio-meta-test",
+ "chainId": 2138,
+ "networkId": 21,
+ "slip44": 60,
+ "ens": { "registry": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85" },
+ "explorers": [
+ {
+ "name": "Quorum Explorer",
+ "url": "https://public-2138.defi-oracle.io",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "BOSagora Mainnet",
"chain": "ETH",
@@ -7051,9 +7863,9 @@
"chain": "Bitcoin EVM",
"rpc": ["https://connect.bitcoinevm.com"],
"faucets": [],
- "nativeCurrency": { "name": "Bitcoin", "symbol": "eBTC", "decimals": 18 },
+ "nativeCurrency": { "name": "Bitcoin", "symbol": "BTC", "decimals": 18 },
"infoURL": "https://bitcoinevm.com",
- "shortName": "eBTC",
+ "shortName": "BTC",
"chainId": 2203,
"networkId": 2203,
"icon": "ebtc",
@@ -7172,6 +7984,19 @@
}
]
},
+ {
+ "name": "Arevia",
+ "chain": "Arevia",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": { "name": "Arev", "symbol": "ARÉV", "decimals": 18 },
+ "infoURL": "",
+ "shortName": "arevia",
+ "chainId": 2309,
+ "networkId": 2309,
+ "explorers": [],
+ "status": "incubating"
+ },
{
"name": "Altcoinchain",
"chain": "mainnet",
@@ -7193,6 +8018,36 @@
}
]
},
+ {
+ "name": "Kroma Sepolia",
+ "title": "Kroma Testnet Sepolia",
+ "chainId": 2357,
+ "shortName": "kroma-sepolia",
+ "chain": "ETH",
+ "networkId": 2357,
+ "nativeCurrency": {
+ "name": "Sepolia Ether",
+ "symbol": "ETH",
+ "decimals": 18
+ },
+ "rpc": ["https://api.sepolia.kroma.network"],
+ "faucets": [],
+ "infoURL": "https://kroma.network",
+ "icon": "kroma",
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://blockscout.sepolia.kroma.network",
+ "icon": "kroma",
+ "standard": "EIP3091"
+ }
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-11155111",
+ "bridges": [{ "url": "https://kroma.network/bridge" }]
+ }
+ },
{
"name": "BOMB Chain Testnet",
"chain": "BOMB",
@@ -7509,6 +8364,7 @@
"icon": "filecoin",
"rpc": [
"https://api.hyperspace.node.glif.io/rpc/v1",
+ "https://rpc.ankr.com/filecoin_testnet",
"https://filecoin-hyperspace.chainstacklabs.com/rpc/v1"
],
"faucets": ["https://hyperspace.yoga/#faucet"],
@@ -7535,8 +8391,8 @@
},
{ "name": "Beryx", "url": "https://beryx.zondax.ch", "standard": "none" },
{
- "name": "Filmine",
- "url": "https://explorer.filmine.io",
+ "name": "Dev.storage",
+ "url": "https://dev.storage",
"standard": "none"
},
{
@@ -7632,7 +8488,6 @@
{
"name": "Paribu Net Explorer",
"url": "https://explorer.paribu.network",
- "icon": "explorer",
"standard": "EIP3091"
}
]
@@ -7652,7 +8507,6 @@
{
"name": "Paribu Net Testnet Explorer",
"url": "https://testnet.paribuscan.com",
- "icon": "explorer",
"standard": "EIP3091"
}
]
@@ -7749,12 +8603,10 @@
"shortName": "btx",
"chainId": 3690,
"networkId": 3690,
- "icon": "ethereum",
"explorers": [
{
"name": "bittexscan",
"url": "https://bittexscan.com",
- "icon": "etherscan",
"standard": "EIP3091"
}
]
@@ -7800,6 +8652,25 @@
}
]
},
+ {
+ "name": "AlveyChain Mainnet",
+ "chain": "ALV",
+ "icon": "alveychain",
+ "rpc": ["https://rpc.alveychain.com/rpc", "https://rpc2.alvey.io/rpc"],
+ "faucets": [],
+ "nativeCurrency": { "name": "AlveyCoin", "symbol": "ALV", "decimals": 18 },
+ "infoURL": "https://alveyscan.com/rpc",
+ "shortName": "alv",
+ "chainId": 3797,
+ "networkId": 3797,
+ "explorers": [
+ {
+ "name": "AlveyScan",
+ "url": "https://alveyscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "DRAC Network",
"chain": "DRAC",
@@ -7816,7 +8687,26 @@
{
"name": "DRAC_Network Scan",
"url": "https://www.dracscan.io",
- "icon": "DRAC",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "DOS Tesnet",
+ "chain": "DOS",
+ "rpc": ["https://test.doschain.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "DOS", "symbol": "DOS", "decimals": 18 },
+ "infoURL": "http://doschain.io/",
+ "shortName": "dost",
+ "chainId": 3939,
+ "networkId": 3939,
+ "icon": "doschain",
+ "explorers": [
+ {
+ "name": "DOScan-Test",
+ "url": "https://test.doscan.io",
+ "icon": "doschain",
"standard": "EIP3091"
}
]
@@ -7932,28 +8822,75 @@
]
},
{
- "name": "Bitindi Testnet",
- "chain": "BNI",
- "icon": "bitindiTestnet",
- "rpc": ["https://testnet-rpc.bitindi.org"],
- "faucets": ["https://faucet.bitindi.org"],
- "nativeCurrency": { "name": "BNI", "symbol": "$BNI", "decimals": 18 },
- "infoURL": "https://bitindi.org",
- "shortName": "BNIt",
- "chainId": 4096,
- "networkId": 4096,
- "explorers": [
- {
- "name": "Bitindi",
- "url": "https://testnet.bitindiscan.com",
- "standard": "EIP3091"
- }
- ]
- },
- {
- "name": "Bitindi Mainnet",
- "chain": "BNI",
- "icon": "bitindi",
+ "name": "Nahmii 3 Mainnet",
+ "chain": "Nahmii",
+ "rpc": [],
+ "status": "incubating",
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://nahmii.io",
+ "shortName": "Nahmii3Mainnet",
+ "chainId": 4061,
+ "networkId": 4061,
+ "icon": "nahmii",
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-1",
+ "bridges": [{ "url": "https://bridge.nahmii.io" }]
+ }
+ },
+ {
+ "name": "Nahmii 3 Testnet",
+ "chain": "Nahmii",
+ "rpc": ["https://ngeth.testnet.n3.nahmii.io"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Goerli Ether",
+ "symbol": "ETH",
+ "decimals": 18
+ },
+ "infoURL": "https://nahmii.io",
+ "shortName": "Nahmii3Testnet",
+ "chainId": 4062,
+ "networkId": 4062,
+ "icon": "nahmii",
+ "explorers": [
+ {
+ "name": "Nahmii 3 Testnet Explorer",
+ "url": "https://explorer.testnet.n3.nahmii.io",
+ "icon": "nahmii",
+ "standard": "EIP3091"
+ }
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-3",
+ "bridges": [{ "url": "https://bridge.testnet.n3.nahmii.io" }]
+ }
+ },
+ {
+ "name": "Bitindi Testnet",
+ "chain": "BNI",
+ "icon": "bitindiTestnet",
+ "rpc": ["https://testnet-rpc.bitindi.org"],
+ "faucets": ["https://faucet.bitindi.org"],
+ "nativeCurrency": { "name": "BNI", "symbol": "$BNI", "decimals": 18 },
+ "infoURL": "https://bitindi.org",
+ "shortName": "BNIt",
+ "chainId": 4096,
+ "networkId": 4096,
+ "explorers": [
+ {
+ "name": "Bitindi",
+ "url": "https://testnet.bitindiscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Bitindi Mainnet",
+ "chain": "BNI",
+ "icon": "bitindi",
"rpc": ["https://mainnet-rpc.bitindi.org"],
"faucets": ["https://faucet.bitindi.org"],
"nativeCurrency": { "name": "BNI", "symbol": "$BNI", "decimals": 18 },
@@ -7989,6 +8926,29 @@
}
]
},
+ {
+ "name": "Tipboxcoin Testnet",
+ "chain": "TPBX",
+ "icon": "tipboxcoinIcon",
+ "rpc": ["https://testnet-rpc.tipboxcoin.net"],
+ "faucets": ["https://faucet.tipboxcoin.net"],
+ "nativeCurrency": {
+ "name": "Tipboxcoin",
+ "symbol": "TPBX",
+ "decimals": 18
+ },
+ "infoURL": "https://tipboxcoin.net",
+ "shortName": "TPBXt",
+ "chainId": 4141,
+ "networkId": 4141,
+ "explorers": [
+ {
+ "name": "Tipboxcoin",
+ "url": "https://testnet.tipboxcoin.net",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "PHI Network V1",
"chain": "PHI V1",
@@ -8009,6 +8969,30 @@
}
]
},
+ {
+ "name": "Nexi Mainnet",
+ "chain": "Nexi",
+ "icon": "nexi",
+ "rpc": [
+ "https://rpc.chain.nexi.technology/",
+ "https://chain.nexilix.com",
+ "https://chain.nexi.evmnode.online"
+ ],
+ "faucets": [],
+ "nativeCurrency": { "name": "Nexi", "symbol": "NEXI", "decimals": 18 },
+ "infoURL": "https://www.nexi.technology/",
+ "shortName": "nexi",
+ "chainId": 4242,
+ "networkId": 4242,
+ "slip44": 2500,
+ "explorers": [
+ {
+ "name": "nexiscan",
+ "url": "https://www.nexiscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Bobafuji Testnet",
"chain": "Bobafuji Testnet",
@@ -8411,6 +9395,29 @@
}
]
},
+ {
+ "name": "SatoshiChain Testnet",
+ "chain": "SATS",
+ "icon": "satoshichain",
+ "rpc": ["https://rpc.satoshichain.io"],
+ "faucets": ["https://faucet.satoshichain.io"],
+ "nativeCurrency": {
+ "name": "SatoshiChain Coin",
+ "symbol": "SATS",
+ "decimals": 18
+ },
+ "infoURL": "https://satoshichain.net",
+ "shortName": "sats",
+ "chainId": 5758,
+ "networkId": 5758,
+ "explorers": [
+ {
+ "name": "SatoshiChain Explorer",
+ "url": "https://satoshiscan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Ganache",
"title": "Ganache GUI Ethereum Testnet",
@@ -8515,6 +9522,25 @@
}
]
},
+ {
+ "name": "Scolcoin WeiChain Testnet",
+ "chain": "SCOLWEI-testnet",
+ "rpc": ["https://testnet-rpc.scolcoin.com"],
+ "faucets": ["https://faucet.scolcoin.com"],
+ "nativeCurrency": { "name": "Scolcoin", "symbol": "SCOL", "decimals": 18 },
+ "infoURL": "https://scolcoin.com",
+ "shortName": "SRC-test",
+ "chainId": 6552,
+ "networkId": 6552,
+ "icon": "scolcoin",
+ "explorers": [
+ {
+ "name": "Scolscan Testnet Explorer",
+ "url": "https://testnet-explorer.scolcoin.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Pixie Chain Mainnet",
"chain": "PixieChain",
@@ -8540,6 +9566,27 @@
}
]
},
+ {
+ "name": "IRIShub",
+ "chain": "IRIShub",
+ "rpc": ["https://evmrpc.irishub-1.irisnet.org"],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "Eris", "symbol": "ERIS", "decimals": 18 },
+ "infoURL": "https://www.irisnet.org",
+ "shortName": "iris",
+ "chainId": 6688,
+ "networkId": 6688,
+ "icon": "irishub",
+ "explorers": [
+ {
+ "name": "IRISHub Cosmos Explorer (IOBScan)",
+ "url": "https://irishub.iobscan.io",
+ "standard": "none",
+ "icon": "irishub"
+ }
+ ]
+ },
{
"name": "Gold Smart Chain Mainnet",
"chain": "STAND",
@@ -8680,6 +9727,24 @@
}
]
},
+ {
+ "name": "KLYNTAR",
+ "chain": "KLY",
+ "rpc": [
+ "https://evm.klyntar.org/kly_evm_rpc",
+ "https://evm.klyntarscan.org/kly_evm_rpc"
+ ],
+ "faucets": [],
+ "nativeCurrency": { "name": "KLYNTAR", "symbol": "KLY", "decimals": 18 },
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "infoURL": "https://klyntar.org",
+ "shortName": "kly",
+ "chainId": 7331,
+ "networkId": 7331,
+ "icon": "klyntar",
+ "explorers": [],
+ "status": "incubating"
+ },
{
"name": "Shyft Mainnet",
"chain": "SHYFT",
@@ -8700,6 +9765,90 @@
}
]
},
+ {
+ "name": "ADIL Testnet",
+ "chain": "ADIL",
+ "icon": "adil",
+ "rpc": ["https://testnet.adilchain-rpc.io"],
+ "faucets": ["https://testnet-faucet.adil-scan.io"],
+ "nativeCurrency": {
+ "name": "Testnet ADIL",
+ "symbol": "ADIL",
+ "decimals": 18
+ },
+ "infoURL": "https://adilchain.io",
+ "shortName": "tadil",
+ "chainId": 7575,
+ "networkId": 7575,
+ "explorers": [
+ {
+ "name": "ADIL Testnet Explorer",
+ "url": "https://testnet.adilchain-scan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Adil Chain V2 Mainnet",
+ "chain": "ADIL",
+ "icon": "adil",
+ "rpc": ["https://adilchain-rpc.io"],
+ "faucets": [],
+ "nativeCurrency": { "name": "ADIL", "symbol": "ADIL", "decimals": 18 },
+ "infoURL": "https://adilchain.io",
+ "shortName": "adil",
+ "chainId": 7576,
+ "networkId": 7576,
+ "explorers": [
+ {
+ "name": "ADIL Mainnet Explorer",
+ "url": "https://adilchain-scan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "The Root Network - Mainnet",
+ "chain": "TRN",
+ "rpc": [
+ "https://root.rootnet.live/archive",
+ "wss://root.rootnet.live/archive/ws"
+ ],
+ "faucets": [],
+ "nativeCurrency": { "name": "XRP", "symbol": "XRP", "decimals": 6 },
+ "infoURL": "https://www.futureverse.com/technology/root",
+ "shortName": "trn-mainnet",
+ "chainId": 7668,
+ "networkId": 7668,
+ "explorers": [
+ {
+ "name": "rootnet",
+ "url": "https://explorer.rootnet.live",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "The Root Network - Porcini Testnet",
+ "chain": "TRN",
+ "rpc": [
+ "https://porcini.rootnet.app/archive",
+ "wss://porcini.rootnet.app/archive/ws"
+ ],
+ "faucets": [],
+ "nativeCurrency": { "name": "XRP", "symbol": "XRP", "decimals": 6 },
+ "infoURL": "https://www.futureverse.com/technology/root",
+ "shortName": "trn-porcini",
+ "chainId": 7672,
+ "networkId": 7672,
+ "explorers": [
+ {
+ "name": "rootnet",
+ "url": "https://explorer.rootnet.cloud",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Canto",
"chain": "Canto",
@@ -8732,6 +9881,28 @@
}
]
},
+ {
+ "name": "Canto Tesnet",
+ "chain": "Canto",
+ "rpc": ["https://testnet-archive.plexnode.wtf"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Testnet Canto",
+ "symbol": "CANTO",
+ "decimals": 18
+ },
+ "infoURL": "https://canto.io",
+ "shortName": "TestnetCanto",
+ "chainId": 7701,
+ "networkId": 7701,
+ "explorers": [
+ {
+ "name": "Canto Testnet EVM Explorer (Blockscout)",
+ "url": "https://testnet.tuber.build",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Rise of the Warbots Testnet",
"chain": "nmactest",
@@ -8785,6 +9956,26 @@
}
]
},
+ {
+ "name": "DOS Chain",
+ "chain": "DOS",
+ "rpc": ["https://main.doschain.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "DOS", "symbol": "DOS", "decimals": 18 },
+ "infoURL": "https://doschain.io",
+ "shortName": "dos",
+ "chainId": 7979,
+ "networkId": 7979,
+ "icon": "doschain",
+ "explorers": [
+ {
+ "name": "DOScan",
+ "url": "https://doscan.io",
+ "icon": "doschain",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Teleport",
"chain": "Teleport",
@@ -8871,7 +10062,7 @@
{
"name": "Shardeum Scan",
"url": "https://explorer-liberty10.shardeum.org",
- "standard": "none"
+ "standard": "EIP3091"
}
],
"redFlags": ["reusedChainId"]
@@ -8895,7 +10086,7 @@
{
"name": "Shardeum Scan",
"url": "https://explorer-liberty20.shardeum.org",
- "standard": "none"
+ "standard": "EIP3091"
}
],
"redFlags": ["reusedChainId"]
@@ -8919,7 +10110,7 @@
{
"name": "Shardeum Scan",
"url": "https://explorer-sphinx.shardeum.org",
- "standard": "none"
+ "standard": "EIP3091"
}
],
"redFlags": ["reusedChainId"]
@@ -8955,11 +10146,97 @@
"explorers": [
{
"name": "meerscan testnet",
+ "icon": "meer",
"url": "https://testnet.qng.meerscan.io",
"standard": "none"
}
]
},
+ {
+ "name": "Qitmeer Network Mixnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Qitmeer Mixnet",
+ "symbol": "MEER-M",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "meermix",
+ "icon": "meer",
+ "chainId": 8132,
+ "networkId": 8132,
+ "status": "incubating"
+ },
+ {
+ "name": "Qitmeer Network Privnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Qitmeer Privnet",
+ "symbol": "MEER-P",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "meerpriv",
+ "icon": "meer",
+ "chainId": 8133,
+ "networkId": 8133,
+ "status": "incubating"
+ },
+ {
+ "name": "Amana",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Amana Mainnet",
+ "symbol": "MEER",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "amana",
+ "icon": "meer",
+ "chainId": 8134,
+ "networkId": 8134,
+ "status": "incubating"
+ },
+ {
+ "name": "Flana",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Flana Mainnet",
+ "symbol": "MEER",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "flana",
+ "icon": "meer",
+ "chainId": 8135,
+ "networkId": 8135,
+ "status": "incubating"
+ },
+ {
+ "name": "Mizana",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Mizana Mainnet",
+ "symbol": "MEER",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "mizana",
+ "icon": "meer",
+ "chainId": 8136,
+ "networkId": 8136,
+ "status": "incubating"
+ },
{
"name": "BeOne Chain Testnet",
"chain": "BOC",
@@ -9041,6 +10318,36 @@
"chainId": 8285,
"networkId": 8285
},
+ {
+ "name": "Dracones Financial Services",
+ "title": "The Dracones Mainnet",
+ "chain": "FUCK",
+ "rpc": ["https://api.dracones.net/"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Functionally Universal Coin Kind",
+ "symbol": "FUCK",
+ "decimals": 18
+ },
+ "infoURL": "https://wolfery.com",
+ "shortName": "fuck",
+ "chainId": 8387,
+ "networkId": 8387,
+ "icon": "dracones",
+ "explorers": []
+ },
+ {
+ "name": "Base",
+ "chain": "ETH",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://base.org",
+ "shortName": "base",
+ "chainId": 8453,
+ "networkId": 8453,
+ "status": "incubating"
+ },
{
"name": "Toki Network",
"chain": "TOKI",
@@ -9124,7 +10431,6 @@
{
"name": "alphscan",
"url": "https://explorer.alph.network",
- "icon": "alphscan",
"standard": "EIP3091"
}
]
@@ -9132,7 +10438,7 @@
{
"name": "TMY Chain",
"chain": "TMY",
- "icon": "ethereum",
+ "icon": "tmychain",
"rpc": ["https://node1.tmyblockchain.org/rpc"],
"faucets": ["https://faucet.tmychain.org/"],
"nativeCurrency": { "name": "TMY", "symbol": "TMY", "decimals": 18 },
@@ -9479,7 +10785,7 @@
"name": "Dogcoin Testnet",
"chain": "DOGS",
"icon": "dogs",
- "rpc": ["https://testnet-rpc.dogcoin.network"],
+ "rpc": ["https://testnet-rpc.dogcoin.me"],
"faucets": ["https://faucet.dogcoin.network"],
"nativeCurrency": { "name": "Dogcoin", "symbol": "DOGS", "decimals": 18 },
"infoURL": "https://dogcoin.network",
@@ -9531,11 +10837,34 @@
{
"name": "QEasyWeb3 Explorer",
"url": "https://www.qeasyweb3.com",
- "icon": "qetscan",
"standard": "EIP3091"
}
]
},
+ {
+ "name": "Neonlink Testnet",
+ "chain": "Neonlink",
+ "rpc": ["https://testnet.neonlink.io"],
+ "faucets": ["https://faucet.neonlink.io/"],
+ "nativeCurrency": {
+ "name": "Neonlink Native Token",
+ "symbol": "tNEON",
+ "decimals": 18
+ },
+ "infoURL": "https://neonlink.io",
+ "shortName": "testneon",
+ "chainId": 9559,
+ "networkId": 9559,
+ "icon": "neonlink",
+ "explorers": [
+ {
+ "name": "Neon Blockchain Explorer",
+ "url": "https://testnet-scan.neonlink.io",
+ "standard": "EIP3091",
+ "icon": "neonlink"
+ }
+ ]
+ },
{
"name": "Oort MainnetDev",
"title": "Oort MainnetDev",
@@ -9595,6 +10924,32 @@
}
]
},
+ {
+ "name": "Carbon EVM",
+ "chain": "Carbon",
+ "icon": "carbon",
+ "rpc": ["https://evm-api.carbon.network/"],
+ "faucets": [],
+ "nativeCurrency": { "name": "swth", "symbol": "SWTH", "decimals": 18 },
+ "infoURL": "https://carbon.network/",
+ "shortName": "carbon",
+ "chainId": 9790,
+ "networkId": 9790,
+ "explorers": []
+ },
+ {
+ "name": "Carbon EVM Testnet",
+ "chain": "Carbon",
+ "icon": "carbon",
+ "rpc": ["https://test-evm-api.carbon.network/"],
+ "faucets": [],
+ "nativeCurrency": { "name": "swth", "symbol": "SWTH", "decimals": 18 },
+ "infoURL": "https://carbon.network/",
+ "shortName": "carbon-testnet",
+ "chainId": 9792,
+ "networkId": 9792,
+ "explorers": []
+ },
{
"name": "myOwn Testnet",
"chain": "myOwn",
@@ -9931,6 +11286,28 @@
}
]
},
+ {
+ "name": "HashBit Mainnet",
+ "chain": "HBIT",
+ "rpc": ["https://mainnet-rpc.hashbit.org", "https://rpc.hashbit.org"],
+ "faucets": ["https://free-online-app.com/faucet-for-eth-evm-chains/"],
+ "nativeCurrency": {
+ "name": "HashBit Native Token",
+ "symbol": "HBIT",
+ "decimals": 18
+ },
+ "infoURL": "https://hashbit.org",
+ "shortName": "hbit",
+ "chainId": 11119,
+ "networkId": 11119,
+ "explorers": [
+ {
+ "name": "hashbitscan",
+ "url": "https://explorer.hashbit.org",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Haqq Network",
"chain": "Haqq",
@@ -10056,6 +11433,29 @@
}
]
},
+ {
+ "name": "Fibonacci Mainnet",
+ "chain": "FIBO",
+ "icon": "fibonacci",
+ "rpc": ["https://node1.fibo-api.asia"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "FIBONACCI UTILITY TOKEN",
+ "symbol": "FIBO",
+ "decimals": 18
+ },
+ "infoURL": "https://fibochain.org",
+ "shortName": "fibo",
+ "chainId": 12306,
+ "networkId": 1230,
+ "explorers": [
+ {
+ "name": "fiboscan",
+ "url": "https://scan.fibochain.org",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "BLG Testnet",
"chain": "BLG",
@@ -10090,6 +11490,26 @@
],
"parent": { "type": "L2", "chain": "eip155-43113" }
},
+ {
+ "name": "Rikeza Network Testnet",
+ "title": "Rikeza Network Testnet",
+ "chain": "Rikeza",
+ "icon": "rikeza",
+ "rpc": ["https://testnet-rpc.rikscan.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Rikeza", "symbol": "RIK", "decimals": 18 },
+ "infoURL": "https://rikeza.io",
+ "shortName": "tRIK",
+ "chainId": 12715,
+ "networkId": 12715,
+ "explorers": [
+ {
+ "name": "Rikeza Blockchain explorer",
+ "url": "https://testnet.rikscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "SPS",
"chain": "SPS",
@@ -10144,7 +11564,6 @@
{
"name": "phoenixplorer",
"url": "https://phoenixplorer.com",
- "icon": "phoenixplorer",
"standard": "EIP3091"
}
]
@@ -10187,6 +11606,24 @@
}
]
},
+ {
+ "name": "LoopNetwork Mainnet",
+ "chain": "LoopNetwork",
+ "rpc": ["https://api.mainnetloop.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "LOOP", "symbol": "LOOP", "decimals": 18 },
+ "infoURL": "http://theloopnetwork.org/",
+ "shortName": "loop",
+ "chainId": 15551,
+ "networkId": 15551,
+ "explorers": [
+ {
+ "name": "loopscan",
+ "url": "http://explorer.mainnetloop.com",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Trust EVM Testnet",
"chain": "Trust EVM Testnet",
@@ -10199,11 +11636,35 @@
"networkId": 15555,
"explorers": [
{
- "name": "Trust EVM Explorer",
- "url": "https://trustscan.one",
+ "name": "Trust EVM Explorer",
+ "url": "https://trustscan.one",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "EOS EVM Network Testnet",
+ "chain": "EOS",
+ "icon": "eos",
+ "rpc": ["https://api.testnet.evm.eosnetwork.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "EOS", "symbol": "EOS", "decimals": 18 },
+ "infoURL": "https://eosnetwork.com/eos-evm",
+ "shortName": "eos-testnet",
+ "chainId": 15557,
+ "networkId": 15557,
+ "explorers": [
+ {
+ "name": "EOS EVM Explorer",
+ "url": "https://explorer.testnet.evm.eosnetwork.com",
"standard": "EIP3091"
}
- ]
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-1",
+ "bridges": [{ "url": "https://bridge.testnet.evm.eosnetwork.com" }]
+ }
},
{
"name": "MetaDot Mainnet",
@@ -10235,6 +11696,27 @@
"chainId": 16001,
"networkId": 16001
},
+ {
+ "name": "IRIShub Testnet",
+ "chain": "IRIShub",
+ "rpc": ["http://34.80.202.172:8545"],
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "faucets": [],
+ "nativeCurrency": { "name": "Eris", "symbol": "ERIS", "decimals": 18 },
+ "infoURL": "https://www.irisnet.org",
+ "shortName": "nyancat",
+ "chainId": 16688,
+ "networkId": 16688,
+ "icon": "nyancat",
+ "explorers": [
+ {
+ "name": "IRISHub Testnet Cosmos Explorer (IOBScan)",
+ "url": "https://nyancat.iobscan.io",
+ "standard": "none",
+ "icon": "nyancat"
+ }
+ ]
+ },
{
"name": "AirDAO Mainnet",
"chain": "ambnet",
@@ -10273,6 +11755,58 @@
}
]
},
+ {
+ "name": "Palette Chain Testnet",
+ "chain": "PLT",
+ "rpc": ["https://palette-opennet.com:22000"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Palette Token",
+ "symbol": "PLT",
+ "decimals": 18
+ },
+ "features": [],
+ "infoURL": "https://hashpalette.com/",
+ "shortName": "PCT",
+ "chainId": 17180,
+ "networkId": 17180,
+ "icon": "PLT",
+ "explorers": [
+ {
+ "name": "Palettescan",
+ "url": "https://testnet.palettescan.com",
+ "icon": "PLT",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "EOS EVM Network",
+ "chain": "EOS",
+ "icon": "eos",
+ "rpc": ["https://api.evm.eosnetwork.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "EOS", "symbol": "EOS", "decimals": 18 },
+ "infoURL": "https://eosnetwork.com/eos-evm",
+ "shortName": "eos",
+ "chainId": 17777,
+ "networkId": 17777,
+ "explorers": [
+ {
+ "name": "EOS EVM Explorer",
+ "url": "https://explorer.evm.eosnetwork.com",
+ "standard": "EIP3091"
+ }
+ ],
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-1",
+ "bridges": [
+ { "url": "https://bridge.evm.eosnetwork.com" },
+ { "url": "https://app.multichain.org" }
+ ]
+ }
+ },
{
"name": "Frontier of Dreams Testnet",
"chain": "Game Network",
@@ -10362,6 +11896,29 @@
}
]
},
+ {
+ "name": "Camelark Mainnet",
+ "chainId": 20001,
+ "shortName": "Camelark",
+ "chain": "ETHW",
+ "icon": "camelark",
+ "networkId": 20001,
+ "nativeCurrency": {
+ "name": "EthereumPoW",
+ "symbol": "ETHW",
+ "decimals": 18
+ },
+ "rpc": ["https://mainnet-http-rpc.camelark.com"],
+ "faucets": [],
+ "explorers": [
+ {
+ "name": "CamelarkScan",
+ "url": "https://scan.camelark.com",
+ "standard": "EIP3091"
+ }
+ ],
+ "infoURL": "https://www.camelark.com"
+ },
{
"name": "Callisto Testnet",
"chain": "CLO",
@@ -10636,6 +12193,25 @@
}
]
},
+ {
+ "name": "Ferrum Testnet",
+ "chain": "tFRM",
+ "rpc": ["http://testnet.dev.svcs.ferrumnetwork.io:9933"],
+ "faucets": ["https://testnet.faucet.ferrumnetwork.io"],
+ "nativeCurrency": { "name": "Ferrum", "symbol": "tFRM", "decimals": 18 },
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "infoURL": "https://ferrum.network",
+ "shortName": "frm",
+ "chainId": 26026,
+ "networkId": 26026,
+ "explorers": [
+ {
+ "name": "polkadotjs",
+ "url": "https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet.dev.svcs.ferrumnetwork.io#/explorer",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Hertz Network Mainnet",
"chain": "HTZ",
@@ -10874,6 +12450,43 @@
}
]
},
+ {
+ "name": "Zilliqa EVM",
+ "chain": "ZIL",
+ "rpc": ["https://api.zilliqa.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Zilliqa", "symbol": "ZIL", "decimals": 18 },
+ "infoURL": "https://www.zilliqa.com/",
+ "shortName": "zil",
+ "chainId": 32769,
+ "networkId": 32769,
+ "icon": "zilliqa",
+ "explorers": [
+ {
+ "name": "Zilliqa EVM Explorer",
+ "url": "https://evmx.zilliqa.com",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "Zilliqa EVM Testnet",
+ "chain": "ZIL",
+ "rpc": ["https://dev-api.zilliqa.com"],
+ "faucets": ["https://dev-wallet.zilliqa.com/faucet?network=testnet"],
+ "nativeCurrency": { "name": "Zilliqa", "symbol": "ZIL", "decimals": 18 },
+ "infoURL": "https://www.zilliqa.com/",
+ "shortName": "zil-testnet",
+ "chainId": 33101,
+ "networkId": 33101,
+ "explorers": [
+ {
+ "name": "Zilliqa EVM Explorer",
+ "url": "https://evmx.zilliqa.com",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Aves Mainnet",
"chain": "AVS",
@@ -11186,7 +12799,10 @@
"name": "Avalanche C-Chain",
"chain": "AVAX",
"icon": "avax",
- "rpc": ["https://api.avax.network/ext/bc/C/rpc"],
+ "rpc": [
+ "https://api.avax.network/ext/bc/C/rpc",
+ "https://avalanche-c-chain.publicnode.com"
+ ],
"features": [{ "name": "EIP1559" }],
"faucets": ["https://free-online-app.com/faucet-for-eth-evm-chains/"],
"nativeCurrency": { "name": "Avalanche", "symbol": "AVAX", "decimals": 18 },
@@ -11548,6 +13164,71 @@
}
]
},
+ {
+ "name": "Syscoin Rollux Testnet",
+ "chain": "SYS",
+ "rpc": [
+ "https://rpc-tanenbaum.rollux.com",
+ "wss://rpc-tanenbaum.rollux.com/wss"
+ ],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Rollux Testnet Syscoin",
+ "symbol": "tSYS",
+ "decimals": 18
+ },
+ "infoURL": "https://syscoin.org",
+ "shortName": "tsys-rollux",
+ "chainId": 57000,
+ "networkId": 57000,
+ "explorers": [
+ {
+ "name": "Syscoin Rollux Testnet Explorer",
+ "url": "https://rollux.tanenbaum.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Linea Testnet",
+ "title": "Linea Goerli Testnet",
+ "chain": "ETH",
+ "rpc": [
+ "https://rpc.goerli.linea.build",
+ "wss://rpc.goerli.linea.build",
+ "https://consensys-zkevm-goerli-prealpha.infura.io/v3/${INFURA_API_KEY}",
+ "wss://consensys-zkevm-goerli-prealpha.infura.io/v3/${INFURA_API_KEY}"
+ ],
+ "faucets": ["https://faucetlink.to/goerli"],
+ "nativeCurrency": {
+ "name": "Linea Ether",
+ "symbol": "ETH",
+ "decimals": 18
+ },
+ "infoURL": "https://linea.build",
+ "shortName": "linea-testnet",
+ "chainId": 59140,
+ "networkId": 59140,
+ "icon": "linea",
+ "parent": {
+ "type": "L2",
+ "chain": "eip155-5",
+ "bridges": [
+ {
+ "url": "https://goerli.hop.exchange/#/send?token=ETH&sourceNetwork=ethereum&destNetwork=linea"
+ }
+ ]
+ },
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://explorer.goerli.linea.build",
+ "standard": "EIP3091",
+ "icon": "linea"
+ }
+ ],
+ "status": "active"
+ },
{
"name": "Thinkium Testnet Chain 0",
"chain": "Thinkium",
@@ -11744,9 +13425,29 @@
}
]
},
+ {
+ "name": "Scolcoin Mainnet",
+ "chain": "SCOLWEI",
+ "rpc": ["https://mainnet-rpc.scolcoin.com"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Scolcoin", "symbol": "SCOL", "decimals": 18 },
+ "infoURL": "https://scolcoin.com",
+ "shortName": "SRC",
+ "chainId": 65450,
+ "networkId": 65450,
+ "icon": "scolcoin",
+ "explorers": [
+ {
+ "name": "Scolscan Explorer",
+ "url": "https://explorer.scolcoin.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "SiriusNet",
"chain": "SIN",
+ "status": "deprecated",
"rpc": [
"https://u0tnafcv6j:o2T045sxuCNXL878RDQLp5__Zj-es2cvdjtgkl4etn0@u0v7kwtvtg-u0wj114sve-rpc.us0-aws.kaleido.io/"
],
@@ -11764,6 +13465,21 @@
}
]
},
+ {
+ "name": "Cosmic Chain",
+ "chain": "COSMIC",
+ "rpc": ["http://testnet.cosmicchain.site:3344"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Cosmic Chain",
+ "symbol": "COSMIC",
+ "decimals": 18
+ },
+ "infoURL": "https://cosmicchain.site",
+ "shortName": "Cosmic",
+ "chainId": 67588,
+ "networkId": 3344
+ },
{
"name": "Condrieu",
"title": "Ethereum Verkle Testnet Condrieu",
@@ -12017,45 +13733,198 @@
"rpc": ["https://rpc-testnet.goldsmartchain.com"],
"faucets": ["https://faucet.goldsmartchain.com"],
"nativeCurrency": {
- "name": "Standard in Gold",
- "symbol": "STAND",
+ "name": "Standard in Gold",
+ "symbol": "STAND",
+ "decimals": 18
+ },
+ "infoURL": "https://goldsmartchain.com",
+ "shortName": "STANDt",
+ "chainId": 79879,
+ "networkId": 79879,
+ "explorers": [
+ {
+ "name": "Gold Smart Chain",
+ "url": "https://testnet.goldsmartchain.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Mumbai",
+ "title": "Polygon Testnet Mumbai",
+ "chain": "Polygon",
+ "icon": "polygon",
+ "rpc": [
+ "https://matic-mumbai.chainstacklabs.com",
+ "https://rpc-mumbai.maticvigil.com",
+ "https://matic-testnet-archive-rpc.bwarelabs.com"
+ ],
+ "faucets": ["https://faucet.polygon.technology/"],
+ "nativeCurrency": { "name": "MATIC", "symbol": "MATIC", "decimals": 18 },
+ "infoURL": "https://polygon.technology/",
+ "shortName": "maticmum",
+ "chainId": 80001,
+ "networkId": 80001,
+ "explorers": [
+ {
+ "name": "polygonscan",
+ "url": "https://mumbai.polygonscan.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "Amana Testnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Amana Testnet",
+ "symbol": "MEER-T",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "amanatest",
+ "icon": "meer",
+ "chainId": 81341,
+ "networkId": 81341,
+ "status": "incubating"
+ },
+ {
+ "name": "Amana Mixnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Amana Mixnet",
+ "symbol": "MEER-M",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "amanamix",
+ "icon": "meer",
+ "chainId": 81342,
+ "networkId": 81342,
+ "status": "incubating"
+ },
+ {
+ "name": "Amana Privnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Amana Privnet",
+ "symbol": "MEER-P",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "amanapriv",
+ "icon": "meer",
+ "chainId": 81343,
+ "networkId": 81343,
+ "status": "incubating"
+ },
+ {
+ "name": "Flana Testnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Flana Testnet",
+ "symbol": "MEER-T",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "flanatest",
+ "icon": "meer",
+ "chainId": 81351,
+ "networkId": 81351,
+ "status": "incubating"
+ },
+ {
+ "name": "Flana Mixnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Flana Mixnet",
+ "symbol": "MEER-M",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "flanamix",
+ "icon": "meer",
+ "chainId": 81352,
+ "networkId": 81352,
+ "status": "incubating"
+ },
+ {
+ "name": "Flana Privnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Flana Privnet",
+ "symbol": "MEER-P",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "flanapriv",
+ "icon": "meer",
+ "chainId": 81353,
+ "networkId": 81353,
+ "status": "incubating"
+ },
+ {
+ "name": "Mizana Testnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Mizana Testnet",
+ "symbol": "MEER-T",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "mizanatest",
+ "icon": "meer",
+ "chainId": 81361,
+ "networkId": 81361,
+ "status": "incubating"
+ },
+ {
+ "name": "Mizana Mixnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Mizana Mixnet",
+ "symbol": "MEER-M",
"decimals": 18
},
- "infoURL": "https://goldsmartchain.com",
- "shortName": "STANDt",
- "chainId": 79879,
- "networkId": 79879,
- "explorers": [
- {
- "name": "Gold Smart Chain",
- "url": "https://testnet.goldsmartchain.com",
- "standard": "EIP3091"
- }
- ]
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "mizanamix",
+ "icon": "meer",
+ "chainId": 81362,
+ "networkId": 81362,
+ "status": "incubating"
},
{
- "name": "Mumbai",
- "title": "Polygon Testnet Mumbai",
- "chain": "Polygon",
- "icon": "polygon",
- "rpc": [
- "https://matic-mumbai.chainstacklabs.com",
- "https://rpc-mumbai.maticvigil.com",
- "https://matic-testnet-archive-rpc.bwarelabs.com"
- ],
- "faucets": ["https://faucet.polygon.technology/"],
- "nativeCurrency": { "name": "MATIC", "symbol": "MATIC", "decimals": 18 },
- "infoURL": "https://polygon.technology/",
- "shortName": "maticmum",
- "chainId": 80001,
- "networkId": 80001,
- "explorers": [
- {
- "name": "polygonscan",
- "url": "https://mumbai.polygonscan.com",
- "standard": "EIP3091"
- }
- ]
+ "name": "Mizana Privnet",
+ "chain": "MEER",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Mizana Privnet",
+ "symbol": "MEER-P",
+ "decimals": 18
+ },
+ "infoURL": "https://github.com/Qitmeer",
+ "shortName": "mizanapriv",
+ "icon": "meer",
+ "chainId": 81363,
+ "networkId": 81363,
+ "status": "incubating"
},
{
"name": "Base Goerli Testnet",
@@ -12084,6 +13953,21 @@
}
]
},
+ {
+ "name": "CYBERTRUST",
+ "chain": "CYBER",
+ "rpc": ["http://testnet.cybertrust.space:48501"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Cyber Trust",
+ "symbol": "CYBER",
+ "decimals": 18
+ },
+ "infoURL": "https://cybertrust.space",
+ "shortName": "Cyber",
+ "chainId": 85449,
+ "networkId": 48501
+ },
{
"name": "Chiliz Scoville Testnet",
"chain": "CHZ",
@@ -12713,6 +14597,58 @@
}
]
},
+ {
+ "name": "Siberium Network",
+ "chain": "SBR",
+ "rpc": [
+ "https://rpc.main.siberium.net",
+ "https://rpc.main.siberium.net.ru"
+ ],
+ "faucets": [],
+ "nativeCurrency": { "name": "Siberium", "symbol": "SBR", "decimals": 18 },
+ "infoURL": "https://siberium.net",
+ "shortName": "sbr",
+ "chainId": 111111,
+ "networkId": 111111,
+ "icon": "siberium",
+ "explorers": [
+ {
+ "name": "Siberium Mainnet Explorer - blockscout - 1",
+ "url": "https://explorer.main.siberium.net",
+ "icon": "siberium",
+ "standard": "EIP3091"
+ },
+ {
+ "name": "Siberium Mainnet Explorer - blockscout - 2",
+ "url": "https://explorer.main.siberium.net.ru",
+ "icon": "siberium",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "ADIL Devnet",
+ "chain": "ADIL",
+ "icon": "adil",
+ "rpc": ["https://devnet.adilchain-rpc.io"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Devnet ADIL",
+ "symbol": "ADIL",
+ "decimals": 18
+ },
+ "infoURL": "https://adilchain.io",
+ "shortName": "dadil",
+ "chainId": 123456,
+ "networkId": 123456,
+ "explorers": [
+ {
+ "name": "ADIL Devnet Explorer",
+ "url": "https://devnet.adilchain-scan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "ETND Chain Mainnets",
"chain": "ETND",
@@ -12733,6 +14669,44 @@
}
]
},
+ {
+ "name": "ICPlaza Mainnet",
+ "chain": "ICPlaza",
+ "icon": "icplaza",
+ "rpc": ["https://rpcmainnet.ic-plaza.org/"],
+ "faucets": [],
+ "nativeCurrency": { "name": "ict", "symbol": "ict", "decimals": 18 },
+ "infoURL": "https://docs.ic-plaza.org/",
+ "shortName": "ICPlaza",
+ "chainId": 142857,
+ "networkId": 142857,
+ "explorers": [
+ {
+ "name": "ICPlaza",
+ "url": "https://browsemainnet.ic-plaza.org/index",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "Taiko (Alpha-2 Testnet)",
+ "chain": "ETH",
+ "icon": "taiko",
+ "rpc": ["https://rpc.a2.taiko.xyz"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
+ "infoURL": "https://taiko.xyz",
+ "shortName": "taiko-a2",
+ "chainId": 167004,
+ "networkId": 167004,
+ "explorers": [
+ {
+ "name": "blockscout",
+ "url": "https://explorer.a2.taiko.xyz",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Condor Test Network",
"chain": "CONDOR",
@@ -12968,11 +14942,56 @@
{
"name": "explorer masnet",
"url": "https://explorer.masnet.ai",
- "icon": "explorer",
"standard": "EIP3091"
}
]
},
+ {
+ "name": "Taf ECO Chain Mainnet",
+ "chain": "Taf ECO Chain",
+ "icon": "taf",
+ "rpc": ["https://mainnet.tafchain.com/v1"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "Taf ECO Chain Mainnet",
+ "symbol": "TAFECO",
+ "decimals": 18
+ },
+ "infoURL": "https://www.tafchain.com",
+ "shortName": "TAFECO",
+ "chainId": 224168,
+ "networkId": 224168,
+ "explorers": [
+ {
+ "name": "Taf ECO Chain Mainnet",
+ "url": "https://ecoscan.tafchain.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "HashKey Chain Testnet",
+ "chain": "HashKey",
+ "rpc": ["https://testnet.hashkeychain/rpc"],
+ "faucets": ["https://testnet.hashkeychain/faucet"],
+ "nativeCurrency": {
+ "name": "HashKey Token",
+ "symbol": "tHSK",
+ "decimals": 18
+ },
+ "infoURL": "https://www.hashkey.com",
+ "shortName": "hsktest",
+ "chainId": 230315,
+ "networkId": 230315,
+ "icon": "hsk",
+ "explorers": [
+ {
+ "name": "HashKey Chain Testnet Explorer",
+ "url": "https://testnet.hashkeyscan.io",
+ "standard": "none"
+ }
+ ]
+ },
{
"name": "Haymo Testnet",
"chain": "tHYM",
@@ -13114,6 +15133,31 @@
"name": "Filscout - Calibration",
"url": "https://calibration.filscout.com/en",
"standard": "none"
+ },
+ {
+ "name": "Filfox - Calibration",
+ "url": "https://calibration.filfox.info",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "TTcoin Smart Chain Mainnet",
+ "chain": "TSC",
+ "icon": "tscscan",
+ "rpc": ["https://mainnet-rpc.tscscan.com"],
+ "faucets": ["https://faucet.tscscan.com"],
+ "nativeCurrency": { "name": "TTcoin", "symbol": "TC", "decimals": 18 },
+ "infoURL": "https://ttcoin.info/",
+ "shortName": "tc",
+ "chainId": 330844,
+ "networkId": 330844,
+ "explorers": [
+ {
+ "name": "TTcoin Smart Chain Explorer",
+ "url": "https://tscscan.com",
+ "standard": "EIP3091",
+ "icon": "tscscan"
}
]
},
@@ -13159,6 +15203,26 @@
"chainId": 333999,
"networkId": 333999
},
+ {
+ "name": "HAPchain Testnet",
+ "chain": "HAPchain",
+ "rpc": ["https://jsonrpc-test.hap.land"],
+ "faucets": [],
+ "nativeCurrency": { "name": "HAP", "symbol": "HAP", "decimals": 18 },
+ "infoURL": "https://hap.land",
+ "shortName": "hap-testnet",
+ "chainId": 373737,
+ "networkId": 373737,
+ "icon": "hap",
+ "explorers": [
+ {
+ "name": "HAP EVM Explorer (Blockscout)",
+ "url": "https://blockscout-test.hap.land",
+ "standard": "none",
+ "icon": "hap"
+ }
+ ]
+ },
{
"name": "Metal C-Chain",
"chain": "Metal",
@@ -13197,6 +15261,29 @@
}
]
},
+ {
+ "name": "Tipboxcoin Mainnet",
+ "chain": "TPBX",
+ "icon": "tipboxcoinIcon",
+ "rpc": ["https://mainnet-rpc.tipboxcoin.net"],
+ "faucets": ["https://faucet.tipboxcoin.net"],
+ "nativeCurrency": {
+ "name": "Tipboxcoin",
+ "symbol": "TPBX",
+ "decimals": 18
+ },
+ "infoURL": "https://tipboxcoin.net",
+ "shortName": "TPBXm",
+ "chainId": 404040,
+ "networkId": 404040,
+ "explorers": [
+ {
+ "name": "Tipboxcoin",
+ "url": "https://tipboxcoin.net",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Kekchain",
"chain": "kek",
@@ -13318,6 +15405,20 @@
}
]
},
+ {
+ "name": "Markr Go",
+ "chain": "Unified",
+ "icon": "markrgo",
+ "rpc": ["https://rpc.markr.io/ext/"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Avalanche", "symbol": "AVAX", "decimals": 18 },
+ "infoURL": "https://www.markr.io/",
+ "shortName": "markr-go",
+ "chainId": 431140,
+ "networkId": 431140,
+ "explorers": [],
+ "status": "incubating"
+ },
{
"name": "Dexalot Subnet Testnet",
"chain": "DEXALOT",
@@ -13425,8 +15526,8 @@
"name": "ethereum Fair",
"chainId": 513100,
"networkId": 513100,
- "shortName": "etf",
- "chain": "ETF",
+ "shortName": "ethf",
+ "chain": "ETHF",
"nativeCurrency": {
"name": "EthereumFair",
"symbol": "ETHF",
@@ -13437,7 +15538,7 @@
"explorers": [
{
"name": "etherfair",
- "url": "https://explorer.etherfair.org",
+ "url": "https://www.oklink.com/ethf",
"standard": "EIP3091"
}
],
@@ -13494,6 +15595,29 @@
}
]
},
+ {
+ "name": "BeanEco SmartChain",
+ "title": "BESC Mainnet",
+ "chain": "BESC",
+ "rpc": ["https://mainnet-rpc.bescscan.io"],
+ "faucets": ["faucet.bescscan.ion"],
+ "nativeCurrency": {
+ "name": "BeanEco SmartChain",
+ "symbol": "BESC",
+ "decimals": 18
+ },
+ "infoURL": "besceco.finance",
+ "shortName": "BESC",
+ "chainId": 535037,
+ "networkId": 535037,
+ "explorers": [
+ {
+ "name": "bescscan",
+ "url": "https://Bescscan.io",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Bear Network Chain Mainnet",
"chain": "BRNKC",
@@ -13887,9 +16011,7 @@
"https://devnetopenapi2.platon.network/rpc",
"wss://devnetopenapi2.platon.network/ws"
],
- "faucets": [
- "https://faucet.platon.network/faucet/?id=e5d32df10aee11ec911142010a667c03"
- ],
+ "faucets": ["https://devnet2faucet.platon.network/faucet"],
"nativeCurrency": { "name": "LAT", "symbol": "lat", "decimals": 18 },
"infoURL": "https://www.platon.network",
"shortName": "platondev",
@@ -13946,6 +16068,29 @@
"slip44": 1,
"explorers": []
},
+ {
+ "name": "MXC Wannsee zkEVM Testnet",
+ "chain": "MXC zkEVM",
+ "icon": "mxc",
+ "rpc": ["https://wannsee-rpc.mxc.com"],
+ "faucets": [],
+ "nativeCurrency": {
+ "name": "MXC Wannsee zkEVM Testnet",
+ "symbol": "MXC",
+ "decimals": 18
+ },
+ "infoURL": "https://wannsee.mxc.com/docs/intro",
+ "shortName": "MXC",
+ "chainId": 5167003,
+ "networkId": 5167003,
+ "explorers": [
+ {
+ "name": "MXC Wannsee zkEVM Testnet",
+ "url": "https://wannsee-explorer.mxc.com",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Imversed Mainnet",
"chain": "Imversed",
@@ -14110,6 +16255,54 @@
],
"parent": { "chain": "eip155-2099156", "type": "L2" }
},
+ {
+ "name": "HAPchain",
+ "chain": "HAPchain",
+ "rpc": ["https://jsonrpc.hap.land"],
+ "faucets": [],
+ "nativeCurrency": { "name": "HAP", "symbol": "HAP", "decimals": 18 },
+ "infoURL": "https://hap.land",
+ "shortName": "hap",
+ "chainId": 8794598,
+ "networkId": 8794598,
+ "icon": "hap",
+ "explorers": [
+ {
+ "name": "HAP EVM Explorer (Blockscout)",
+ "url": "https://blockscout.hap.land",
+ "standard": "none",
+ "icon": "hap"
+ }
+ ]
+ },
+ {
+ "name": "Quarix Testnet",
+ "chain": "Quarix",
+ "status": "incubating",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": { "name": "Q", "symbol": "Q", "decimals": 18 },
+ "infoURL": "",
+ "shortName": "quarix-testnet",
+ "chainId": 8888881,
+ "networkId": 8888881,
+ "icon": "quarix",
+ "explorers": []
+ },
+ {
+ "name": "Quarix",
+ "chain": "Quarix",
+ "status": "incubating",
+ "rpc": [],
+ "faucets": [],
+ "nativeCurrency": { "name": "Q", "symbol": "Q", "decimals": 18 },
+ "infoURL": "",
+ "shortName": "quarix",
+ "chainId": 8888888,
+ "networkId": 8888888,
+ "icon": "quarix",
+ "explorers": []
+ },
{
"name": "Plian Testnet Subchain 1",
"chain": "Plian",
@@ -14156,7 +16349,11 @@
"name": "Sepolia",
"title": "Ethereum Testnet Sepolia",
"chain": "ETH",
- "rpc": ["https://rpc.sepolia.org", "https://rpc-sepolia.rockx.com"],
+ "rpc": [
+ "https://rpc.sepolia.org",
+ "https://rpc2.sepolia.org",
+ "https://rpc-sepolia.rockx.com"
+ ],
"faucets": [
"http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}"
],
@@ -14468,6 +16665,7 @@
"shortName": "bakerloo-0",
"chainId": 65010000,
"networkId": 65010000,
+ "icon": "autonity",
"explorers": [
{
"name": "autonity-blockscout",
@@ -14493,6 +16691,7 @@
"shortName": "piccadilly-0",
"chainId": 65100000,
"networkId": 65100000,
+ "icon": "autonity",
"explorers": [
{
"name": "autonity-blockscout",
@@ -14501,6 +16700,26 @@
}
]
},
+ {
+ "name": "T.E.A.M Blockchain",
+ "chain": "TEAM",
+ "icon": "team",
+ "rpc": ["https://rpc.teamblockchain.team"],
+ "faucets": [],
+ "nativeCurrency": { "name": "TEAM", "symbol": "$TEAM", "decimals": 18 },
+ "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
+ "infoURL": "https://teamblockchain.team",
+ "shortName": "team",
+ "chainId": 88888888,
+ "networkId": 88888888,
+ "explorers": [
+ {
+ "name": "teamscan",
+ "url": "https://teamblockchain.team",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Joys Digital TestNet",
"chain": "TOYS",
@@ -14522,14 +16741,33 @@
"shortName": "GTH",
"chainId": 192837465,
"networkId": 192837465,
+ "icon": "gather",
"explorers": [
{
"name": "Blockscout",
"url": "https://explorer.gather.network",
+ "icon": "gather",
"standard": "none"
}
]
},
+ {
+ "name": "Kanazawa",
+ "title": "Meld Testnet Kanazawa",
+ "chain": "Kanazawa",
+ "rpc": [
+ "https://rpc-kanazawa.meldlabs.dev/ext/bc/2Ci7VYrUd4fTBqGA5D2HA6UPHzQ4LQyr8rZQww9MGSv9rNkRzn/rpc"
+ ],
+ "faucets": [],
+ "features": [],
+ "nativeCurrency": { "name": "gMeld", "symbol": "gMELD", "decimals": 18 },
+ "icon": "meld",
+ "infoURL": "https://meld.com",
+ "shortName": "kanazawa",
+ "chainId": 222000222,
+ "networkId": 222000222,
+ "explorers": []
+ },
{
"name": "Neon EVM DevNet",
"chain": "Solana",
@@ -14621,6 +16859,21 @@
}
]
},
+ {
+ "name": "Meld",
+ "title": "Meld Mainnet",
+ "chain": "MELD",
+ "rpc": ["https://network-rpc.meld.com"],
+ "faucets": [],
+ "features": [],
+ "nativeCurrency": { "name": "gMeld", "symbol": "gMELD", "decimals": 18 },
+ "icon": "meld",
+ "infoURL": "https://meld.com",
+ "shortName": "meld",
+ "chainId": 333000333,
+ "networkId": 333000333,
+ "explorers": []
+ },
{
"name": "Calypso NFT Hub (SKALE Testnet)",
"title": "Calypso NFT Hub Testnet",
@@ -14651,10 +16904,12 @@
"shortName": "tGTH",
"chainId": 356256156,
"networkId": 356256156,
+ "icon": "gather",
"explorers": [
{
"name": "Blockscout",
"url": "https://testnet-explorer.gather.network",
+ "icon": "gather",
"standard": "none"
}
]
@@ -14714,6 +16969,47 @@
"chainId": 1122334455,
"networkId": 1122334455
},
+ {
+ "name": "CyberdeckNet",
+ "chain": "cyberdeck",
+ "rpc": ["http://cybeth1.cyberdeck.eu:8545"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Cyb", "symbol": "CYB", "decimals": 18 },
+ "infoURL": "https://cyberdeck.eu",
+ "shortName": "cyb",
+ "chainId": 1146703430,
+ "networkId": 1146703430,
+ "icon": "cyberdeck",
+ "status": "active",
+ "explorers": [
+ {
+ "name": "CybEthExplorer",
+ "url": "http://cybeth1.cyberdeck.eu:8000",
+ "icon": "cyberdeck",
+ "standard": "none"
+ }
+ ]
+ },
+ {
+ "name": "HUMAN Protocol",
+ "title": "HUMAN Protocol",
+ "chain": "wan-red-ain",
+ "rpc": ["https://mainnet.skalenodes.com/v1/wan-red-ain"],
+ "faucets": ["https://dashboard.humanprotocol.org/faucet"],
+ "nativeCurrency": { "name": "sFUEL", "symbol": "sFUEL", "decimals": 18 },
+ "infoURL": "https://www.humanprotocol.org",
+ "shortName": "human-mainnet",
+ "chainId": 1273227453,
+ "networkId": 1273227453,
+ "explorers": [
+ {
+ "name": "Blockscout",
+ "url": "https://wan-red-ain.explorer.mainnet.skalenodes.com",
+ "icon": "human",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Aurora Mainnet",
"chain": "NEAR",
@@ -14761,6 +17057,49 @@
"chainId": 1313161556,
"networkId": 1313161556
},
+ {
+ "name": "Chaos (SKALE Testnet)",
+ "title": "Chaos Testnet",
+ "chain": "staging-fast-active-bellatrix",
+ "rpc": [
+ "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"
+ ],
+ "faucets": ["https://sfuel.skale.network/staging/chaos"],
+ "nativeCurrency": { "name": "sFUEL", "symbol": "sFUEL", "decimals": 18 },
+ "infoURL": "https://docs.skale.network/develop/",
+ "shortName": "chaos-tenet",
+ "chainId": 1351057110,
+ "networkId": 1351057110,
+ "explorers": [
+ {
+ "name": "Blockscout",
+ "url": "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com",
+ "icon": "chaos",
+ "standard": "EIP3091"
+ }
+ ]
+ },
+ {
+ "name": "RaptorChain",
+ "chain": "RPTR",
+ "rpc": ["https://rpc.raptorchain.io/web3"],
+ "faucets": [],
+ "nativeCurrency": { "name": "Raptor", "symbol": "RPTR", "decimals": 18 },
+ "features": [{ "name": "EIP155" }],
+ "infoURL": "https://raptorchain.io",
+ "shortName": "rptr",
+ "chainId": 1380996178,
+ "networkId": 1380996178,
+ "icon": "raptorchain",
+ "explorers": [
+ {
+ "name": "RaptorChain Explorer",
+ "url": "https://explorer.raptorchain.io",
+ "icon": "raptorchain_explorer",
+ "standard": "EIP3091"
+ }
+ ]
+ },
{
"name": "Nebula Mainnet",
"chain": "green-giddy-denebola",
@@ -15006,6 +17345,7 @@
{
"name": "Palm Testnet",
"chain": "Palm",
+ "icon": "palm",
"rpc": ["https://palm-testnet.infura.io/v3/${INFURA_API_KEY}"],
"faucets": [],
"nativeCurrency": { "name": "PALM", "symbol": "PALM", "decimals": 18 },
@@ -15024,6 +17364,7 @@
{
"name": "Palm",
"chain": "Palm",
+ "icon": "palm",
"rpc": ["https://palm-mainnet.infura.io/v3/${INFURA_API_KEY}"],
"faucets": [],
"nativeCurrency": { "name": "PALM", "symbol": "PALM", "decimals": 18 },
From 79d05f7dbce6110bf4d074e000aeef563722dacb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Wed, 26 Apr 2023 15:47:49 +0200
Subject: [PATCH 15/48] Verification with Standard JSON Input (#980)
* Refactor UI for shared SerchSelect,init json endp.
Refactor SearchSelect's onChange function and its types to be able to
reuse SearchSelect consistently.
Initial naive implementation of using solcJson as input in session
* Don't use deprecated btoa function
* Don't overflow Error message UI
* Use nightlies toggle, style json input
* Don't validate solc JSON file extension
To allow multipart/form-data requests
* Add solc-json session tests
* Change import solc json icon
* Solc-json non-session endpoint, tests
* Fix build errors, show json input errors
* Fix compiler version test
* Remove "simulation" variables from solcjson endpts
* Fix copy-paste typo in endpoint definition
* Check solc-json language and contracts output
---
.../lib-sourcify/src/lib/solidityCompiler.ts | 42 ++++-
.../controllers/VerificationController.ts | 153 +++++++++++++++++
test/server.js | 128 +++++++++++++++
.../Storage/StorageJsonInput.json | 32 ++++
ui/src/components/ChainSelect/index.tsx | 35 +---
.../components/GitHubBranchSelect/index.tsx | 35 +---
ui/src/components/Toast/index.tsx | 2 +-
ui/src/components/fuzzySearch.tsx | 17 ++
ui/src/constants.ts | 1 +
.../ChainAddressForm/index.tsx | 8 +-
ui/src/pages/Verifier/ContractInput.tsx | 7 +-
ui/src/pages/Verifier/EtherscanInput.tsx | 7 +-
ui/src/pages/Verifier/FileUpload.tsx | 155 ++++++++++--------
ui/src/pages/Verifier/GitHubInput.tsx | 6 +-
ui/src/pages/Verifier/SolcJsonInput.tsx | 141 ++++++++++++++++
ui/src/pages/Verifier/index.tsx | 1 -
16 files changed, 631 insertions(+), 139 deletions(-)
create mode 100644 test/testcontracts/Storage/StorageJsonInput.json
create mode 100644 ui/src/components/fuzzySearch.tsx
create mode 100644 ui/src/pages/Verifier/SolcJsonInput.tsx
diff --git a/packages/lib-sourcify/src/lib/solidityCompiler.ts b/packages/lib-sourcify/src/lib/solidityCompiler.ts
index 1ebc8a0ed..7d3bb77b9 100644
--- a/packages/lib-sourcify/src/lib/solidityCompiler.ts
+++ b/packages/lib-sourcify/src/lib/solidityCompiler.ts
@@ -4,7 +4,7 @@ import fs from 'fs';
import { spawnSync } from 'child_process';
import { fetchWithTimeout } from './utils';
import { StatusCodes } from 'http-status-codes';
-import { JsonInput } from './types';
+import { JsonInput, PathBuffer } from './types';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const solc = require('solc');
@@ -100,6 +100,46 @@ export async function useCompiler(version: string, solcJsonInput: JsonInput) {
return compiledJSON;
}
+export async function getAllMetadataAndSourcesFromSolcJson(
+ solcJson: JsonInput,
+ compilerVersion: string
+): Promise {
+ if (solcJson.language !== 'Solidity')
+ throw new Error(
+ 'Only Solidity is supported, the json has language: ' + solcJson.language
+ );
+ const outputSelection = {
+ '*': {
+ '*': ['metadata'],
+ },
+ };
+ if (!solcJson.settings) {
+ solcJson.settings = {
+ outputSelection: outputSelection,
+ };
+ }
+ solcJson.settings.outputSelection = outputSelection;
+ const compiled = await useCompiler(compilerVersion, solcJson);
+ const metadataAndSources: PathBuffer[] = [];
+ if (!compiled.contracts)
+ throw new Error('No contracts found in the compiled json output');
+ for (const contractPath in compiled.contracts) {
+ for (const contract in compiled.contracts[contractPath]) {
+ const metadata = compiled.contracts[contractPath][contract].metadata;
+ const metadataPath = `${contractPath}-metadata.json`;
+ metadataAndSources.push({
+ path: metadataPath,
+ buffer: Buffer.from(metadata),
+ });
+ metadataAndSources.push({
+ path: `${contractPath}`,
+ buffer: Buffer.from(solcJson.sources[contractPath].content as string),
+ });
+ }
+ }
+ return metadataAndSources;
+}
+
// TODO: Handle where and how solc is saved
export async function getSolcExecutable(
platform: string,
diff --git a/src/server/controllers/VerificationController.ts b/src/server/controllers/VerificationController.ts
index 6013a5ce7..706e41433 100644
--- a/src/server/controllers/VerificationController.ts
+++ b/src/server/controllers/VerificationController.ts
@@ -12,6 +12,7 @@ import {
getIpfsGateway,
performFetch,
verifyCreate2,
+ getAllMetadataAndSourcesFromSolcJson,
} from "@ethereum-sourcify/lib-sourcify";
import { decode as bytecodeDecode } from "@ethereum-sourcify/bytecode-utils";
import VerificationService from "../services/VerificationService";
@@ -197,6 +198,109 @@ export default class VerificationController
res.send(getSessionJSON(session));
};
+ private addInputSolcJsonEndpoint = async (req: Request, res: Response) => {
+ validateRequest(req);
+ const inputFiles = extractFiles(req, true);
+ if (!inputFiles)
+ throw new ValidationError([{ param: "files", msg: "No files found" }]);
+
+ const compilerVersion = req.body.compilerVersion;
+
+ for (const inputFile of inputFiles) {
+ let solcJson;
+ try {
+ solcJson = JSON.parse(inputFile.buffer.toString());
+ } catch (error: any) {
+ throw new BadRequestError(
+ `Couldn't parse JSON ${inputFile.path}. Make sure the contents of the file are syntaxed correctly.`
+ );
+ }
+
+ const metadataAndSources = await getAllMetadataAndSourcesFromSolcJson(
+ solcJson,
+ compilerVersion
+ );
+ const metadataAndSourcesPathContents: PathContent[] =
+ metadataAndSources.map((pb) => {
+ return { path: pb.path, content: pb.buffer.toString(FILE_ENCODING) };
+ });
+
+ const session = req.session;
+ const newFilesCount = saveFiles(metadataAndSourcesPathContents, session);
+ if (newFilesCount) {
+ await checkContractsInSession(session);
+ }
+ res.send(getSessionJSON(session));
+ }
+ };
+
+ private verifySolcJsonEndpoint = async (req: Request, res: Response) => {
+ validateRequest(req);
+ const inputFiles = extractFiles(req, true);
+ if (!inputFiles)
+ throw new ValidationError([{ param: "files", msg: "No files found" }]);
+ if (inputFiles.length !== 1)
+ throw new BadRequestError(
+ "Only one Solidity JSON Input file at a time is allowed"
+ );
+
+ let solcJson;
+ try {
+ solcJson = JSON.parse(inputFiles[0].buffer.toString());
+ } catch (error: any) {
+ throw new BadRequestError(
+ `Couldn't parse JSON ${inputFiles[0].path}. Make sure the contents of the file are syntaxed correctly.`
+ );
+ }
+ const compilerVersion = req.body.compilerVersion;
+ const contractName = req.body.contractName;
+ const chain = req.body.chain;
+ const address = req.body.address;
+
+ const metadataAndSourcesPathBuffers =
+ await getAllMetadataAndSourcesFromSolcJson(solcJson, compilerVersion);
+
+ const checkedContracts = await checkFiles(metadataAndSourcesPathBuffers);
+ const contractToVerify = checkedContracts.find(
+ (c) => c.name === contractName
+ );
+ if (!contractToVerify) {
+ throw new BadRequestError(
+ `Couldn't find contract ${contractName} in the provided Solidity JSON Input file.`
+ );
+ }
+
+ const match = await this.verificationService.verifyDeployed(
+ contractToVerify,
+ chain,
+ address,
+ // req.body.contextVariables,
+ req.body.creatorTxHash
+ );
+ // Send to verification again with all source files.
+ if (match.status === "extra-file-input-bug") {
+ const contractWithAllSources = await useAllSources(
+ contractToVerify,
+ metadataAndSourcesPathBuffers
+ );
+ const tempMatch = await this.verificationService.verifyDeployed(
+ contractWithAllSources,
+ chain,
+ address, // Due to the old API taking an array of addresses.
+ // req.body.contextVariables,
+ req.body.creatorTxHash
+ );
+ if (tempMatch.status === "perfect") {
+ await this.repositoryService.storeMatch(contractToVerify, tempMatch);
+ return res.send({ result: [tempMatch] });
+ }
+ }
+ if (match.status) {
+ await this.repositoryService.storeMatch(contractToVerify, match);
+ }
+ return res.send({ result: [match] }); // array is an old expected behavior (e.g. by frontend)
+ };
+
private restartSessionEndpoint = async (req: Request, res: Response) => {
req.session.destroy((error: Error) => {
let msg = "";
@@ -588,6 +692,48 @@ export default class VerificationController
this.safeHandler(this.legacyVerifyEndpoint)
);
+ this.router.route(["/verify/solc-json"]).post(
+ body("address")
+ .exists()
+ .bail()
+ .custom(
+ (address, { req }) => (req.addresses = validateAddresses(address))
+ ),
+ body("chain")
+ .exists()
+ .bail()
+ .custom((chain, { req }) => (req.chain = checkChainId(chain))),
+ body("compilerVersion").exists().bail(),
+ body("contractName").exists().bail(),
+ // body("contextVariables.msgSender").optional(),
+ // body("contextVariables.abiEncodedConstructorArguments").optional(),
+ // Handle non-json multipart/form-data requests.
+ // body("abiEncodedConstructorArguments")
+ // .optional()
+ // .custom(
+ // (abiEncodedConstructorArguments, { req }) =>
+ // (req.body.contextVariables = {
+ // abiEncodedConstructorArguments,
+ // ...req.body.contextVariables,
+ // })
+ // ),
+ // body("msgSender")
+ // .optional()
+ // .custom(
+ // (msgSender, { req }) =>
+ // (req.body.contextVariables = {
+ // msgSender,
+ // ...req.body.contextVariables,
+ // })
+ // ),
+ body("creatorTxHash")
+ .optional()
+ .custom(
+ (creatorTxHash, { req }) => (req.body.creatorTxHash = creatorTxHash)
+ ),
+ this.safeHandler(this.verifySolcJsonEndpoint)
+ );
+
// Session APIs with session cookies require non "*" CORS
this.router
.route(["/session-data", "/session/data"])
@@ -597,6 +743,13 @@ export default class VerificationController
.route(["/input-files", "/session/input-files"])
.post(this.safeHandler(this.addInputFilesEndpoint));
+ this.router
+ .route(["/session/input-solc-json"])
+ .post(
+ body("compilerVersion").exists().bail(),
+ this.safeHandler(this.addInputSolcJsonEndpoint)
+ );
+
this.router
.route(["/session/input-contract"])
.post(this.safeHandler(this.addInputContractEndpoint));
diff --git a/test/server.js b/test/server.js
index 441e9feda..c14235cdf 100644
--- a/test/server.js
+++ b/test/server.js
@@ -753,6 +753,84 @@ describe("Server", function () {
chai.expect(isExist, "Immutable references not saved").to.be.true;
});
+ it("should return validation error for adding standard input JSON without a compiler version", async () => {
+ const address = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ artifact.abi, // Storage.sol
+ artifact.bytecode,
+ accounts[0]
+ );
+ const solcJsonPath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "StorageJsonInput.json"
+ );
+ const solcJsonBuffer = fs.readFileSync(solcJsonPath);
+
+ const res = await chai
+ .request(server.app)
+ .post("/verify/solc-json")
+ .attach("files", solcJsonBuffer)
+ .field("address", address)
+ .field("chain", defaultContractChain)
+ .field("contractName", "Storage");
+
+ assertValidationError(null, res, "compilerVersion");
+ });
+
+ it("should return validation error for adding standard input JSON without a contract name", async () => {
+ const address = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ artifact.abi, // Storage.sol
+ artifact.bytecode,
+ accounts[0]
+ );
+ const solcJsonPath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "StorageJsonInput.json"
+ );
+ const solcJsonBuffer = fs.readFileSync(solcJsonPath);
+
+ const res = await chai
+ .request(server.app)
+ .post("/verify/solc-json")
+ .attach("files", solcJsonBuffer)
+ .field("address", address)
+ .field("chain", defaultContractChain)
+ .field("compilerVersion", "0.8.4+commit.c7e474f2");
+
+ assertValidationError(null, res, "contractName");
+ });
+
+ it("should verify a contract with Solidity standard input JSON", async () => {
+ const address = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ artifact.abi, // Storage.sol
+ artifact.bytecode,
+ accounts[0]
+ );
+ const solcJsonPath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "StorageJsonInput.json"
+ );
+ const solcJsonBuffer = fs.readFileSync(solcJsonPath);
+
+ const res = await chai
+ .request(server.app)
+ .post("/verify/solc-json")
+ .attach("files", solcJsonBuffer)
+ .field("address", address)
+ .field("chain", defaultContractChain)
+ .field("compilerVersion", "0.8.4+commit.c7e474f2")
+ .field("contractName", "Storage");
+
+ assertVerification(null, res, null, address, defaultContractChain);
+ });
describe("hardhat build-info file support", function () {
this.timeout(EXTENDED_TIME);
let address;
@@ -1467,6 +1545,56 @@ describe("Server", function () {
assertSingleContractStatus(res, "perfect");
});
+ it("should return validation error for adding standard input JSON without a compiler version", async () => {
+ const agent = chai.request.agent(server.app);
+
+ const solcJsonPath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "StorageJsonInput.json"
+ );
+ const solcJsonBuffer = fs.readFileSync(solcJsonPath);
+
+ const res = await agent
+ .post("/session/input-solc-json")
+ .attach("files", solcJsonBuffer);
+
+ assertValidationError(null, res, "compilerVersion");
+ });
+
+ it("should verify a contract with Solidity standard input JSON", async () => {
+ const agent = chai.request.agent(server.app);
+ const address = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ artifact.abi, // Storage.sol
+ artifact.bytecode,
+ accounts[0]
+ );
+ const solcJsonPath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "StorageJsonInput.json"
+ );
+ const solcJsonBuffer = fs.readFileSync(solcJsonPath);
+
+ const res = await agent
+ .post("/session/input-solc-json")
+ .field("compilerVersion", "0.8.4+commit.c7e474f2")
+ .attach("files", solcJsonBuffer);
+
+ const contracts = assertSingleContractStatus(res, "error");
+
+ contracts[0].address = address;
+ contracts[0].chainId = defaultContractChain;
+
+ const res2 = await agent
+ .post("/session/verify-validated")
+ .send({ contracts });
+ assertSingleContractStatus(res2, "perfect");
+ });
+
// Test also extra-file-bytecode-mismatch via v2 API as well since the workaround is at the API level i.e. VerificationController
describe("solc v0.6.12 and v0.7.0 extra files in compilation causing metadata match but bytecode mismatch", function () {
// Deploy the test contract locally
diff --git a/test/testcontracts/Storage/StorageJsonInput.json b/test/testcontracts/Storage/StorageJsonInput.json
new file mode 100644
index 000000000..8e84274e4
--- /dev/null
+++ b/test/testcontracts/Storage/StorageJsonInput.json
@@ -0,0 +1,32 @@
+{
+ "settings": {
+ "evmVersion": "istanbul",
+ "libraries": {
+ "": {}
+ },
+ "metadata": {
+ "bytecodeHash": "ipfs"
+ },
+ "optimizer": {
+ "enabled": false,
+ "runs": 200
+ },
+ "remappings": [],
+ "outputSelection": {
+ "*": {
+ "Storage": [
+ "evm.bytecode.object",
+ "evm.deployedBytecode.object",
+ "evm.deployedBytecode.immutableReferences",
+ "metadata"
+ ]
+ }
+ }
+ },
+ "sources": {
+ "project:/contracts/Storage.sol": {
+ "content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Storage\n * @dev Store & retrieve value in a variable\n */\ncontract Storage {\n\n uint256 number;\n\n /**\n * @dev Store value in variable\n * @param num value to store\n */\n function store(uint256 num) public {\n number = num;\n }\n\n /**\n * @dev Return value \n * @return value of 'number'\n */\n function retrieve() public view returns (uint256){\n return number;\n }\n}\n"
+ }
+ },
+ "language": "Solidity"
+}
diff --git a/ui/src/components/ChainSelect/index.tsx b/ui/src/components/ChainSelect/index.tsx
index 23941a1ed..50c2def67 100644
--- a/ui/src/components/ChainSelect/index.tsx
+++ b/ui/src/components/ChainSelect/index.tsx
@@ -1,39 +1,12 @@
-import Fuse from "fuse.js";
import React, { useContext } from "react";
-import SelectSearch, {
- SelectSearchOption,
- SelectSearchProps,
-} from "react-select-search";
import { Context } from "../../Context";
import "./style.css";
+import { fuzzySearch } from "../fuzzySearch";
+import SelectSearch, { SelectSearchProps } from "react-select-search";
-// Fix incorrect value field type of onChange. Should be string and not SelectedOptionValue
-type WithoutOnChange = Omit; // Remove prop
-// Add correct onChange prop type
-type ModifiedSelectSearchProps = WithoutOnChange & {
- onChange: (value: number) => void;
-};
-// Typecast. Don't cast with "SelectSearch as unknown as FC" to not lose the types other than onChange.
-const CustomSelectSearch =
- SelectSearch as React.FC as React.FC;
-
-function fuzzySearch(options: SelectSearchOption[]) {
- const fuse = new Fuse(options, {
- keys: ["name", "groupName", "items.name"],
- threshold: 0.6,
- });
- return (value: string) => {
- if (!value.length) {
- return options;
- }
- return fuse
- .search(value)
- .map((res: Fuse.FuseResult) => res.item);
- };
-}
type ChainSelectProps = {
value: string | undefined;
- handleChainIdChange: (chainId: number) => void;
+ handleChainIdChange: SelectSearchProps["onChange"];
id?: string;
availableChains?: number[];
};
@@ -56,7 +29,7 @@ export default function ChainSelect({
}
return (
- ({
diff --git a/ui/src/components/GitHubBranchSelect/index.tsx b/ui/src/components/GitHubBranchSelect/index.tsx
index 10062c3d9..3575ed097 100644
--- a/ui/src/components/GitHubBranchSelect/index.tsx
+++ b/ui/src/components/GitHubBranchSelect/index.tsx
@@ -1,39 +1,12 @@
-import Fuse from "fuse.js";
import React, { useEffect, useState } from "react";
-import SelectSearch, {
- SelectSearchOption,
- SelectSearchProps,
-} from "react-select-search";
+import SelectSearch, { SelectSearchProps } from "react-select-search";
import "./style.css";
+import { fuzzySearch } from "../fuzzySearch";
-// Fix incorrect value field type of onChange. Should be string and not SelectedOptionValue
-type WithoutOnChange = Omit; // Remove prop
-// Add correct onChange prop type
-type ModifiedSelectSearchProps = WithoutOnChange & {
- onChange: (value: string) => void;
-};
-// Typecast. Don't cast with "SelectSearch as unknown as FC" to not lose the types other than onChange.
-const CustomSelectSearch =
- SelectSearch as React.FC as React.FC;
-
-function fuzzySearch(options: SelectSearchOption[]) {
- const fuse = new Fuse(options, {
- keys: ["name", "groupName", "items.name"],
- threshold: 0.6,
- });
- return (value: string) => {
- if (!value.length) {
- return options;
- }
- return fuse
- .search(value)
- .map((res: Fuse.FuseResult) => res.item);
- };
-}
type GitHubBranchSelectProps = {
repository: string;
value: string | undefined;
- handleBranchChange: (branch: string) => void;
+ handleBranchChange: SelectSearchProps["onChange"];
handleBranchesLoaded: (error?: GitHubBranchSelectError) => void;
id?: string;
};
@@ -86,7 +59,7 @@ export default function GitHubBranchSelect({
}, [repository, handleBranchesLoaded]);
return (
- ({
diff --git a/ui/src/components/Toast/index.tsx b/ui/src/components/Toast/index.tsx
index 08f957f61..b3970e330 100644
--- a/ui/src/components/Toast/index.tsx
+++ b/ui/src/components/Toast/index.tsx
@@ -33,7 +33,7 @@ const Toast = ({ message, isShown, dismiss }: ToastProps) => {
-
diff --git a/ui/src/components/fuzzySearch.tsx b/ui/src/components/fuzzySearch.tsx
new file mode 100644
index 000000000..c0a5c993a
--- /dev/null
+++ b/ui/src/components/fuzzySearch.tsx
@@ -0,0 +1,17 @@
+import Fuse from "fuse.js";
+import { SelectSearchOption } from "react-select-search";
+
+export function fuzzySearch(options: SelectSearchOption[]) {
+ const fuse = new Fuse(options, {
+ keys: ["name", "groupName", "items.name"],
+ threshold: 0.6,
+ });
+ return (value: string) => {
+ if (!value.length) {
+ return options;
+ }
+ return fuse
+ .search(value)
+ .map((res: Fuse.FuseResult) => res.item);
+ };
+}
diff --git a/ui/src/constants.ts b/ui/src/constants.ts
index 513e27ae3..98f9ff34b 100644
--- a/ui/src/constants.ts
+++ b/ui/src/constants.ts
@@ -15,6 +15,7 @@ export const SOLIDITY_ETHEREUM_URL = `https://solidity.ethereum.org/2020/06/25/s
// SESSION API
export const SESSION_DATA_URL = `${SERVER_URL}/session/data`;
export const ADD_FILES_URL = `${SERVER_URL}/session/input-files`;
+export const ADD_SOLC_JSON_URL = `${SERVER_URL}/session/input-solc-json`;
export const ADD_FILES_FROM_CONTRACT_URL = `${SERVER_URL}/session/input-contract`;
export const VERIFY_VALIDATED_URL = `${SERVER_URL}/session/verify-validated`;
export const VERIFY_FROM_ETHERSCAN = `${SERVER_URL}/session/verify/etherscan`;
diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
index f9865052e..c78a4e2a1 100644
--- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
+++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/index.tsx
@@ -21,6 +21,7 @@ import { checkAllByAddresses } from "../../../../../utils/api";
import Message from "./Message";
import { HiChevronDown } from "react-icons/hi";
import ReactTooltip from "react-tooltip";
+import { SelectedOptionValue } from "react-select-search";
/* import Constructorarguments from "../../../../../components/ConstructorArguments";
import InputToggle from "../../../../../components/InputToggle"; */
@@ -94,11 +95,12 @@ const ChainAddressForm = ({
});
};
- const handleChainIdChange = (newChainId: number) => {
- const newChainIdStr = newChainId.toString();
+ const handleChainIdChange = (
+ selectedOptionValue: SelectedOptionValue | SelectedOptionValue[]
+ ) => {
+ const newChainIdStr = `${selectedOptionValue as SelectedOptionValue}`;
setChainId(newChainIdStr);
verifyButtonRef.current?.focus();
- console.log(`New id is: ${newChainId}`);
};
/* const handleMsgSenderChange: ChangeEventHandler = (e) => {
diff --git a/ui/src/pages/Verifier/ContractInput.tsx b/ui/src/pages/Verifier/ContractInput.tsx
index 35b5d5fc4..38c7627fe 100644
--- a/ui/src/pages/Verifier/ContractInput.tsx
+++ b/ui/src/pages/Verifier/ContractInput.tsx
@@ -3,6 +3,7 @@ import Input from "../../components/Input";
import ChainSelect from "../../components/ChainSelect";
import { ADD_FILES_FROM_CONTRACT_URL } from "../../constants";
import { SessionResponse } from "../../types";
+import { SelectedOptionValue } from "react-select-search";
type EtherscanInputProps = {
fetchAndUpdate: (
@@ -29,8 +30,10 @@ const ContractInput = ({
if (!e.target.value) return setError("");
};
- const handleChainIdChange = (id: number) => {
- const chainId = `${id}`;
+ const handleChainIdChange = (
+ selectedOptionValue: SelectedOptionValue | SelectedOptionValue[]
+ ) => {
+ const chainId = `${selectedOptionValue as SelectedOptionValue}`;
setChainId(chainId);
if (chainId) return setError("");
};
diff --git a/ui/src/pages/Verifier/EtherscanInput.tsx b/ui/src/pages/Verifier/EtherscanInput.tsx
index 8bb8d8e04..53174d96c 100644
--- a/ui/src/pages/Verifier/EtherscanInput.tsx
+++ b/ui/src/pages/Verifier/EtherscanInput.tsx
@@ -5,6 +5,7 @@ import { VERIFY_FROM_ETHERSCAN } from "../../constants";
import { SessionResponse } from "../../types";
import { Context } from "../../Context";
import { isAddress } from "@ethersproject/address";
+import { SelectSearchProps, SelectedOptionValue } from "react-select-search";
type EtherscanInputProps = {
fetchAndUpdate: (
@@ -37,8 +38,10 @@ const EtherscanInput = ({
if (!e.target.value) return setError(""); // reset error
};
- const handleChainIdChange = (id: number) => {
- const chainId = `${id}`;
+ const handleChainIdChange: SelectSearchProps["onChange"] = (
+ selectedValue
+ ) => {
+ const chainId = `${selectedValue as SelectedOptionValue}`;
setChainId(chainId);
};
diff --git a/ui/src/pages/Verifier/FileUpload.tsx b/ui/src/pages/Verifier/FileUpload.tsx
index 3771171d8..2bdcf8e89 100644
--- a/ui/src/pages/Verifier/FileUpload.tsx
+++ b/ui/src/pages/Verifier/FileUpload.tsx
@@ -2,6 +2,7 @@ import React, { useState } from "react";
import { useDropzone } from "react-dropzone";
import { AiFillFileAdd, AiOutlineGithub, AiOutlinePlus } from "react-icons/ai";
import { FaEthereum } from "react-icons/fa";
+import { SiSolidity } from "react-icons/si";
import { HiOutlineExclamation } from "react-icons/hi";
import Button from "../../components/Button";
import LoadingOverlay from "../../components/LoadingOverlay";
@@ -11,6 +12,7 @@ import EtherscanInput from "./EtherscanInput";
import RemoteInput from "./RemoteInput";
import GitHubInput from "./GitHubInput";
import ContractInput from "./ContractInput";
+import SolcJsonInput from "./SolcJsonInput";
enum ImportMethods {
UPLOAD,
@@ -18,6 +20,7 @@ enum ImportMethods {
ETHERSCAN,
GITHUB,
CONTRACT,
+ SOLIDITY_JSON,
}
type FileUploadProps = {
@@ -75,72 +78,78 @@ const FileUpload: React.FC = ({
-
-
selectImportMethod(ImportMethods.REMOTE)}
- className="text-sm"
- >
- <>
-
- Import from remote
- >
-
-
-
- selectImportMethod(ImportMethods.ETHERSCAN)}
- className="text-sm"
- >
- <>
-
- Import from Etherscan
- >
-
-
-
-
selectImportMethod(ImportMethods.GITHUB)}
- className="text-sm"
- >
- <>
-
- Import from GitHub
- >
-
-
-
- selectImportMethod(ImportMethods.CONTRACT)}
- className="text-sm"
- >
- <>
-
- Import from Contract
- >
-
-
+
selectImportMethod(ImportMethods.REMOTE)}
+ className="text-sm"
+ >
+ <>
+
+ Import from remote
+ >
+
+
selectImportMethod(ImportMethods.ETHERSCAN)}
+ className="text-sm"
+ >
+ <>
+
+ Import from Etherscan
+ >
+
+
selectImportMethod(ImportMethods.GITHUB)}
+ className="text-sm"
+ >
+ <>
+
+ Import from GitHub
+ >
+
+
selectImportMethod(ImportMethods.CONTRACT)}
+ className="text-sm"
+ >
+ <>
+
+ Import from Contract
+ >
+
+
selectImportMethod(ImportMethods.SOLIDITY_JSON)}
+ className="text-sm"
+ >
+ <>
+
+ Import from Solidity JSON
+ >
+
{importMethodSelected === ImportMethods.REMOTE && (
@@ -198,6 +207,20 @@ const FileUpload: React.FC = ({
)}
+ {importMethodSelected === ImportMethods.SOLIDITY_JSON && (
+
+
+ Import contracts from Solidity's Standard JSON Input
+
+
+
+
+
+ )}
{
diff --git a/ui/src/pages/Verifier/GitHubInput.tsx b/ui/src/pages/Verifier/GitHubInput.tsx
index 1a6c42243..cec32d8e0 100644
--- a/ui/src/pages/Verifier/GitHubInput.tsx
+++ b/ui/src/pages/Verifier/GitHubInput.tsx
@@ -5,6 +5,7 @@ import GitHubBranchSelect, {
import Input from "../../components/Input";
import { ADD_FILES_URL } from "../../constants";
import { SessionResponse } from "../../types";
+import { SelectSearchProps, SelectedOptionValue } from "react-select-search";
let timeoutId: any;
@@ -75,7 +76,10 @@ const GitHubInput = ({
}, 600)();
};
- const handleBranchChange = (id: string) => {
+ const handleBranchChange: SelectSearchProps["onChange"] = (
+ selectedOptionValue
+ ) => {
+ const id = `${selectedOptionValue as SelectedOptionValue}`;
setBranch(id);
generateUrlAndSubmit(id);
if (!id) return setError("");
diff --git a/ui/src/pages/Verifier/SolcJsonInput.tsx b/ui/src/pages/Verifier/SolcJsonInput.tsx
new file mode 100644
index 000000000..f3a34e72f
--- /dev/null
+++ b/ui/src/pages/Verifier/SolcJsonInput.tsx
@@ -0,0 +1,141 @@
+import { useState, useEffect } from "react";
+import { ADD_SOLC_JSON_URL } from "../../constants";
+import { SessionResponse } from "../../types";
+import SelectSearch, {
+ SelectSearchProps,
+ SelectedOptionValue,
+} from "react-select-search";
+import { fuzzySearch } from "react-select-search";
+import InputToggle from "../../components/InputToggle";
+
+const SOLC_VERSIONS_LIST_URL =
+ "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/list.txt";
+
+type SolcJsonInputProps = {
+ fetchAndUpdate: (
+ URL: string,
+ fetchOptions?: RequestInit
+ ) => Promise;
+ setIsLoading: React.Dispatch>;
+ isLoading: boolean;
+};
+const SolcJsonInput = ({
+ fetchAndUpdate,
+ setIsLoading,
+ isLoading,
+}: SolcJsonInputProps) => {
+ const [chosenCompilerVersion, setChosenCompilerVersion] =
+ useState("");
+ const [error, setError] = useState("");
+ const [officialCompilerVersionsList, setOfficialCompilerVersionsList] =
+ useState();
+ const [allCompilerVersionsList, setAllCompilerVersionsList] =
+ useState();
+ const [useNightlies, setUseNightlies] = useState(false);
+ const [selectedFile, setSelectedFile] = useState(null);
+
+ const handleCompilerVersionChange: SelectSearchProps["onChange"] = (
+ selectedOptionValue
+ ) => {
+ const selectedCompilerVersion = `${
+ selectedOptionValue as SelectedOptionValue
+ }`;
+ setChosenCompilerVersion(selectedCompilerVersion);
+ };
+
+ const formatVersionName = (version: string) => {
+ return version.replace("soljson-", "").replace(".js", "");
+ };
+
+ useEffect(() => {
+ if (!chosenCompilerVersion) {
+ return setError("Please select a compiler version");
+ }
+ if (!selectedFile) {
+ return setError("Please select a file");
+ }
+ setIsLoading(true);
+ const formData = new FormData();
+ formData.append("files", selectedFile);
+ formData.append("compilerVersion", chosenCompilerVersion);
+
+ fetchAndUpdate(ADD_SOLC_JSON_URL, {
+ method: "POST",
+ body: formData,
+ }).finally(() => {
+ setIsLoading(false);
+ setError("");
+ });
+ }, [chosenCompilerVersion, selectedFile, setIsLoading, fetchAndUpdate]);
+
+ useEffect(() => {
+ setIsLoading(true);
+ fetch(SOLC_VERSIONS_LIST_URL)
+ .then((response) => response.text())
+ .then(async (text) => {
+ const allVersionsList = text
+ .split("\n")
+ .map((line) => formatVersionName(line)); // strip solc- and .js parts
+ setAllCompilerVersionsList(allVersionsList);
+ setOfficialCompilerVersionsList(
+ allVersionsList.filter((version) => !version.includes("nightly"))
+ );
+ setIsLoading(false);
+ })
+ .catch((error) => {
+ console.error(error);
+ setIsLoading(false);
+ setError("Failed to fetch compiler versions");
+ });
+ }, [setIsLoading]);
+
+ const returnCompilerOptions = (): { name: string; value: string }[] => {
+ if (useNightlies) {
+ if (!allCompilerVersionsList) {
+ return [];
+ }
+ return allCompilerVersionsList.map((version) => ({
+ name: version,
+ value: version,
+ }));
+ } else {
+ if (!officialCompilerVersionsList) {
+ return [];
+ }
+ return officialCompilerVersionsList.map((version) => ({
+ name: version,
+ value: version,
+ }));
+ }
+ };
+
+ const handleFileChange = (event: React.ChangeEvent) => {
+ const file = event.target.files?.[0];
+ setSelectedFile(file || null);
+ };
+
+ return (
+
+ );
+};
+
+export default SolcJsonInput;
diff --git a/ui/src/pages/Verifier/index.tsx b/ui/src/pages/Verifier/index.tsx
index 38a371410..90b8c7fa9 100644
--- a/ui/src/pages/Verifier/index.tsx
+++ b/ui/src/pages/Verifier/index.tsx
@@ -42,7 +42,6 @@ const Verifier: React.FC = () => {
// mode: "cors",
...fetchOptions,
});
- console.log(rawRes);
if (!rawRes.ok) {
const err: IGenericError = await rawRes.json();
From 18c48f08ae789a3fcf3f41a54dd362643b673d37 Mon Sep 17 00:00:00 2001
From: aidan-starke
Date: Thu, 27 Apr 2023 11:12:31 +1200
Subject: [PATCH 16/48] Add chain 7668 - The Root Network Mainnet
---
src/sourcify-chains.ts | 7 +++++++
test/chains/chain-tests.js | 18 ++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index b90de1ca4..fd5df0c06 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -711,6 +711,13 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
monitored: false,
txRegex: ETHERSCAN_REGEX,
},
+ "7668": {
+ // The Root Network Mainnet
+ supported: true,
+ monitored: false,
+ contractFetchAddress: "https://explorer.rootnet.live/" + ETHERSCAN_SUFFIX,
+ txRegex: ETHERSCAN_REGEX,
+ },
};
const sourcifyChainsMap: SourcifyChainMap = {};
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index c661eb5e1..3844a0814 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1391,6 +1391,24 @@ describe("Test Supported Chains", function () {
"shared/withImmutables.metadata.json"
);
+ // The Root Network Mainnet
+ verifyContract(
+ "0x6C0cE8d62F1D81464F6F4DecB62f97aa83B8Df89",
+ "7668",
+ "The Root Network Mainnet",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+ verifyContractWithImmutables(
+ "0x29b64a70B25befd49d929F796E10DEe03ab7CA5D",
+ "7668",
+ "The Root Network Mainnet",
+ ["uint256"],
+ [7668],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
+
//////////////////////
// Helper functions //
//////////////////////
From 2c54874db5ddbc48692bad76a9be7381557b2b91 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 09:52:37 +0200
Subject: [PATCH 17/48] #860 add the previously removed deprecated chains
---
src/sourcify-chains.ts | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index fd5df0c06..ab6196c53 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -718,6 +718,35 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
contractFetchAddress: "https://explorer.rootnet.live/" + ETHERSCAN_SUFFIX,
txRegex: ETHERSCAN_REGEX,
},
+ "421611": {
+ // Arbitrum Rinkeby Testnet
+ supported: false,
+ monitored: false,
+ graphQLFetchAddress: "https://rinkeby-indexer.arbitrum.io/graphql",
+ rpc: buildAlchemyAndCustomRpcURLs("rinkeby", "arb"),
+ },
+ "69": {
+ supported: false,
+ monitored: false,
+ contractFetchAddress:
+ "https://kovan-optimistic.etherscan.io/" + ETHERSCAN_SUFFIX,
+ txRegex: ETHERSCAN_REGEX,
+ rpc: buildAlchemyAndCustomRpcURLs("kovan", "opt"),
+ },
+ "42": {
+ supported: false,
+ monitored: false,
+ contractFetchAddress: "https://kovan.etherscan.io/" + ETHERSCAN_SUFFIX,
+ rpc: buildAlchemyAndCustomRpcURLs("kovan", "eth"),
+ txRegex: ETHERSCAN_REGEX,
+ },
+ "3": {
+ supported: false,
+ monitored: false,
+ contractFetchAddress: "https://ropsten.etherscan.io/" + ETHERSCAN_SUFFIX,
+ rpc: buildAlchemyAndCustomRpcURLs("ropsten", "eth"),
+ txRegex: ETHERSCAN_REGEX,
+ },
};
const sourcifyChainsMap: SourcifyChainMap = {};
@@ -784,8 +813,8 @@ export function getSortedChainsArray(
getPrimarySortKey(a) > getPrimarySortKey(b)
? 1
: getPrimarySortKey(b) > getPrimarySortKey(a)
- ? -1
- : 0
+ ? -1
+ : 0
);
const sortedChains = etherumChains.concat(otherChains);
From 3cf5a86300c9968014657b59dff50c2fe2020a40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Thu, 27 Apr 2023 10:15:53 +0200
Subject: [PATCH 18/48] Break contract address str in already verified msg
---
.../CheckedContract/ChainAddressForm/Message.tsx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/Message.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/Message.tsx
index 2d9e8f674..5dbc6445c 100644
--- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/Message.tsx
+++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/ChainAddressForm/Message.tsx
@@ -51,7 +51,8 @@ const RepoLinks = ({
>
{overrideLabel ||
sourcifyChainMap[parseInt(chainId)].title ||
- sourcifyChainMap[parseInt(chainId)].name}
+ sourcifyChainMap[parseInt(chainId)].name}{" "}
+ (#{chainId})
);
@@ -147,7 +148,7 @@ const Message = ({
-
+
Contract {foundMatches.address} is already verified:
{perfectMatchChainIds.length > 0 && (
From 70e13de37a64fc2b0eea4a1cee7fce7bc72265e1 Mon Sep 17 00:00:00 2001
From: Aidan Starke <52016903+aidan-starke@users.noreply.github.com>
Date: Thu, 27 Apr 2023 20:34:16 +1200
Subject: [PATCH 19/48] Add chain 7672 (#988)
* Update chains
* Add chain 7672
* Test contracts for chain 7672
* Redeploy immutable contract with correct compiler
* Revert "Update chains"
This reverts commit 77ea8de307f9747f272784669d294d651d4a1c6a.
* Redeploy Immutable contract
---
src/sourcify-chains.ts | 7 +++++++
test/chains/chain-tests.js | 19 ++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index ab6196c53..708c099aa 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -718,6 +718,13 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
contractFetchAddress: "https://explorer.rootnet.live/" + ETHERSCAN_SUFFIX,
txRegex: ETHERSCAN_REGEX,
},
+ "7672": {
+ // The Root Network Porcini (Testnet)
+ supported: true,
+ monitored: false,
+ contractFetchAddress: "https://explorer.rootnet.cloud/" + ETHERSCAN_SUFFIX,
+ txRegex: ETHERSCAN_REGEX,
+ },
"421611": {
// Arbitrum Rinkeby Testnet
supported: false,
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index 3844a0814..755fa0835 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1380,7 +1380,6 @@ describe("Test Supported Chains", function () {
["shared/1_Storage.sol"],
"shared/1_Storage.metadata.json"
);
-
verifyContractWithImmutables(
"0x0E23Ac3B13094CDe8667C7B2aAC3900781d7b2c1",
"999",
@@ -1408,6 +1407,24 @@ describe("Test Supported Chains", function () {
["shared/WithImmutables.sol"],
"shared/withImmutables.metadata.json"
);
+
+ // The Root Network Porcini (Testnet)
+ verifyContract(
+ "0x225F2cD344c61152F8E7200E62e03dEfD683f2c4",
+ "7672",
+ "The Root Network Porcini",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+ verifyContractWithImmutables(
+ "0x02d491918df0dC0BDB9974b61e2CDBDaB81d1e48",
+ "7672",
+ "The Root Network Porcini",
+ ["uint256"],
+ [7672],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
//////////////////////
// Helper functions //
From 63928831e87818369a5f9acd98b67dcdc01f5b6b Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 10:36:17 +0200
Subject: [PATCH 20/48] Implement a complete Metadata type (#1001)
* #873 implement a complete Metadata type
* #873 * version is a number
* create Userdoc and Devdoc interfaces
---
package-lock.json | 2683 ++++++++---------
package.json | 1 +
packages/lib-sourcify/package-lock.json | 25 +-
packages/lib-sourcify/package.json | 1 +
packages/lib-sourcify/src/lib/types.ts | 84 +-
.../VerificationController-util.ts | 17 +-
6 files changed, 1340 insertions(+), 1471 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index c6980df62..7808bcb8d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,6 +12,7 @@
"@ethereum-sourcify/bytecode-utils": "*",
"@ethereum-sourcify/lib-sourcify": "*",
"@types/node-fetch": "^2.5.7",
+ "abitype": "^0.8.0",
"bunyan": "^1.8.12",
"commander": "^9.0.0",
"cors": "^2.8.5",
@@ -412,6 +413,11 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@chainsafe/as-sha256": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.4.1.tgz",
+ "integrity": "sha512-IqeeGwQihK6Y2EYLFofqs2eY2ep1I2MvQXHzOAI+5iQN51OZlUkrLgyAugu2x86xZewDk5xas7lNczkzFzF62w=="
+ },
"node_modules/@chainsafe/libp2p-noise": {
"version": "4.1.2",
"dev": true,
@@ -433,6 +439,24 @@
"uint8arrays": "^3.0.0"
}
},
+ "node_modules/@chainsafe/persistent-merkle-tree": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.6.1.tgz",
+ "integrity": "sha512-gcENLemRR13+1MED2NeZBMA7FRS0xQPM7L2vhMqvKkjqtFT4YfjSVADq5U0iLuQLhFUJEMVuA8fbv5v+TN6O9A==",
+ "dependencies": {
+ "@chainsafe/as-sha256": "^0.4.1",
+ "@noble/hashes": "^1.3.0"
+ }
+ },
+ "node_modules/@chainsafe/ssz": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.11.1.tgz",
+ "integrity": "sha512-cB8dBkgGN6ZoeOKuk+rIRHKN0L5i9JLGeC0Lui71QX0TuLcQKwgbfkUexpyJxnGFatWf8yeJxlOjozMn/OTP0g==",
+ "dependencies": {
+ "@chainsafe/as-sha256": "^0.4.1",
+ "@chainsafe/persistent-merkle-tree": "^0.6.1"
+ }
+ },
"node_modules/@colors/colors": {
"version": "1.5.0",
"license": "MIT",
@@ -479,6 +503,147 @@
"resolved": "packages/lib-sourcify",
"link": true
},
+ "node_modules/@ethereumjs/block": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-4.2.2.tgz",
+ "integrity": "sha512-kMxjeUwJSuLMwnavok5W17ayMNXXsu3hWsllK33XtZgoqt4ywvGo6ABh+xVEqwq/nn/iKuryCpDYYKEyXeFOlA==",
+ "dependencies": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/block/node_modules/@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "dependencies": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/block/node_modules/@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "dependencies": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "c-kzg": "^1.0.8"
+ },
+ "peerDependenciesMeta": {
+ "c-kzg": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@ethereumjs/block/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/blockchain": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-6.2.2.tgz",
+ "integrity": "sha512-w1Zjskk35hr0qe0Zfwb88qrEFQJNMo73YrsqtJuBap+WamibEsw0rVuN4Ch+o8Dc66An+8rpk5SxEIK7PHF7KQ==",
+ "dependencies": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/ethash": "^2.0.5",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "abstract-level": "^1.0.3",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "level": "^8.0.0",
+ "lru-cache": "^5.1.1",
+ "memory-level": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/blockchain/node_modules/@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "dependencies": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/blockchain/node_modules/@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "dependencies": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "c-kzg": "^1.0.8"
+ },
+ "peerDependenciesMeta": {
+ "c-kzg": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@ethereumjs/blockchain/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/blockchain/node_modules/level": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz",
+ "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==",
+ "dependencies": {
+ "browser-level": "^1.0.1",
+ "classic-level": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/level"
+ }
+ },
"node_modules/@ethereumjs/common": {
"version": "2.5.0",
"license": "MIT",
@@ -487,6 +652,164 @@
"ethereumjs-util": "^7.1.1"
}
},
+ "node_modules/@ethereumjs/ethash": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-2.0.5.tgz",
+ "integrity": "sha512-JIPr39Zd9lULLftyzPGHUQmdziElqNWk0EkO1BAw3yns4TVx+BxCYZOkRQ55fuIFeKcXBupAI9V+7xdvIT2CPw==",
+ "dependencies": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "abstract-level": "^1.0.3",
+ "bigint-crypto-utils": "^3.2.2",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/ethash/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/evm": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/evm/-/evm-1.3.2.tgz",
+ "integrity": "sha512-9PzshkvwO8YBkSD9+vyhJuzM6hxfZlljGnuUbXQlTSGEod7we8BRyzJW53W7nw/WRw5U6wf9Q2fpWypfZFkrbw==",
+ "dependencies": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "@ethersproject/providers": "^5.7.1",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "mcl-wasm": "^0.7.1",
+ "rustbn.js": "~0.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/evm/node_modules/@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "dependencies": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/evm/node_modules/@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "dependencies": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "c-kzg": "^1.0.8"
+ },
+ "peerDependenciesMeta": {
+ "c-kzg": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@ethereumjs/evm/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/rlp": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz",
+ "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==",
+ "bin": {
+ "rlp": "bin/rlp"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/statemanager": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/statemanager/-/statemanager-1.0.5.tgz",
+ "integrity": "sha512-TVkx9Kgc2NtObCzUTTqrpUggNLnftdmxZybzKPd565Bh98FJJB30FrVkWdPwaIV8oB1d9ADtthttfx5Y/kY9gw==",
+ "dependencies": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "ethers": "^5.7.1",
+ "js-sdsl": "^4.1.4"
+ }
+ },
+ "node_modules/@ethereumjs/statemanager/node_modules/@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "dependencies": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/statemanager/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/trie": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/trie/-/trie-5.0.5.tgz",
+ "integrity": "sha512-H3gHtYxJVGfkT4H05LTJfD1W6h9WZYNkfhTUyAYruNZKFitkSHUM/bEFWH/GIhxt5SAkf283F5uJOx7X2Fr6pQ==",
+ "dependencies": {
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "@types/readable-stream": "^2.3.13",
+ "ethereum-cryptography": "^2.0.0",
+ "readable-stream": "^3.6.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/trie/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
"node_modules/@ethereumjs/tx": {
"version": "3.3.2",
"license": "MPL-2.0",
@@ -495,6 +818,97 @@
"ethereumjs-util": "^7.1.2"
}
},
+ "node_modules/@ethereumjs/util": {
+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.0.6.tgz",
+ "integrity": "sha512-zFLG/gXtF3QUC7iKFn4PT6HCr+DEnlCbwUGKGtXoqjA+64T+e0FuqMjlo4bQIY2ngRzk3EtudKdGYC4g31ehhg==",
+ "dependencies": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/rlp": "^4.0.1",
+ "ethereum-cryptography": "^2.0.0",
+ "micro-ftch": "^0.3.1"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/vm": {
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-6.4.2.tgz",
+ "integrity": "sha512-kTzOvJfNpUQHi2a0SbglYNWHIEOg5j3NlN80KU0IrdagWAeaEqz6Jj5XVN5lBs4VAfwXNdf+56xYtMg8Nate7Q==",
+ "dependencies": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/blockchain": "^6.2.2",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/evm": "^1.3.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/statemanager": "^1.0.5",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "mcl-wasm": "^0.7.1",
+ "rustbn.js": "~0.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@ethereumjs/vm/node_modules/@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "dependencies": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "node_modules/@ethereumjs/vm/node_modules/@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "dependencies": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "c-kzg": "^1.0.8"
+ },
+ "peerDependenciesMeta": {
+ "c-kzg": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@ethereumjs/vm/node_modules/ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "dependencies": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
"node_modules/@ethersproject/abi": {
"version": "5.7.0",
"funding": [
@@ -1263,6 +1677,11 @@
"which": "bin/which"
}
},
+ "node_modules/@fairdatasociety/bmt-js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@fairdatasociety/bmt-js/-/bmt-js-2.0.1.tgz",
+ "integrity": "sha512-GyUy+BgJH8cbxbTWcKXDsvBJRNXjFdek9q+4HiMgMP5Fz/1fFxYn9xRdz8tu+evzAVNT57o8BeOVD3zPUoLMfw=="
+ },
"node_modules/@hapi/accept": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz",
@@ -3402,6 +3821,20 @@
"node": ">= 10"
}
},
+ "node_modules/@noble/curves": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.0.0.tgz",
+ "integrity": "sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "@noble/hashes": "1.3.0"
+ }
+ },
"node_modules/@noble/ed25519": {
"version": "1.7.1",
"dev": true,
@@ -3413,6 +3846,17 @@
],
"license": "MIT"
},
+ "node_modules/@noble/hashes": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz",
+ "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ]
+ },
"node_modules/@noble/secp256k1": {
"version": "1.7.1",
"dev": true,
@@ -3949,6 +4393,48 @@
"version": "1.1.0",
"license": "BSD-3-Clause"
},
+ "node_modules/@scure/base": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
+ "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ]
+ },
+ "node_modules/@scure/bip32": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.0.tgz",
+ "integrity": "sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "@noble/curves": "~1.0.0",
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ }
+ },
+ "node_modules/@scure/bip39": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.0.tgz",
+ "integrity": "sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ }
+ },
"node_modules/@sideway/address": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
@@ -4337,6 +4823,20 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/readable-stream": {
+ "version": "2.3.15",
+ "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz",
+ "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==",
+ "dependencies": {
+ "@types/node": "*",
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "node_modules/@types/readable-stream/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
"node_modules/@types/responselike": {
"version": "1.0.0",
"license": "MIT",
@@ -4598,6 +5098,20 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/abitype": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.0.tgz",
+ "integrity": "sha512-QqBuwc2trtaNd/kp4k0dSjVu3OQIYRAB4ww4LCPwfSECXcCGTD3imYovNYNjx0SyN3OHV0XUOzUVwnXP1kLsVQ==",
+ "peerDependencies": {
+ "typescript": ">=4.9.4",
+ "zod": "^3 >=3.19.1"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
"node_modules/abort-controller": {
"version": "3.0.0",
"dev": true,
@@ -4621,6 +5135,31 @@
"version": "1.7.5",
"license": "MIT"
},
+ "node_modules/abstract-level": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
+ "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "catering": "^2.1.0",
+ "is-buffer": "^2.0.5",
+ "level-supports": "^4.0.0",
+ "level-transcoder": "^1.0.1",
+ "module-error": "^1.0.1",
+ "queue-microtask": "^1.2.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/abstract-level/node_modules/level-supports": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
+ "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/abstract-leveldown": {
"version": "7.2.0",
"dev": true,
@@ -5200,6 +5739,14 @@
"dev": true,
"license": "Apache-2.0"
},
+ "node_modules/bigint-crypto-utils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz",
+ "integrity": "sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw==",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/bignumber.js": {
"version": "9.1.1",
"license": "MIT",
@@ -5336,6 +5883,17 @@
"version": "1.1.0",
"license": "MIT"
},
+ "node_modules/browser-level": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz",
+ "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==",
+ "dependencies": {
+ "abstract-level": "^1.0.2",
+ "catering": "^2.1.1",
+ "module-error": "^1.0.2",
+ "run-parallel-limit": "^1.1.0"
+ }
+ },
"node_modules/browser-readablestream-to-it": {
"version": "1.0.3",
"license": "ISC"
@@ -5827,7 +6385,6 @@
},
"node_modules/catering": {
"version": "2.1.1",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -6085,6 +6642,27 @@
"node": ">=0.10.0"
}
},
+ "node_modules/classic-level": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz",
+ "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "abstract-level": "^1.0.2",
+ "catering": "^2.1.0",
+ "module-error": "^1.0.1",
+ "napi-macros": "^2.2.2",
+ "node-gyp-build": "^4.3.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/classic-level/node_modules/napi-macros": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz",
+ "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g=="
+ },
"node_modules/clean-stack": {
"version": "2.2.0",
"dev": true,
@@ -9642,6 +10220,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/functional-red-black-tree": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g=="
+ },
"node_modules/functions-have-names": {
"version": "1.2.3",
"dev": true,
@@ -9733,31 +10316,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/ganache/node_modules/abstract-level": {
- "version": "1.0.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": {
- "version": "4.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/ganache/node_modules/abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -10034,18 +10592,6 @@
"node": ">=10"
}
},
- "node_modules/ganache/node_modules/level-transcoder": {
- "version": "1.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/ganache/node_modules/leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -10084,14 +10630,6 @@
"inBundle": true,
"license": "MIT"
},
- "node_modules/ganache/node_modules/module-error": {
- "version": "1.0.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/ganache/node_modules/napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -12562,7 +13100,6 @@
},
"node_modules/is-buffer": {
"version": "2.0.5",
- "dev": true,
"funding": [
{
"type": "github",
@@ -13529,7 +14066,6 @@
},
"node_modules/js-sdsl": {
"version": "4.2.0",
- "dev": true,
"license": "MIT",
"funding": {
"type": "opencollective",
@@ -13841,6 +14377,18 @@
"node": ">=10"
}
},
+ "node_modules/level-transcoder": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
+ "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "module-error": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/leveldown": {
"version": "6.1.1",
"dev": true,
@@ -14521,7 +15069,6 @@
},
"node_modules/lru-cache": {
"version": "5.1.1",
- "dev": true,
"license": "ISC",
"dependencies": {
"yallist": "^3.0.2"
@@ -14622,6 +15169,14 @@
"node": ">=0.10.0"
}
},
+ "node_modules/mcl-wasm": {
+ "version": "0.7.9",
+ "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz",
+ "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==",
+ "engines": {
+ "node": ">=8.9.0"
+ }
+ },
"node_modules/md5.js": {
"version": "1.3.5",
"license": "MIT",
@@ -14638,6 +15193,19 @@
"node": ">= 0.6"
}
},
+ "node_modules/memory-level": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz",
+ "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==",
+ "dependencies": {
+ "abstract-level": "^1.0.0",
+ "functional-red-black-tree": "^1.0.1",
+ "module-error": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/memorystore": {
"version": "1.6.7",
"license": "MIT",
@@ -14912,6 +15480,11 @@
"node": ">= 0.6"
}
},
+ "node_modules/micro-ftch": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz",
+ "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg=="
+ },
"node_modules/micromatch": {
"version": "4.0.5",
"dev": true,
@@ -15738,6 +16311,14 @@
"node": ">=0.10.0"
}
},
+ "node_modules/module-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
+ "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/moment": {
"version": "2.29.4",
"license": "MIT",
@@ -18737,7 +19318,6 @@
},
"node_modules/queue-microtask": {
"version": "1.2.3",
- "dev": true,
"funding": [
{
"type": "github",
@@ -19396,7 +19976,6 @@
},
"node_modules/run-parallel-limit": {
"version": "1.1.0",
- "dev": true,
"funding": [
{
"type": "github",
@@ -19429,6 +20008,11 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/rustbn.js": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz",
+ "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA=="
+ },
"node_modules/rxjs": {
"version": "6.6.7",
"dev": true,
@@ -21674,7 +22258,6 @@
},
"node_modules/typescript": {
"version": "4.9.4",
- "dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -28837,16 +29420,19 @@
"license": "MIT",
"dependencies": {
"@ethereum-sourcify/bytecode-utils": "*",
- "@ethereumjs/blockchain": "^6.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/evm": "^1.2.3",
- "@ethereumjs/statemanager": "^1.0.2",
- "@ethereumjs/util": "^8.0.3",
- "@ethereumjs/vm": "6.3.0",
+ "@ethereumjs/blockchain": "^6.2.1",
+ "@ethereumjs/common": "^3.1.1",
+ "@ethereumjs/evm": "^1.3.1",
+ "@ethereumjs/statemanager": "^1.0.4",
+ "@ethereumjs/util": "^8.0.5",
+ "@ethereumjs/vm": "^6.4.1",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
+ "@fairdatasociety/bmt-js": "^2.0.1",
+ "abitype": "^0.8.0",
+ "bs58": "^5.0.0",
"http-status-codes": "^2.2.0",
"isomorphic-fetch": "^3.0.0",
"jszip": "^3.10.1",
@@ -29291,166 +29877,15 @@
"resolved": "packages/bytecode-utils",
"link": true
},
- "packages/lib-sourcify/node_modules/@ethereumjs/block": {
- "version": "4.1.0",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/tx": "^4.0.2",
- "@ethereumjs/util": "^8.0.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/blockchain": {
- "version": "6.1.0",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/ethash": "^2.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/util": "^8.0.3",
- "abstract-level": "^1.0.3",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "level": "^8.0.0",
- "lru-cache": "^5.1.1",
- "memory-level": "^1.0.0"
- },
- "engines": {
- "node": ">=14"
- }
- },
"packages/lib-sourcify/node_modules/@ethereumjs/common": {
- "version": "3.0.2",
- "license": "MIT",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
"dependencies": {
- "@ethereumjs/util": "^8.0.3",
+ "@ethereumjs/util": "^8.0.6",
"crc-32": "^1.2.0"
}
},
- "packages/lib-sourcify/node_modules/@ethereumjs/ethash": {
- "version": "2.0.2",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "abstract-level": "^1.0.3",
- "bigint-crypto-utils": "^3.0.23",
- "ethereum-cryptography": "^1.1.2"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/evm": {
- "version": "1.2.3",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/util": "^8.0.3",
- "@ethersproject/providers": "^5.7.1",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "mcl-wasm": "^0.7.1",
- "rustbn.js": "~0.2.0"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/rlp": {
- "version": "4.0.0",
- "license": "MPL-2.0",
- "bin": {
- "rlp": "bin/rlp"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/statemanager": {
- "version": "1.0.2",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1",
- "js-sdsl": "^4.1.4"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/trie": {
- "version": "5.0.2",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "@types/readable-stream": "^2.3.13",
- "ethereum-cryptography": "^1.1.2",
- "readable-stream": "^3.6.0"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/tx": {
- "version": "4.0.2",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/util": {
- "version": "8.0.3",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/rlp": "^4.0.0-beta.2",
- "async": "^3.2.4",
- "ethereum-cryptography": "^1.1.2"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "packages/lib-sourcify/node_modules/@ethereumjs/vm": {
- "version": "6.3.0",
- "license": "MPL-2.0",
- "dependencies": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/blockchain": "^6.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/evm": "^1.2.3",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/statemanager": "^1.0.2",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/tx": "^4.0.2",
- "@ethereumjs/util": "^8.0.3",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "mcl-wasm": "^0.7.1",
- "rustbn.js": "~0.2.0"
- },
- "engines": {
- "node": ">=14"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/abi": {
"version": "5.7.0",
"funding": [
@@ -29558,24 +29993,6 @@
"@ethersproject/bytes": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/basex": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/properties": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/bignumber": {
"version": "5.7.0",
"funding": [
@@ -29629,32 +30046,6 @@
"@ethersproject/bignumber": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/contracts": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abi": "^5.7.0",
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/hash": {
"version": "5.7.0",
"funding": [
@@ -29680,63 +30071,6 @@
"@ethersproject/strings": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/hdnode": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/basex": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/pbkdf2": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/signing-key": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/wordlists": "^5.7.0"
- }
- },
- "packages/lib-sourcify/node_modules/@ethersproject/json-wallets": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hdnode": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/pbkdf2": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "aes-js": "3.0.0",
- "scrypt-js": "3.0.1"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/keccak256": {
"version": "5.7.0",
"funding": [
@@ -29786,24 +30120,6 @@
"@ethersproject/logger": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/pbkdf2": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/properties": {
"version": "5.7.0",
"funding": [
@@ -29821,60 +30137,6 @@
"@ethersproject/logger": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/providers": {
- "version": "5.7.2",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/base64": "^5.7.0",
- "@ethersproject/basex": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/networks": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/rlp": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/web": "^5.7.0",
- "bech32": "1.1.4",
- "ws": "7.4.6"
- }
- },
- "packages/lib-sourcify/node_modules/@ethersproject/random": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/rlp": {
"version": "5.7.0",
"funding": [
@@ -29893,25 +30155,6 @@
"@ethersproject/logger": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/sha2": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "hash.js": "1.1.7"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/signing-key": {
"version": "5.7.0",
"funding": [
@@ -29934,28 +30177,6 @@
"hash.js": "1.1.7"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/solidity": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/strings": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/strings": {
"version": "5.7.0",
"funding": [
@@ -30000,56 +30221,6 @@
"@ethersproject/signing-key": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/units": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/logger": "^5.7.0"
- }
- },
- "packages/lib-sourcify/node_modules/@ethersproject/wallet": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/hdnode": "^5.7.0",
- "@ethersproject/json-wallets": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/signing-key": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/wordlists": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@ethersproject/web": {
"version": "5.7.1",
"funding": [
@@ -30071,27 +30242,6 @@
"@ethersproject/strings": "^5.7.0"
}
},
- "packages/lib-sourcify/node_modules/@ethersproject/wordlists": {
- "version": "5.7.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/strings": "^5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/@humanwhocodes/config-array": {
"version": "0.5.0",
"dev": true,
@@ -30132,26 +30282,6 @@
"nyc": ">=15"
}
},
- "packages/lib-sourcify/node_modules/@noble/hashes": {
- "version": "1.1.2",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT"
- },
- "packages/lib-sourcify/node_modules/@noble/secp256k1": {
- "version": "1.6.3",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"dev": true,
@@ -30184,45 +30314,6 @@
"node": ">= 8"
}
},
- "packages/lib-sourcify/node_modules/@scure/base": {
- "version": "1.1.1",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT"
- },
- "packages/lib-sourcify/node_modules/@scure/bip32": {
- "version": "1.1.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@noble/hashes": "~1.1.1",
- "@noble/secp256k1": "~1.6.0",
- "@scure/base": "~1.1.0"
- }
- },
- "packages/lib-sourcify/node_modules/@scure/bip39": {
- "version": "1.1.0",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@noble/hashes": "~1.1.1",
- "@scure/base": "~1.1.0"
- }
- },
"packages/lib-sourcify/node_modules/@sindresorhus/is": {
"version": "4.6.0",
"license": "MIT",
@@ -30345,14 +30436,6 @@
"@types/node": "*"
}
},
- "packages/lib-sourcify/node_modules/@types/readable-stream": {
- "version": "2.3.15",
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "safe-buffer": "~5.1.1"
- }
- },
"packages/lib-sourcify/node_modules/@types/responselike": {
"version": "1.0.0",
"license": "MIT",
@@ -30521,22 +30604,6 @@
"version": "1.7.5",
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/abstract-level": {
- "version": "1.0.3",
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/accepts": {
"version": "1.3.8",
"license": "MIT",
@@ -30580,10 +30647,6 @@
"dev": true,
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/aes-js": {
- "version": "3.0.0",
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/ajv": {
"version": "8.12.0",
"dev": true,
@@ -30813,10 +30876,6 @@
"node": ">=8"
}
},
- "packages/lib-sourcify/node_modules/async": {
- "version": "3.2.4",
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/async-limiter": {
"version": "1.0.1",
"license": "MIT"
@@ -30891,27 +30950,6 @@
"tweetnacl": "^0.14.3"
}
},
- "packages/lib-sourcify/node_modules/bech32": {
- "version": "1.1.4",
- "license": "MIT"
- },
- "packages/lib-sourcify/node_modules/bigint-crypto-utils": {
- "version": "3.1.8",
- "license": "MIT",
- "dependencies": {
- "bigint-mod-arith": "^3.1.0"
- },
- "engines": {
- "node": ">=10.4.0"
- }
- },
- "packages/lib-sourcify/node_modules/bigint-mod-arith": {
- "version": "3.1.2",
- "license": "MIT",
- "engines": {
- "node": ">=10.4.0"
- }
- },
"packages/lib-sourcify/node_modules/bignumber.js": {
"version": "9.1.1",
"license": "MIT",
@@ -31039,16 +31077,6 @@
"version": "1.1.0",
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/browser-level": {
- "version": "1.0.1",
- "license": "MIT",
- "dependencies": {
- "abstract-level": "^1.0.2",
- "catering": "^2.1.1",
- "module-error": "^1.0.2",
- "run-parallel-limit": "^1.1.0"
- }
- },
"packages/lib-sourcify/node_modules/browser-stdout": {
"version": "1.3.1",
"dev": true,
@@ -31127,12 +31155,18 @@
"license": "MIT"
},
"packages/lib-sourcify/node_modules/bs58": {
- "version": "4.0.1",
- "license": "MIT",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
"dependencies": {
- "base-x": "^3.0.2"
+ "base-x": "^4.0.0"
}
},
+ "packages/lib-sourcify/node_modules/bs58/node_modules/base-x": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
+ "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
+ },
"packages/lib-sourcify/node_modules/bs58check": {
"version": "2.1.2",
"license": "MIT",
@@ -31142,26 +31176,12 @@
"safe-buffer": "^5.1.2"
}
},
- "packages/lib-sourcify/node_modules/buffer": {
- "version": "6.0.3",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
+ "packages/lib-sourcify/node_modules/bs58check/node_modules/bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
"dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.2.1"
+ "base-x": "^3.0.2"
}
},
"packages/lib-sourcify/node_modules/buffer-from": {
@@ -31293,13 +31313,6 @@
"version": "0.12.0",
"license": "Apache-2.0"
},
- "packages/lib-sourcify/node_modules/catering": {
- "version": "2.1.1",
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
"packages/lib-sourcify/node_modules/chai": {
"version": "4.3.7",
"dev": true,
@@ -31432,21 +31445,6 @@
"version": "1.1.0",
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/classic-level": {
- "version": "1.2.0",
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "abstract-level": "^1.0.2",
- "catering": "^2.1.0",
- "module-error": "^1.0.1",
- "napi-macros": "~2.0.0",
- "node-gyp-build": "^4.3.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/cli-cursor": {
"version": "3.1.0",
"dev": true,
@@ -32708,6 +32706,7 @@
},
"packages/lib-sourcify/node_modules/debug": {
"version": "4.3.4",
+ "dev": true,
"license": "MIT",
"dependencies": {
"ms": "2.1.2"
@@ -33653,16 +33652,6 @@
"js-sha3": "^0.8.0"
}
},
- "packages/lib-sourcify/node_modules/ethereum-cryptography": {
- "version": "1.1.2",
- "license": "MIT",
- "dependencies": {
- "@noble/hashes": "1.1.2",
- "@noble/secp256k1": "1.6.3",
- "@scure/bip32": "1.1.0",
- "@scure/bip39": "1.1.0"
- }
- },
"packages/lib-sourcify/node_modules/ethereumjs-util": {
"version": "7.1.5",
"license": "MPL-2.0",
@@ -33698,52 +33687,6 @@
"setimmediate": "^1.0.5"
}
},
- "packages/lib-sourcify/node_modules/ethers": {
- "version": "5.7.2",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abi": "5.7.0",
- "@ethersproject/abstract-provider": "5.7.0",
- "@ethersproject/abstract-signer": "5.7.0",
- "@ethersproject/address": "5.7.0",
- "@ethersproject/base64": "5.7.0",
- "@ethersproject/basex": "5.7.0",
- "@ethersproject/bignumber": "5.7.0",
- "@ethersproject/bytes": "5.7.0",
- "@ethersproject/constants": "5.7.0",
- "@ethersproject/contracts": "5.7.0",
- "@ethersproject/hash": "5.7.0",
- "@ethersproject/hdnode": "5.7.0",
- "@ethersproject/json-wallets": "5.7.0",
- "@ethersproject/keccak256": "5.7.0",
- "@ethersproject/logger": "5.7.0",
- "@ethersproject/networks": "5.7.1",
- "@ethersproject/pbkdf2": "5.7.0",
- "@ethersproject/properties": "5.7.0",
- "@ethersproject/providers": "5.7.2",
- "@ethersproject/random": "5.7.0",
- "@ethersproject/rlp": "5.7.0",
- "@ethersproject/sha2": "5.7.0",
- "@ethersproject/signing-key": "5.7.0",
- "@ethersproject/solidity": "5.7.0",
- "@ethersproject/strings": "5.7.0",
- "@ethersproject/transactions": "5.7.0",
- "@ethersproject/units": "5.7.0",
- "@ethersproject/wallet": "5.7.0",
- "@ethersproject/web": "5.7.1",
- "@ethersproject/wordlists": "5.7.0"
- }
- },
"packages/lib-sourcify/node_modules/ethjs-unit": {
"version": "0.1.6",
"license": "MIT",
@@ -34235,10 +34178,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "packages/lib-sourcify/node_modules/functional-red-black-tree": {
- "version": "1.0.1",
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/functions-have-names": {
"version": "1.2.3",
"dev": true,
@@ -34330,31 +34269,6 @@
"dev": true,
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level": {
- "version": "1.0.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": {
- "version": "4.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -34631,18 +34545,6 @@
"node": ">=10"
}
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/level-transcoder": {
- "version": "1.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -34681,14 +34583,6 @@
"inBundle": true,
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/module-error": {
- "version": "1.0.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -35998,27 +35892,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "packages/lib-sourcify/node_modules/is-buffer": {
- "version": "2.0.5",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
"packages/lib-sourcify/node_modules/is-callable": {
"version": "1.2.7",
"license": "MIT",
@@ -36324,14 +36197,6 @@
"node": ">=8.0.0"
}
},
- "packages/lib-sourcify/node_modules/js-sdsl": {
- "version": "4.2.0",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/js-sdsl"
- }
- },
"packages/lib-sourcify/node_modules/js-sha3": {
"version": "0.8.0",
"license": "MIT"
@@ -36499,39 +36364,6 @@
"node": ">=0.10.0"
}
},
- "packages/lib-sourcify/node_modules/level": {
- "version": "8.0.0",
- "license": "MIT",
- "dependencies": {
- "browser-level": "^1.0.1",
- "classic-level": "^1.2.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/level"
- }
- },
- "packages/lib-sourcify/node_modules/level-supports": {
- "version": "4.0.1",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "packages/lib-sourcify/node_modules/level-transcoder": {
- "version": "1.0.1",
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/levn": {
"version": "0.4.1",
"dev": true,
@@ -36688,13 +36520,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "packages/lib-sourcify/node_modules/lru-cache": {
- "version": "5.1.1",
- "license": "ISC",
- "dependencies": {
- "yallist": "^3.0.2"
- }
- },
"packages/lib-sourcify/node_modules/lunr": {
"version": "2.3.9",
"dev": true,
@@ -36749,13 +36574,6 @@
"node": ">= 12"
}
},
- "packages/lib-sourcify/node_modules/mcl-wasm": {
- "version": "0.7.9",
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=8.9.0"
- }
- },
"packages/lib-sourcify/node_modules/md5.js": {
"version": "1.3.5",
"license": "MIT",
@@ -36772,18 +36590,6 @@
"node": ">= 0.6"
}
},
- "packages/lib-sourcify/node_modules/memory-level": {
- "version": "1.0.0",
- "license": "MIT",
- "dependencies": {
- "abstract-level": "^1.0.0",
- "functional-red-black-tree": "^1.0.1",
- "module-error": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/memorystream": {
"version": "0.3.1",
"engines": {
@@ -37161,15 +36967,9 @@
"node": ">=0.10.0"
}
},
- "packages/lib-sourcify/node_modules/module-error": {
- "version": "1.0.2",
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
"packages/lib-sourcify/node_modules/ms": {
"version": "2.1.2",
+ "dev": true,
"license": "MIT"
},
"packages/lib-sourcify/node_modules/multibase": {
@@ -37268,10 +37068,6 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
- "packages/lib-sourcify/node_modules/napi-macros": {
- "version": "2.0.0",
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/natural-compare": {
"version": "1.4.0",
"dev": true,
@@ -37896,6 +37692,7 @@
},
"packages/lib-sourcify/node_modules/queue-microtask": {
"version": "1.2.3",
+ "dev": true,
"funding": [
{
"type": "github",
@@ -38368,31 +38165,6 @@
"queue-microtask": "^1.2.2"
}
},
- "packages/lib-sourcify/node_modules/run-parallel-limit": {
- "version": "1.1.0",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
- "packages/lib-sourcify/node_modules/rustbn.js": {
- "version": "0.2.0",
- "license": "(MIT OR Apache-2.0)"
- },
"packages/lib-sourcify/node_modules/rxjs": {
"version": "7.8.0",
"dev": true,
@@ -40303,25 +40075,6 @@
"typedarray-to-buffer": "^3.1.5"
}
},
- "packages/lib-sourcify/node_modules/ws": {
- "version": "7.4.6",
- "license": "MIT",
- "engines": {
- "node": ">=8.3.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
"packages/lib-sourcify/node_modules/xdg-basedir": {
"version": "4.0.0",
"dev": true,
@@ -40738,6 +40491,11 @@
"to-fast-properties": "^2.0.0"
}
},
+ "@chainsafe/as-sha256": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.4.1.tgz",
+ "integrity": "sha512-IqeeGwQihK6Y2EYLFofqs2eY2ep1I2MvQXHzOAI+5iQN51OZlUkrLgyAugu2x86xZewDk5xas7lNczkzFzF62w=="
+ },
"@chainsafe/libp2p-noise": {
"version": "4.1.2",
"dev": true,
@@ -40758,6 +40516,24 @@
"uint8arrays": "^3.0.0"
}
},
+ "@chainsafe/persistent-merkle-tree": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.6.1.tgz",
+ "integrity": "sha512-gcENLemRR13+1MED2NeZBMA7FRS0xQPM7L2vhMqvKkjqtFT4YfjSVADq5U0iLuQLhFUJEMVuA8fbv5v+TN6O9A==",
+ "requires": {
+ "@chainsafe/as-sha256": "^0.4.1",
+ "@noble/hashes": "^1.3.0"
+ }
+ },
+ "@chainsafe/ssz": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.11.1.tgz",
+ "integrity": "sha512-cB8dBkgGN6ZoeOKuk+rIRHKN0L5i9JLGeC0Lui71QX0TuLcQKwgbfkUexpyJxnGFatWf8yeJxlOjozMn/OTP0g==",
+ "requires": {
+ "@chainsafe/as-sha256": "^0.4.1",
+ "@chainsafe/persistent-merkle-tree": "^0.6.1"
+ }
+ },
"@colors/colors": {
"version": "1.5.0"
},
@@ -44233,22 +44009,25 @@
"version": "file:packages/lib-sourcify",
"requires": {
"@ethereum-sourcify/bytecode-utils": "*",
- "@ethereumjs/blockchain": "^6.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/evm": "^1.2.3",
- "@ethereumjs/statemanager": "^1.0.2",
- "@ethereumjs/util": "^8.0.3",
- "@ethereumjs/vm": "6.3.0",
+ "@ethereumjs/blockchain": "^6.2.1",
+ "@ethereumjs/common": "^3.1.1",
+ "@ethereumjs/evm": "^1.3.1",
+ "@ethereumjs/statemanager": "^1.0.4",
+ "@ethereumjs/util": "^8.0.5",
+ "@ethereumjs/vm": "^6.4.1",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
+ "@fairdatasociety/bmt-js": "^2.0.1",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/debug": "^4.1.7",
"@types/lru-cache": "^5.1.1",
"@types/mocha": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
+ "abitype": "^0.8.0",
+ "bs58": "^5.0.0",
"chai": "^4.3.7",
"codecov": "^3.8.3",
"cspell": "^4.2.8",
@@ -48026,125 +47805,15 @@
}
}
},
- "@ethereumjs/block": {
- "version": "4.1.0",
- "requires": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/tx": "^4.0.2",
- "@ethereumjs/util": "^8.0.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1"
- }
- },
- "@ethereumjs/blockchain": {
- "version": "6.1.0",
- "requires": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/ethash": "^2.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/util": "^8.0.3",
- "abstract-level": "^1.0.3",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "level": "^8.0.0",
- "lru-cache": "^5.1.1",
- "memory-level": "^1.0.0"
- }
- },
"@ethereumjs/common": {
- "version": "3.0.2",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
"requires": {
- "@ethereumjs/util": "^8.0.3",
+ "@ethereumjs/util": "^8.0.6",
"crc-32": "^1.2.0"
}
},
- "@ethereumjs/ethash": {
- "version": "2.0.2",
- "requires": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "abstract-level": "^1.0.3",
- "bigint-crypto-utils": "^3.0.23",
- "ethereum-cryptography": "^1.1.2"
- }
- },
- "@ethereumjs/evm": {
- "version": "1.2.3",
- "requires": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/util": "^8.0.3",
- "@ethersproject/providers": "^5.7.1",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "mcl-wasm": "^0.7.1",
- "rustbn.js": "~0.2.0"
- }
- },
- "@ethereumjs/rlp": {
- "version": "4.0.0"
- },
- "@ethereumjs/statemanager": {
- "version": "1.0.2",
- "requires": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1",
- "js-sdsl": "^4.1.4"
- }
- },
- "@ethereumjs/trie": {
- "version": "5.0.2",
- "requires": {
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "@types/readable-stream": "^2.3.13",
- "ethereum-cryptography": "^1.1.2",
- "readable-stream": "^3.6.0"
- }
- },
- "@ethereumjs/tx": {
- "version": "4.0.2",
- "requires": {
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/util": "^8.0.3",
- "ethereum-cryptography": "^1.1.2",
- "ethers": "^5.7.1"
- }
- },
- "@ethereumjs/util": {
- "version": "8.0.3",
- "requires": {
- "@ethereumjs/rlp": "^4.0.0-beta.2",
- "async": "^3.2.4",
- "ethereum-cryptography": "^1.1.2"
- }
- },
- "@ethereumjs/vm": {
- "version": "6.3.0",
- "requires": {
- "@ethereumjs/block": "^4.1.0",
- "@ethereumjs/blockchain": "^6.1.0",
- "@ethereumjs/common": "^3.0.2",
- "@ethereumjs/evm": "^1.2.3",
- "@ethereumjs/rlp": "^4.0.0",
- "@ethereumjs/statemanager": "^1.0.2",
- "@ethereumjs/trie": "^5.0.2",
- "@ethereumjs/tx": "^4.0.2",
- "@ethereumjs/util": "^8.0.3",
- "debug": "^4.3.3",
- "ethereum-cryptography": "^1.1.2",
- "mcl-wasm": "^0.7.1",
- "rustbn.js": "~0.2.0"
- }
- },
"@ethersproject/abi": {
"version": "5.7.0",
"requires": {
@@ -48197,13 +47866,6 @@
"@ethersproject/bytes": "^5.7.0"
}
},
- "@ethersproject/basex": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/properties": "^5.7.0"
- }
- },
"@ethersproject/bignumber": {
"version": "5.7.0",
"requires": {
@@ -48224,21 +47886,6 @@
"@ethersproject/bignumber": "^5.7.0"
}
},
- "@ethersproject/contracts": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/abi": "^5.7.0",
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0"
- }
- },
"@ethersproject/hash": {
"version": "5.7.0",
"requires": {
@@ -48253,41 +47900,6 @@
"@ethersproject/strings": "^5.7.0"
}
},
- "@ethersproject/hdnode": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/basex": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/pbkdf2": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/signing-key": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/wordlists": "^5.7.0"
- }
- },
- "@ethersproject/json-wallets": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hdnode": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/pbkdf2": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "aes-js": "3.0.0",
- "scrypt-js": "3.0.1"
- }
- },
"@ethersproject/keccak256": {
"version": "5.7.0",
"requires": {
@@ -48304,51 +47916,12 @@
"@ethersproject/logger": "^5.7.0"
}
},
- "@ethersproject/pbkdf2": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0"
- }
- },
"@ethersproject/properties": {
"version": "5.7.0",
"requires": {
"@ethersproject/logger": "^5.7.0"
}
},
- "@ethersproject/providers": {
- "version": "5.7.2",
- "requires": {
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/base64": "^5.7.0",
- "@ethersproject/basex": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/networks": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/rlp": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/strings": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/web": "^5.7.0",
- "bech32": "1.1.4",
- "ws": "7.4.6"
- }
- },
- "@ethersproject/random": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0"
- }
- },
"@ethersproject/rlp": {
"version": "5.7.0",
"requires": {
@@ -48356,14 +47929,6 @@
"@ethersproject/logger": "^5.7.0"
}
},
- "@ethersproject/sha2": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "hash.js": "1.1.7"
- }
- },
"@ethersproject/signing-key": {
"version": "5.7.0",
"requires": {
@@ -48375,17 +47940,6 @@
"hash.js": "1.1.7"
}
},
- "@ethersproject/solidity": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/sha2": "^5.7.0",
- "@ethersproject/strings": "^5.7.0"
- }
- },
"@ethersproject/strings": {
"version": "5.7.0",
"requires": {
@@ -48408,34 +47962,6 @@
"@ethersproject/signing-key": "^5.7.0"
}
},
- "@ethersproject/units": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/constants": "^5.7.0",
- "@ethersproject/logger": "^5.7.0"
- }
- },
- "@ethersproject/wallet": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/abstract-provider": "^5.7.0",
- "@ethersproject/abstract-signer": "^5.7.0",
- "@ethersproject/address": "^5.7.0",
- "@ethersproject/bignumber": "^5.7.0",
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/hdnode": "^5.7.0",
- "@ethersproject/json-wallets": "^5.7.0",
- "@ethersproject/keccak256": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/random": "^5.7.0",
- "@ethersproject/signing-key": "^5.7.0",
- "@ethersproject/transactions": "^5.7.0",
- "@ethersproject/wordlists": "^5.7.0"
- }
- },
"@ethersproject/web": {
"version": "5.7.1",
"requires": {
@@ -48446,16 +47972,6 @@
"@ethersproject/strings": "^5.7.0"
}
},
- "@ethersproject/wordlists": {
- "version": "5.7.0",
- "requires": {
- "@ethersproject/bytes": "^5.7.0",
- "@ethersproject/hash": "^5.7.0",
- "@ethersproject/logger": "^5.7.0",
- "@ethersproject/properties": "^5.7.0",
- "@ethersproject/strings": "^5.7.0"
- }
- },
"@humanwhocodes/config-array": {
"version": "0.5.0",
"dev": true,
@@ -48480,12 +47996,6 @@
"@istanbuljs/schema": "^0.1.2"
}
},
- "@noble/hashes": {
- "version": "1.1.2"
- },
- "@noble/secp256k1": {
- "version": "1.6.3"
- },
"@nodelib/fs.scandir": {
"version": "2.1.5",
"dev": true,
@@ -48506,24 +48016,6 @@
"fastq": "^1.6.0"
}
},
- "@scure/base": {
- "version": "1.1.1"
- },
- "@scure/bip32": {
- "version": "1.1.0",
- "requires": {
- "@noble/hashes": "~1.1.1",
- "@noble/secp256k1": "~1.6.0",
- "@scure/base": "~1.1.0"
- }
- },
- "@scure/bip39": {
- "version": "1.1.0",
- "requires": {
- "@noble/hashes": "~1.1.1",
- "@scure/base": "~1.1.0"
- }
- },
"@sindresorhus/is": {
"version": "4.6.0"
},
@@ -48617,13 +48109,6 @@
"@types/node": "*"
}
},
- "@types/readable-stream": {
- "version": "2.3.15",
- "requires": {
- "@types/node": "*",
- "safe-buffer": "~5.1.1"
- }
- },
"@types/responselike": {
"version": "1.0.0",
"requires": {
@@ -48708,18 +48193,6 @@
"abortcontroller-polyfill": {
"version": "1.7.5"
},
- "abstract-level": {
- "version": "1.0.3",
- "requires": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- }
- },
"accepts": {
"version": "1.3.8",
"requires": {
@@ -48744,9 +48217,6 @@
"version": "1.0.0",
"dev": true
},
- "aes-js": {
- "version": "3.0.0"
- },
"ajv": {
"version": "8.12.0",
"dev": true,
@@ -48889,9 +48359,6 @@
"version": "2.0.0",
"dev": true
},
- "async": {
- "version": "3.2.4"
- },
"async-limiter": {
"version": "1.0.1"
},
@@ -48930,18 +48397,6 @@
"tweetnacl": "^0.14.3"
}
},
- "bech32": {
- "version": "1.1.4"
- },
- "bigint-crypto-utils": {
- "version": "3.1.8",
- "requires": {
- "bigint-mod-arith": "^3.1.0"
- }
- },
- "bigint-mod-arith": {
- "version": "3.1.2"
- },
"bignumber.js": {
"version": "9.1.1"
},
@@ -49029,15 +48484,6 @@
"brorand": {
"version": "1.1.0"
},
- "browser-level": {
- "version": "1.0.1",
- "requires": {
- "abstract-level": "^1.0.2",
- "catering": "^2.1.1",
- "module-error": "^1.0.2",
- "run-parallel-limit": "^1.1.0"
- }
- },
"browser-stdout": {
"version": "1.3.1",
"dev": true
@@ -49097,9 +48543,18 @@
}
},
"bs58": {
- "version": "4.0.1",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
"requires": {
- "base-x": "^3.0.2"
+ "base-x": "^4.0.0"
+ },
+ "dependencies": {
+ "base-x": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz",
+ "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="
+ }
}
},
"bs58check": {
@@ -49108,13 +48563,16 @@
"bs58": "^4.0.0",
"create-hash": "^1.1.0",
"safe-buffer": "^5.1.2"
- }
- },
- "buffer": {
- "version": "6.0.3",
- "requires": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.2.1"
+ },
+ "dependencies": {
+ "bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "requires": {
+ "base-x": "^3.0.2"
+ }
+ }
}
},
"buffer-from": {
@@ -49193,9 +48651,6 @@
"caseless": {
"version": "0.12.0"
},
- "catering": {
- "version": "2.1.1"
- },
"chai": {
"version": "4.3.7",
"dev": true,
@@ -49278,16 +48733,6 @@
"class-is": {
"version": "1.1.0"
},
- "classic-level": {
- "version": "1.2.0",
- "requires": {
- "abstract-level": "^1.0.2",
- "catering": "^2.1.0",
- "module-error": "^1.0.1",
- "napi-macros": "~2.0.0",
- "node-gyp-build": "^4.3.0"
- }
- },
"cli-cursor": {
"version": "3.1.0",
"dev": true,
@@ -50142,6 +49587,7 @@
},
"debug": {
"version": "4.3.4",
+ "dev": true,
"requires": {
"ms": "2.1.2"
}
@@ -50780,15 +50226,6 @@
"js-sha3": "^0.8.0"
}
},
- "ethereum-cryptography": {
- "version": "1.1.2",
- "requires": {
- "@noble/hashes": "1.1.2",
- "@noble/secp256k1": "1.6.3",
- "@scure/bip32": "1.1.0",
- "@scure/bip39": "1.1.0"
- }
- },
"ethereumjs-util": {
"version": "7.1.5",
"requires": {
@@ -50821,41 +50258,6 @@
}
}
},
- "ethers": {
- "version": "5.7.2",
- "requires": {
- "@ethersproject/abi": "5.7.0",
- "@ethersproject/abstract-provider": "5.7.0",
- "@ethersproject/abstract-signer": "5.7.0",
- "@ethersproject/address": "5.7.0",
- "@ethersproject/base64": "5.7.0",
- "@ethersproject/basex": "5.7.0",
- "@ethersproject/bignumber": "5.7.0",
- "@ethersproject/bytes": "5.7.0",
- "@ethersproject/constants": "5.7.0",
- "@ethersproject/contracts": "5.7.0",
- "@ethersproject/hash": "5.7.0",
- "@ethersproject/hdnode": "5.7.0",
- "@ethersproject/json-wallets": "5.7.0",
- "@ethersproject/keccak256": "5.7.0",
- "@ethersproject/logger": "5.7.0",
- "@ethersproject/networks": "5.7.1",
- "@ethersproject/pbkdf2": "5.7.0",
- "@ethersproject/properties": "5.7.0",
- "@ethersproject/providers": "5.7.2",
- "@ethersproject/random": "5.7.0",
- "@ethersproject/rlp": "5.7.0",
- "@ethersproject/sha2": "5.7.0",
- "@ethersproject/signing-key": "5.7.0",
- "@ethersproject/solidity": "5.7.0",
- "@ethersproject/strings": "5.7.0",
- "@ethersproject/transactions": "5.7.0",
- "@ethersproject/units": "5.7.0",
- "@ethersproject/wallet": "5.7.0",
- "@ethersproject/web": "5.7.1",
- "@ethersproject/wordlists": "5.7.0"
- }
- },
"ethjs-unit": {
"version": "0.1.6",
"requires": {
@@ -51184,9 +50586,6 @@
"functions-have-names": "^1.2.2"
}
},
- "functional-red-black-tree": {
- "version": "1.0.1"
- },
"functions-have-names": {
"version": "1.2.3",
"dev": true
@@ -51248,25 +50647,6 @@
"version": "3.0.1",
"dev": true
},
- "abstract-level": {
- "version": "1.0.3",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "dependencies": {
- "level-supports": {
- "version": "4.0.1",
- "dev": true
- }
- }
- },
"abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -51441,14 +50821,6 @@
"bundled": true,
"dev": true
},
- "level-transcoder": {
- "version": "1.0.1",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- }
- },
"leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -51479,10 +50851,6 @@
"bundled": true,
"dev": true
},
- "module-error": {
- "version": "1.0.2",
- "dev": true
- },
"napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -52312,9 +51680,6 @@
"has-tostringtag": "^1.0.0"
}
},
- "is-buffer": {
- "version": "2.0.5"
- },
"is-callable": {
"version": "1.2.7"
},
@@ -52479,9 +51844,6 @@
"version": "1.0.1",
"dev": true
},
- "js-sdsl": {
- "version": "4.2.0"
- },
"js-sha3": {
"version": "0.8.0"
},
@@ -52605,23 +51967,6 @@
"version": "6.0.3",
"dev": true
},
- "level": {
- "version": "8.0.0",
- "requires": {
- "browser-level": "^1.0.1",
- "classic-level": "^1.2.0"
- }
- },
- "level-supports": {
- "version": "4.0.1"
- },
- "level-transcoder": {
- "version": "1.0.1",
- "requires": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- }
- },
"levn": {
"version": "0.4.1",
"dev": true,
@@ -52728,12 +52073,6 @@
"lowercase-keys": {
"version": "3.0.0"
},
- "lru-cache": {
- "version": "5.1.1",
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"lunr": {
"version": "2.3.9",
"dev": true
@@ -52763,9 +52102,6 @@
"version": "4.2.12",
"dev": true
},
- "mcl-wasm": {
- "version": "0.7.9"
- },
"md5.js": {
"version": "1.3.5",
"requires": {
@@ -52777,14 +52113,6 @@
"media-typer": {
"version": "0.3.0"
},
- "memory-level": {
- "version": "1.0.0",
- "requires": {
- "abstract-level": "^1.0.0",
- "functional-red-black-tree": "^1.0.1",
- "module-error": "^1.0.1"
- }
- },
"memorystream": {
"version": "0.3.1"
},
@@ -53028,11 +52356,9 @@
"version": "1.0.1",
"dev": true
},
- "module-error": {
- "version": "1.0.2"
- },
"ms": {
- "version": "2.1.2"
+ "version": "2.1.2",
+ "dev": true
},
"multibase": {
"version": "0.6.1",
@@ -53091,9 +52417,6 @@
"version": "3.3.3",
"dev": true
},
- "napi-macros": {
- "version": "2.0.0"
- },
"natural-compare": {
"version": "1.4.0",
"dev": true
@@ -53460,7 +52783,8 @@
}
},
"queue-microtask": {
- "version": "1.2.3"
+ "version": "1.2.3",
+ "dev": true
},
"quick-lru": {
"version": "4.0.1",
@@ -53747,15 +53071,6 @@
"queue-microtask": "^1.2.2"
}
},
- "run-parallel-limit": {
- "version": "1.1.0",
- "requires": {
- "queue-microtask": "^1.2.2"
- }
- },
- "rustbn.js": {
- "version": "0.2.0"
- },
"rxjs": {
"version": "7.8.0",
"dev": true,
@@ -55028,10 +54343,6 @@
"typedarray-to-buffer": "^3.1.5"
}
},
- "ws": {
- "version": "7.4.6",
- "requires": {}
- },
"xdg-basedir": {
"version": "4.0.0",
"dev": true
@@ -55127,6 +54438,116 @@
}
}
},
+ "@ethereumjs/block": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-4.2.2.tgz",
+ "integrity": "sha512-kMxjeUwJSuLMwnavok5W17ayMNXXsu3hWsllK33XtZgoqt4ywvGo6ABh+xVEqwq/nn/iKuryCpDYYKEyXeFOlA==",
+ "requires": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "dependencies": {
+ "@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "requires": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "requires": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ }
+ },
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
+ "@ethereumjs/blockchain": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-6.2.2.tgz",
+ "integrity": "sha512-w1Zjskk35hr0qe0Zfwb88qrEFQJNMo73YrsqtJuBap+WamibEsw0rVuN4Ch+o8Dc66An+8rpk5SxEIK7PHF7KQ==",
+ "requires": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/ethash": "^2.0.5",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "abstract-level": "^1.0.3",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "level": "^8.0.0",
+ "lru-cache": "^5.1.1",
+ "memory-level": "^1.0.0"
+ },
+ "dependencies": {
+ "@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "requires": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "requires": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ }
+ },
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ },
+ "level": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz",
+ "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==",
+ "requires": {
+ "browser-level": "^1.0.1",
+ "classic-level": "^1.2.0"
+ }
+ }
+ }
+ },
"@ethereumjs/common": {
"version": "2.5.0",
"requires": {
@@ -55134,6 +54555,146 @@
"ethereumjs-util": "^7.1.1"
}
},
+ "@ethereumjs/ethash": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-2.0.5.tgz",
+ "integrity": "sha512-JIPr39Zd9lULLftyzPGHUQmdziElqNWk0EkO1BAw3yns4TVx+BxCYZOkRQ55fuIFeKcXBupAI9V+7xdvIT2CPw==",
+ "requires": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "abstract-level": "^1.0.3",
+ "bigint-crypto-utils": "^3.2.2",
+ "ethereum-cryptography": "^2.0.0"
+ },
+ "dependencies": {
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
+ "@ethereumjs/evm": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/evm/-/evm-1.3.2.tgz",
+ "integrity": "sha512-9PzshkvwO8YBkSD9+vyhJuzM6hxfZlljGnuUbXQlTSGEod7we8BRyzJW53W7nw/WRw5U6wf9Q2fpWypfZFkrbw==",
+ "requires": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "@ethersproject/providers": "^5.7.1",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "mcl-wasm": "^0.7.1",
+ "rustbn.js": "~0.2.0"
+ },
+ "dependencies": {
+ "@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "requires": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "requires": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ }
+ },
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
+ "@ethereumjs/rlp": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz",
+ "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="
+ },
+ "@ethereumjs/statemanager": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/statemanager/-/statemanager-1.0.5.tgz",
+ "integrity": "sha512-TVkx9Kgc2NtObCzUTTqrpUggNLnftdmxZybzKPd565Bh98FJJB30FrVkWdPwaIV8oB1d9ADtthttfx5Y/kY9gw==",
+ "requires": {
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "ethers": "^5.7.1",
+ "js-sdsl": "^4.1.4"
+ },
+ "dependencies": {
+ "@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "requires": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
+ "@ethereumjs/trie": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/trie/-/trie-5.0.5.tgz",
+ "integrity": "sha512-H3gHtYxJVGfkT4H05LTJfD1W6h9WZYNkfhTUyAYruNZKFitkSHUM/bEFWH/GIhxt5SAkf283F5uJOx7X2Fr6pQ==",
+ "requires": {
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "@types/readable-stream": "^2.3.13",
+ "ethereum-cryptography": "^2.0.0",
+ "readable-stream": "^3.6.0"
+ },
+ "dependencies": {
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
"@ethereumjs/tx": {
"version": "3.3.2",
"requires": {
@@ -55141,6 +54702,84 @@
"ethereumjs-util": "^7.1.2"
}
},
+ "@ethereumjs/util": {
+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.0.6.tgz",
+ "integrity": "sha512-zFLG/gXtF3QUC7iKFn4PT6HCr+DEnlCbwUGKGtXoqjA+64T+e0FuqMjlo4bQIY2ngRzk3EtudKdGYC4g31ehhg==",
+ "requires": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/rlp": "^4.0.1",
+ "ethereum-cryptography": "^2.0.0",
+ "micro-ftch": "^0.3.1"
+ },
+ "dependencies": {
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
+ "@ethereumjs/vm": {
+ "version": "6.4.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-6.4.2.tgz",
+ "integrity": "sha512-kTzOvJfNpUQHi2a0SbglYNWHIEOg5j3NlN80KU0IrdagWAeaEqz6Jj5XVN5lBs4VAfwXNdf+56xYtMg8Nate7Q==",
+ "requires": {
+ "@ethereumjs/block": "^4.2.2",
+ "@ethereumjs/blockchain": "^6.2.2",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/evm": "^1.3.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/statemanager": "^1.0.5",
+ "@ethereumjs/trie": "^5.0.5",
+ "@ethereumjs/tx": "^4.1.2",
+ "@ethereumjs/util": "^8.0.6",
+ "debug": "^4.3.3",
+ "ethereum-cryptography": "^2.0.0",
+ "mcl-wasm": "^0.7.1",
+ "rustbn.js": "~0.2.0"
+ },
+ "dependencies": {
+ "@ethereumjs/common": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.1.2.tgz",
+ "integrity": "sha512-YV+bZfRlFhAXg+FfwC5r4UQKVj4OG7vDP5/JvvNXLLbYpNplH5Vca9jD0L+ab8y0YlTYJMQM1ALyHFu3AE3eBA==",
+ "requires": {
+ "@ethereumjs/util": "^8.0.6",
+ "crc-32": "^1.2.0"
+ }
+ },
+ "@ethereumjs/tx": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.1.2.tgz",
+ "integrity": "sha512-PWWyO9lAFOiLwk7nB9OQisoJUsuvMz2PN2v4/ILbBpzamC5Ug79OddVq9r4rKvIDLPY+bn4NFerxBJg29+sjaA==",
+ "requires": {
+ "@chainsafe/ssz": "^0.11.1",
+ "@ethereumjs/common": "^3.1.2",
+ "@ethereumjs/rlp": "^4.0.1",
+ "@ethereumjs/util": "^8.0.6",
+ "ethereum-cryptography": "^2.0.0"
+ }
+ },
+ "ethereum-cryptography": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz",
+ "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==",
+ "requires": {
+ "@noble/curves": "1.0.0",
+ "@noble/hashes": "1.3.0",
+ "@scure/bip32": "1.3.0",
+ "@scure/bip39": "1.2.0"
+ }
+ }
+ }
+ },
"@ethersproject/abi": {
"version": "5.7.0",
"requires": {
@@ -55559,6 +55198,11 @@
}
}
},
+ "@fairdatasociety/bmt-js": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@fairdatasociety/bmt-js/-/bmt-js-2.0.1.tgz",
+ "integrity": "sha512-GyUy+BgJH8cbxbTWcKXDsvBJRNXjFdek9q+4HiMgMP5Fz/1fFxYn9xRdz8tu+evzAVNT57o8BeOVD3zPUoLMfw=="
+ },
"@hapi/accept": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz",
@@ -57213,10 +56857,23 @@
"version": "7.1.1",
"optional": true
},
+ "@noble/curves": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.0.0.tgz",
+ "integrity": "sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==",
+ "requires": {
+ "@noble/hashes": "1.3.0"
+ }
+ },
"@noble/ed25519": {
"version": "1.7.1",
"dev": true
},
+ "@noble/hashes": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz",
+ "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg=="
+ },
"@noble/secp256k1": {
"version": "1.7.1",
"dev": true
@@ -57632,6 +57289,30 @@
"@protobufjs/utf8": {
"version": "1.1.0"
},
+ "@scure/base": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
+ "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA=="
+ },
+ "@scure/bip32": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.0.tgz",
+ "integrity": "sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==",
+ "requires": {
+ "@noble/curves": "~1.0.0",
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ }
+ },
+ "@scure/bip39": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.0.tgz",
+ "integrity": "sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==",
+ "requires": {
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ }
+ },
"@sideway/address": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
@@ -57959,6 +57640,22 @@
"version": "1.2.4",
"dev": true
},
+ "@types/readable-stream": {
+ "version": "2.3.15",
+ "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz",
+ "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==",
+ "requires": {
+ "@types/node": "*",
+ "safe-buffer": "~5.1.1"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ }
+ }
+ },
"@types/responselike": {
"version": "1.0.0",
"requires": {
@@ -58109,6 +57806,12 @@
"version": "1.1.1",
"dev": true
},
+ "abitype": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.0.tgz",
+ "integrity": "sha512-QqBuwc2trtaNd/kp4k0dSjVu3OQIYRAB4ww4LCPwfSECXcCGTD3imYovNYNjx0SyN3OHV0XUOzUVwnXP1kLsVQ==",
+ "requires": {}
+ },
"abort-controller": {
"version": "3.0.0",
"dev": true,
@@ -58126,6 +57829,27 @@
"abortcontroller-polyfill": {
"version": "1.7.5"
},
+ "abstract-level": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
+ "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
+ "requires": {
+ "buffer": "^6.0.3",
+ "catering": "^2.1.0",
+ "is-buffer": "^2.0.5",
+ "level-supports": "^4.0.0",
+ "level-transcoder": "^1.0.1",
+ "module-error": "^1.0.1",
+ "queue-microtask": "^1.2.3"
+ },
+ "dependencies": {
+ "level-supports": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
+ "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA=="
+ }
+ }
+ },
"abstract-leveldown": {
"version": "7.2.0",
"dev": true,
@@ -58505,6 +58229,11 @@
"version": "2.2.3",
"dev": true
},
+ "bigint-crypto-utils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz",
+ "integrity": "sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw=="
+ },
"bignumber.js": {
"version": "9.1.1"
},
@@ -58614,6 +58343,17 @@
"brorand": {
"version": "1.1.0"
},
+ "browser-level": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz",
+ "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==",
+ "requires": {
+ "abstract-level": "^1.0.2",
+ "catering": "^2.1.1",
+ "module-error": "^1.0.2",
+ "run-parallel-limit": "^1.1.0"
+ }
+ },
"browser-readablestream-to-it": {
"version": "1.0.3"
},
@@ -58941,8 +58681,7 @@
"version": "0.12.0"
},
"catering": {
- "version": "2.1.1",
- "dev": true
+ "version": "2.1.1"
},
"cborg": {
"version": "1.10.0"
@@ -59118,6 +58857,25 @@
}
}
},
+ "classic-level": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz",
+ "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==",
+ "requires": {
+ "abstract-level": "^1.0.2",
+ "catering": "^2.1.0",
+ "module-error": "^1.0.1",
+ "napi-macros": "^2.2.2",
+ "node-gyp-build": "^4.3.0"
+ },
+ "dependencies": {
+ "napi-macros": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz",
+ "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g=="
+ }
+ }
+ },
"clean-stack": {
"version": "2.2.0",
"dev": true
@@ -61624,6 +61382,11 @@
"functions-have-names": "^1.2.2"
}
},
+ "functional-red-black-tree": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g=="
+ },
"functions-have-names": {
"version": "1.2.3",
"dev": true
@@ -61685,25 +61448,6 @@
"version": "3.0.1",
"dev": true
},
- "abstract-level": {
- "version": "1.0.3",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "dependencies": {
- "level-supports": {
- "version": "4.0.1",
- "dev": true
- }
- }
- },
"abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -61878,14 +61622,6 @@
"bundled": true,
"dev": true
},
- "level-transcoder": {
- "version": "1.0.1",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- }
- },
"leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -61916,10 +61652,6 @@
"bundled": true,
"dev": true
},
- "module-error": {
- "version": "1.0.2",
- "dev": true
- },
"napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -63684,8 +63416,7 @@
}
},
"is-buffer": {
- "version": "2.0.5",
- "dev": true
+ "version": "2.0.5"
},
"is-callable": {
"version": "1.2.7"
@@ -64338,8 +64069,7 @@
"integrity": "sha512-YqvUxoOcVPnCp0VU1/56f+iKSdvIRJYPznH22BdXV3xMk75SFXhWeJkZ8C9XxUWt1b5x2X1SxuFygW1U0FmkEQ=="
},
"js-sdsl": {
- "version": "4.2.0",
- "dev": true
+ "version": "4.2.0"
},
"js-sha3": {
"version": "0.8.0"
@@ -64548,6 +64278,15 @@
"version": "2.1.0",
"dev": true
},
+ "level-transcoder": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
+ "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
+ "requires": {
+ "buffer": "^6.0.3",
+ "module-error": "^1.0.1"
+ }
+ },
"leveldown": {
"version": "6.1.1",
"dev": true,
@@ -65094,7 +64833,6 @@
},
"lru-cache": {
"version": "5.1.1",
- "dev": true,
"requires": {
"yallist": "^3.0.2"
}
@@ -65162,6 +64900,11 @@
"object-visit": "^1.0.0"
}
},
+ "mcl-wasm": {
+ "version": "0.7.9",
+ "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz",
+ "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ=="
+ },
"md5.js": {
"version": "1.3.5",
"requires": {
@@ -65173,6 +64916,16 @@
"media-typer": {
"version": "0.3.0"
},
+ "memory-level": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz",
+ "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==",
+ "requires": {
+ "abstract-level": "^1.0.0",
+ "functional-red-black-tree": "^1.0.1",
+ "module-error": "^1.0.1"
+ }
+ },
"memorystore": {
"version": "1.6.7",
"requires": {
@@ -65354,6 +65107,11 @@
"methods": {
"version": "1.1.2"
},
+ "micro-ftch": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz",
+ "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg=="
+ },
"micromatch": {
"version": "4.0.5",
"dev": true,
@@ -65910,6 +65668,11 @@
"version": "1.0.1",
"dev": true
},
+ "module-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
+ "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA=="
+ },
"moment": {
"version": "2.29.4",
"optional": true
@@ -67973,8 +67736,7 @@
}
},
"queue-microtask": {
- "version": "1.2.3",
- "dev": true
+ "version": "1.2.3"
},
"quick-format-unescaped": {
"version": "4.0.4",
@@ -68396,7 +68158,6 @@
},
"run-parallel-limit": {
"version": "1.1.0",
- "dev": true,
"requires": {
"queue-microtask": "^1.2.2"
}
@@ -68414,6 +68175,11 @@
}
}
},
+ "rustbn.js": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz",
+ "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA=="
+ },
"rxjs": {
"version": "6.6.7",
"dev": true,
@@ -69958,8 +69724,7 @@
}
},
"typescript": {
- "version": "4.9.4",
- "dev": true
+ "version": "4.9.4"
},
"typestrict": {
"version": "1.0.2",
diff --git a/package.json b/package.json
index b8f60be59..b4a56774d 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
"@ethereum-sourcify/bytecode-utils": "*",
"@ethereum-sourcify/lib-sourcify": "*",
"@types/node-fetch": "^2.5.7",
+ "abitype": "^0.8.0",
"bunyan": "^1.8.12",
"commander": "^9.0.0",
"cors": "^2.8.5",
diff --git a/packages/lib-sourcify/package-lock.json b/packages/lib-sourcify/package-lock.json
index 4eac17ef6..a74aed0fb 100644
--- a/packages/lib-sourcify/package-lock.json
+++ b/packages/lib-sourcify/package-lock.json
@@ -21,6 +21,7 @@
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
"@fairdatasociety/bmt-js": "^2.0.1",
+ "abitype": "^0.8.0",
"bs58": "^5.0.0",
"http-status-codes": "^2.2.0",
"isomorphic-fetch": "^3.0.0",
@@ -2391,6 +2392,20 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/abitype": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.0.tgz",
+ "integrity": "sha512-QqBuwc2trtaNd/kp4k0dSjVu3OQIYRAB4ww4LCPwfSECXcCGTD3imYovNYNjx0SyN3OHV0XUOzUVwnXP1kLsVQ==",
+ "peerDependencies": {
+ "typescript": ">=4.9.4",
+ "zod": "^3 >=3.19.1"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
"node_modules/abortcontroller-polyfill": {
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz",
@@ -13478,7 +13493,6 @@
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
- "dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -16140,6 +16154,12 @@
"eslint-visitor-keys": "^2.0.0"
}
},
+ "abitype": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.0.tgz",
+ "integrity": "sha512-QqBuwc2trtaNd/kp4k0dSjVu3OQIYRAB4ww4LCPwfSECXcCGTD3imYovNYNjx0SyN3OHV0XUOzUVwnXP1kLsVQ==",
+ "requires": {}
+ },
"abortcontroller-polyfill": {
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz",
@@ -24545,8 +24565,7 @@
"typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
- "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
- "dev": true
+ "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
},
"uglify-js": {
"version": "3.17.4",
diff --git a/packages/lib-sourcify/package.json b/packages/lib-sourcify/package.json
index a3f9e7781..942c8bb12 100644
--- a/packages/lib-sourcify/package.json
+++ b/packages/lib-sourcify/package.json
@@ -54,6 +54,7 @@
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
"@fairdatasociety/bmt-js": "^2.0.1",
+ "abitype": "^0.8.0",
"bs58": "^5.0.0",
"http-status-codes": "^2.2.0",
"isomorphic-fetch": "^3.0.0",
diff --git a/packages/lib-sourcify/src/lib/types.ts b/packages/lib-sourcify/src/lib/types.ts
index 467d5efbb..6e8b3b1f9 100644
--- a/packages/lib-sourcify/src/lib/types.ts
+++ b/packages/lib-sourcify/src/lib/types.ts
@@ -1,3 +1,5 @@
+import { Abi } from 'abitype';
+
export interface PathBuffer {
path: string;
buffer: Buffer;
@@ -36,29 +38,103 @@ export interface MetadataSources {
};
}
+export interface Devdoc {
+ author?: string;
+ details?: string;
+ errors?: {
+ [index: string]: {
+ details?: string;
+ };
+ };
+ events?: {
+ [index: string]: {
+ details?: string;
+ params?: any;
+ };
+ };
+ kind: 'dev';
+ methods: {
+ [index: string]: {
+ details?: string;
+ params?: any;
+ returns?: any;
+ };
+ };
+ stateVariables?: any;
+ title?: string;
+ version?: number;
+}
+
+export interface Userdoc {
+ errors?: {
+ [index: string]: {
+ notice?: string;
+ }[];
+ };
+ events?: {
+ [index: string]: {
+ notice?: string;
+ };
+ };
+ kind: 'user';
+ methods: {
+ [index: string]: {
+ notice: string;
+ };
+ };
+ version?: number;
+}
+
+export interface MetadataOutput {
+ abi: Abi;
+ devdoc: Devdoc;
+ userdoc: Userdoc;
+}
+
+// Metadata type that reflects the metadata object from
+// https://docs.soliditylang.org/en/latest/metadata.html
export interface Metadata {
compiler: {
+ keccak256?: string;
version: string;
};
language: string;
- output: any;
+ output: MetadataOutput;
settings: {
compilationTarget: {
[sourceName: string]: string;
};
evmVersion: string;
- libraries?: any;
- metadata: {
- bytecodeHash: 'none' | 'ipfs' | 'bzzr0' | 'bzzr1';
+ libraries?: {
+ [index: string]: string;
+ };
+ metadata?: {
+ appendCBOR?: boolean;
+ bytecodeHash?: 'none' | 'ipfs' | 'bzzr0' | 'bzzr1';
useLiteralContent?: boolean;
};
optimizer?: {
+ details?: {
+ constantOptimizer?: boolean;
+ cse?: boolean;
+ deduplicate?: boolean;
+ inliner?: boolean;
+ jumpdestRemover?: boolean;
+ orderLiterals?: boolean;
+ peephole?: boolean;
+ yul?: boolean;
+ yulDetails?: {
+ optimizerSteps?: string;
+ stackAllocation?: boolean;
+ };
+ };
enabled: boolean;
runs: number;
};
outputSelection?: any;
};
sources: MetadataSources;
+ version: number;
}
// TODO: Fully define solcJsonInput
diff --git a/src/server/controllers/VerificationController-util.ts b/src/server/controllers/VerificationController-util.ts
index b6538910d..e9a63aad9 100644
--- a/src/server/controllers/VerificationController-util.ts
+++ b/src/server/controllers/VerificationController-util.ts
@@ -1,6 +1,6 @@
import { Request } from "express";
import { isAddress } from "ethers/lib/utils";
-import { toChecksumAddress, AbiInput } from "web3-utils";
+import { toChecksumAddress } from "web3-utils";
import { PayloadTooLargeError, ValidationError } from "../../common/errors";
import { UploadedFile } from "express-fileupload";
import {
@@ -27,6 +27,7 @@ import Web3 from "web3";
import VerificationService from "../services/VerificationService";
import RepositoryService from "../services/RepositoryService";
import { etherscanAPIs } from "../../config";
+import { AbiConstructor, AbiParameter } from "abitype";
export interface PathContentMap {
[id: string]: PathContent;
@@ -173,6 +174,10 @@ export type ContractWrapper = ContractMeta & {
contract: CheckedContract;
};
+type Mutable = {
+ -readonly [Key in keyof Type]: Type[Key];
+};
+
// Contract object in the server response.
export type SendableContract = ContractMeta & {
files: {
@@ -181,7 +186,7 @@ export type SendableContract = ContractMeta & {
invalid: InvalidSources;
};
verificationId: string;
- constructorArgumentsArray?: [AbiInput];
+ constructorArgumentsArray?: Mutable;
creationBytecode?: string;
};
@@ -193,9 +198,11 @@ function getSendableContract(
return {
verificationId,
- constructorArgumentsArray: contract?.metadata?.output?.abi?.find(
- (abi: any) => abi.type === "constructor"
- )?.inputs,
+ constructorArgumentsArray: (
+ contract?.metadata?.output?.abi?.find(
+ (abi) => abi.type === "constructor"
+ ) as AbiConstructor
+ )?.inputs as Mutable,
creationBytecode: contract?.creationBytecode,
compiledPath: contract.compiledPath,
name: contract.name,
From 35be29dab36ea3d588b930c6df42be54a365b55c Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 10:44:12 +0200
Subject: [PATCH 21/48] #860 `checkChainId` now returns error if chain is not
supported
---
src/sourcify-chains.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index 708c099aa..e097bd965 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -845,7 +845,12 @@ export function checkSupportedChainId(chain: string): string {
* Note that there might be chains not supported for verification anymore but still exist as a SourcifyChain e.g. Ropsten.
*/
export function checkChainId(chain: string): string {
- if (!(chain in sourcifyChainsMap && sourcifyChainsMap[chain])) {
+ if (
+ // if chain is not in sourcify-chains.ts
+ !(chain in sourcifyChainsMap && sourcifyChainsMap[chain]) ||
+ // or if chain is not supported
+ sourcifyChainsMap[chain].supported === false
+ ) {
throw new Error(`Chain ${chain} not supported!`);
}
From 326c94d5a43baeef0d4db574b168ffe7f1f75d4c Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 11:36:55 +0200
Subject: [PATCH 22/48] Add server monitoring capabilities to grafana * add
prometheus * add cadvisor for monitoring docker containers * add
node_exported for monitoring the server
---
environments/.env.dev | 1 +
environments/.env.latest | 1 +
environments/.env.stable | 1 +
environments/grafana.yaml | 47 +++++++++++++++++++++++++++++++++++++++
4 files changed, 50 insertions(+)
diff --git a/environments/.env.dev b/environments/.env.dev
index 3dc4eb30a..aaae137c3 100644
--- a/environments/.env.dev
+++ b/environments/.env.dev
@@ -89,5 +89,6 @@ GRAFANA_HTTP_USER=xxx
GRAFANA_HTTP_PASS=xxx
GRAFANA_EXTERNAL_PORT=3000
GRAFANA_LOKI_EXTERNAL_PORT=3100
+GRAFANA_PROMETHEUS_EXTERNAL_PORT=9090
# Use if you'll have a running Loki instance, otherwise leave blank
# GRAFANA_LOKI_URL=http://localhost:3100
\ No newline at end of file
diff --git a/environments/.env.latest b/environments/.env.latest
index 642fd5299..789eaf4dc 100644
--- a/environments/.env.latest
+++ b/environments/.env.latest
@@ -87,4 +87,5 @@ GRAFANA_HTTP_USER=xxx
GRAFANA_HTTP_PASS=xxx
GRAFANA_EXTERNAL_PORT=13000
GRAFANA_LOKI_EXTERNAL_PORT=13100
+GRAFANA_PROMETHEUS_EXTERNAL_PORT=9090
GRAFANA_LOKI_URL=http://grafana-loki-latest:3100
\ No newline at end of file
diff --git a/environments/.env.stable b/environments/.env.stable
index a0e982c5a..e9ef447aa 100644
--- a/environments/.env.stable
+++ b/environments/.env.stable
@@ -85,4 +85,5 @@ GRAFANA_HTTP_USER=xxx
GRAFANA_HTTP_PASS=xxx
GRAFANA_EXTERNAL_PORT=13000
GRAFANA_LOKI_EXTERNAL_PORT=13100
+GRAFANA_PROMETHEUS_EXTERNAL_PORT=9090
GRAFANA_LOKI_URL=http://grafana-loki-stable:3100
\ No newline at end of file
diff --git a/environments/grafana.yaml b/environments/grafana.yaml
index d7598f563..aae50b28e 100644
--- a/environments/grafana.yaml
+++ b/environments/grafana.yaml
@@ -10,6 +10,10 @@ x-project-base: &project-base
networks:
source-verify:
+volumes:
+ prometheus-data:
+ driver: local
+
services:
loki:
container_name: grafana-loki-${TAG}
@@ -46,3 +50,46 @@ services:
- HTTP_USER="${GRAFANA_HTTP_USER}"
- HTTP_PASS="${GRAFANA_HTTP_PASS}"
restart: always
+
+ prometheus:
+ image: prom/prometheus:latest
+ container_name: grafana-prometheus-${TAG}
+ ports:
+ - "${GRAFANA_PROMETHEUS_EXTERNAL_PORT}:9090"
+ volumes:
+ - /etc/prometheus:/etc/prometheus
+ - prometheus-data:/prometheus
+ restart: unless-stopped
+ command:
+ - "--config.file=/etc/prometheus/prometheus.yml"
+ networks:
+ - source-verify
+
+ cadvisor:
+ image: gcr.io/cadvisor/cadvisor:v0.47.0
+ container_name: grafana-cadvisor-${TAG}
+ network_mode: host
+ volumes:
+ - /:/rootfs:ro
+ - /var/run:/var/run:ro
+ - /sys:/sys:ro
+ - /var/lib/docker/:/var/lib/docker:ro
+ - /dev/disk/:/dev/disk:ro
+ devices:
+ - /dev/kmsg
+ restart: unless-stopped
+ privileged: true
+ networks:
+ - source-verify
+
+ node_exporter:
+ image: quay.io/prometheus/node-exporter:latest
+ container_name: grafana-node_exporter-${TAG}
+ command:
+ - "--path.rootfs=/host"
+ pid: host
+ restart: unless-stopped
+ volumes:
+ - "/:/host:ro,rslave"
+ networks:
+ - source-verify
From f3c74f661cff7ac2b938fca219ebbaaae983b250 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 12:26:49 +0200
Subject: [PATCH 23/48] * remove network_mode host from cadvisor
---
environments/grafana.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/environments/grafana.yaml b/environments/grafana.yaml
index aae50b28e..565042106 100644
--- a/environments/grafana.yaml
+++ b/environments/grafana.yaml
@@ -68,7 +68,6 @@ services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.0
container_name: grafana-cadvisor-${TAG}
- network_mode: host
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
From e6e6d4803862cc1034781588674af452421cb148 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Thu, 27 Apr 2023 13:07:27 +0200
Subject: [PATCH 24/48] Remove server, monitor build dependency on tests
---
.circleci/continue_config.yml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml
index ce87fa125..a79f49390 100644
--- a/.circleci/continue_config.yml
+++ b/.circleci/continue_config.yml
@@ -114,16 +114,12 @@ workflows:
# Always build monitor if there's a change in the server
- build-push-monitor:
run-build: << pipeline.parameters.run-build-server >>
- requires:
- - tests-node-v16
- build-push-repository:
run-build: << pipeline.parameters.run-build-repository >>
- build-push-s3:
run-build: << pipeline.parameters.run-build-s3 >>
- build-push-server:
run-build: << pipeline.parameters.run-build-server >>
- requires:
- - tests-node-v16
- build-push-ui:
run-build: << pipeline.parameters.run-build-ui >>
- deploy:
From 74da0548f3866da55acc368dc1c608a35033e8ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Thu, 27 Apr 2023 13:08:24 +0200
Subject: [PATCH 25/48] Disable chainId 51 getCreatorTx test
---
test/server.js | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/test/server.js b/test/server.js
index c14235cdf..6b211554d 100644
--- a/test/server.js
+++ b/test/server.js
@@ -1715,20 +1715,21 @@ describe("Server", function () {
"0xb7efb33c736b1e8ea97e356467f99d99221343f077ce31a3e3ac1d2e0636df1d"
);
});
- it("should run getCreatorTx with chainId 51", async function () {
- const sourcifyChain = sourcifyChainsArray.find(
- (sourcifyChain) => sourcifyChain.chainId === 51
- );
- const creatorTx = await getCreatorTx(
- sourcifyChain,
- "0x8C3FA94eb5b07c9AF7dBFcC53ea3D2BF7FdF3617"
- );
- chai
- .expect(creatorTx)
- .equals(
- "0xb1af0ec1283551480ae6e6ce374eb4fa7d1803109b06657302623fc65c987420"
- );
- });
+ // Commented out as fails way too often
+ // it("should run getCreatorTx with chainId 51", async function () {
+ // const sourcifyChain = sourcifyChainsArray.find(
+ // (sourcifyChain) => sourcifyChain.chainId === 51
+ // );
+ // const creatorTx = await getCreatorTx(
+ // sourcifyChain,
+ // "0x8C3FA94eb5b07c9AF7dBFcC53ea3D2BF7FdF3617"
+ // );
+ // chai
+ // .expect(creatorTx)
+ // .equals(
+ // "0xb1af0ec1283551480ae6e6ce374eb4fa7d1803109b06657302623fc65c987420"
+ // );
+ // });
it("should run getCreatorTx with chainId 83", async function () {
const sourcifyChain = sourcifyChainsArray.find(
(sourcifyChain) => sourcifyChain.chainId === 83
From 7693ad5fc6fa131e596e9ff222e77735675e6dae Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 13:40:41 +0200
Subject: [PATCH 26/48] remove old TODO already completed
---
packages/lib-sourcify/src/lib/solidityCompiler.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/lib-sourcify/src/lib/solidityCompiler.ts b/packages/lib-sourcify/src/lib/solidityCompiler.ts
index 7d3bb77b9..f148f980e 100644
--- a/packages/lib-sourcify/src/lib/solidityCompiler.ts
+++ b/packages/lib-sourcify/src/lib/solidityCompiler.ts
@@ -140,7 +140,6 @@ export async function getAllMetadataAndSourcesFromSolcJson(
return metadataAndSources;
}
-// TODO: Handle where and how solc is saved
export async function getSolcExecutable(
platform: string,
version: string
From 30104e1e1ebd4bfbd0c48414abe2ac86120ddedc Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 27 Apr 2023 16:04:59 +0200
Subject: [PATCH 27/48] Re-enable SourcifyEventManager's listeners (#1003)
* #1002 re-enable SourcifyEventManager's listeners
* this commit fixes the grafana-loki missing events
* test exclude loggerLoki from nyc
---
package.json | 3 ++-
src/server/server.ts | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b4a56774d..9de768026 100644
--- a/package.json
+++ b/package.json
@@ -108,7 +108,8 @@
"nyc": {
"exclude": [
"test/**/*.*",
- "packages/**/*.*"
+ "packages/**/*.*",
+ "src/common/loggerLoki.ts"
],
"reporter": [
"html",
diff --git a/src/server/server.ts b/src/server/server.ts
index 4bbb55789..98dd2ce31 100644
--- a/src/server/server.ts
+++ b/src/server/server.ts
@@ -6,6 +6,8 @@ import routes from "./routes";
import bodyParser from "body-parser";
import config, { etherscanAPIs } from "../config";
import { SourcifyEventManager } from "../common/SourcifyEventManager/SourcifyEventManager";
+import "../common/SourcifyEventManager/listeners/matchStored";
+import "../common/SourcifyEventManager/listeners/logger";
import genericErrorHandler from "./middlewares/GenericErrorHandler";
import notFoundHandler from "./middlewares/NotFoundError";
import useApiLogging from "./middlewares/ApiLogging";
From e841b1f27de0308e57a8565576cbf0592cbdb4cc Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Fri, 28 Apr 2023 11:51:55 +0200
Subject: [PATCH 28/48] fix #869 add a repository link to the create2 verified
contracts
---
ui/src/pages/Lookup/Result.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ui/src/pages/Lookup/Result.tsx b/ui/src/pages/Lookup/Result.tsx
index c381a8b1d..ce2c66ab7 100644
--- a/ui/src/pages/Lookup/Result.tsx
+++ b/ui/src/pages/Lookup/Result.tsx
@@ -292,7 +292,14 @@ const Found = ({ response }: FoundProp) => {
>
{isCreate2Verified && <>create2>} verified
- {" "}
+
+ ,{" "}
+
+ view in Sourcify Repository
+
{isCreate2Verified && Create2Info(response)}
{chains.length > 0 && on the following networks: }
From 544e1c60c4a30dbf513818b2fbaf16a7dc2ac649 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Fri, 28 Apr 2023 12:58:32 +0200
Subject: [PATCH 29/48] use checkSupportedChainId instead of checkChainId for
contract verification
---
src/server/controllers/VerificationController.ts | 13 ++++++++-----
src/sourcify-chains.ts | 7 +------
test/etherscan.js | 4 ++--
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/server/controllers/VerificationController.ts b/src/server/controllers/VerificationController.ts
index 706e41433..549c7991a 100644
--- a/src/server/controllers/VerificationController.ts
+++ b/src/server/controllers/VerificationController.ts
@@ -47,7 +47,10 @@ import {
NotFoundError,
ValidationError,
} from "../../common/errors";
-import { checkChainId, sourcifyChainsMap } from "../../sourcify-chains";
+import {
+ checkSupportedChainId,
+ sourcifyChainsMap,
+} from "../../sourcify-chains";
import config from "../../config";
import { StatusCodes } from "http-status-codes";
import RepositoryService from "../services/RepositoryService";
@@ -662,7 +665,7 @@ export default class VerificationController
body("chain")
.exists()
.bail()
- .custom((chain, { req }) => (req.chain = checkChainId(chain))),
+ .custom((chain, { req }) => (req.chain = checkSupportedChainId(chain))),
/* body("contextVariables.msgSender").optional(),
body("contextVariables.abiEncodedConstructorArguments").optional(), */
// Handle non-json multipart/form-data requests.
@@ -702,7 +705,7 @@ export default class VerificationController
body("chain")
.exists()
.bail()
- .custom((chain, { req }) => (req.chain = checkChainId(chain))),
+ .custom((chain, { req }) => (req.chain = checkSupportedChainId(chain))),
body("compilerVersion").exists().bail(),
body("contractName").exists().bail(),
// body("contextVariables.msgSender").optional(),
@@ -787,7 +790,7 @@ export default class VerificationController
body("chain")
.exists()
.bail()
- .custom((chain) => checkChainId(chain)),
+ .custom((chain) => checkSupportedChainId(chain)),
this.safeHandler(this.verifyFromEtherscan)
);
@@ -809,7 +812,7 @@ export default class VerificationController
body("chainId")
.exists()
.bail()
- .custom((chainId) => checkChainId(chainId)),
+ .custom((chainId) => checkSupportedChainId(chainId)),
this.safeHandler(this.sessionVerifyFromEtherscan)
);
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index e097bd965..708c099aa 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -845,12 +845,7 @@ export function checkSupportedChainId(chain: string): string {
* Note that there might be chains not supported for verification anymore but still exist as a SourcifyChain e.g. Ropsten.
*/
export function checkChainId(chain: string): string {
- if (
- // if chain is not in sourcify-chains.ts
- !(chain in sourcifyChainsMap && sourcifyChainsMap[chain]) ||
- // or if chain is not supported
- sourcifyChainsMap[chain].supported === false
- ) {
+ if (!(chain in sourcifyChainsMap && sourcifyChainsMap[chain])) {
throw new Error(`Chain ${chain} not supported!`);
}
diff --git a/test/etherscan.js b/test/etherscan.js
index f9ae2a420..1b3a43157 100644
--- a/test/etherscan.js
+++ b/test/etherscan.js
@@ -119,7 +119,7 @@ describe("Import From Etherscan and Verify", function () {
err,
res,
"chain",
- `Chain ${unsupportedChain} not supported!`
+ `Chain ${unsupportedChain} not supported for verification!`
);
done();
});
@@ -273,7 +273,7 @@ describe("Import From Etherscan and Verify", function () {
err,
res,
"chainId",
- `Chain ${unsupportedChain} not supported!`
+ `Chain ${unsupportedChain} not supported for verification!`
);
done();
});
From baf549ecc1814ca9eb4b7632d69ecd25aa4dae3f Mon Sep 17 00:00:00 2001
From: Thomas Bush
Date: Tue, 2 May 2023 10:25:28 +0200
Subject: [PATCH 30/48] add canto testnet (7701) (#1005)
---
src/sourcify-chains.ts | 7 +++++++
test/chains/chain-tests.js | 18 +++++++++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index 708c099aa..df1870069 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -561,6 +561,13 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
contractFetchAddress: "https://tuber.build/" + BLOCKSCOUT_SUFFIX,
txRegex: getBlockscoutRegex(),
},
+ "7701": {
+ // Canto Testnet
+ supported: true,
+ monitored: false,
+ contractFetchAddress: "https://testnet.tuber.build/" + BLOCKSCOUT_SUFFIX,
+ txRegex: getBlockscoutRegex(),
+ },
"99": {
// POA Network Core
supported: true,
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index 755fa0835..eed336fb6 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1053,7 +1053,23 @@ describe("Test Supported Chains", function () {
["shared/WithImmutables.sol"],
"shared/withImmutables.metadata.json"
);
-
+ // Canto Testnet
+ verifyContract(
+ "0x37e12c98b4663DcE9ab1460073D9Fe82A7bFD0d8",
+ "7701",
+ "Canto Testnet",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+ verifyContractWithImmutables(
+ "0x652785B4512F7e664448708852e59eF256D3f478",
+ "7701",
+ "Canto Testnet",
+ ["uint256"],
+ [7700],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
// POA Network Core
verifyContract(
"0x3b2e3383AeE77A58f252aFB3635bCBd842BaeCB3",
From 33188b9c71885b9ff5585c93f20d4169e00b0e21 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 3 May 2023 15:06:11 +0200
Subject: [PATCH 31/48] fix #1010 update typescript in lib-sourcify
---
packages/lib-sourcify/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/lib-sourcify/package.json b/packages/lib-sourcify/package.json
index 942c8bb12..32f1e9771 100644
--- a/packages/lib-sourcify/package.json
+++ b/packages/lib-sourcify/package.json
@@ -89,7 +89,7 @@
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
"typedoc": "^0.23.24",
- "typescript": "^4.9.4"
+ "typescript": "^5.0.4"
},
"files": [
"build/main",
From 3f435a58db9b76d6618cdf8a15556b591b9e2448 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 3 May 2023 15:15:27 +0200
Subject: [PATCH 32/48] #1010 update typedoc in lib-sourcify * fix
compatibility issue with typescript
---
packages/lib-sourcify/package-lock.json | 120 ++++++++++++++++--------
packages/lib-sourcify/package.json | 2 +-
2 files changed, 80 insertions(+), 42 deletions(-)
diff --git a/packages/lib-sourcify/package-lock.json b/packages/lib-sourcify/package-lock.json
index a74aed0fb..f8070e310 100644
--- a/packages/lib-sourcify/package-lock.json
+++ b/packages/lib-sourcify/package-lock.json
@@ -55,8 +55,8 @@
"prettier": "^2.8.2",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
- "typedoc": "^0.23.24",
- "typescript": "^4.9.4"
+ "typedoc": "^0.24.6",
+ "typescript": "^5.0.4"
},
"engines": {
"node": ">=10"
@@ -611,6 +611,20 @@
"typescript": ">=3"
}
},
+ "node_modules/@commitlint/load/node_modules/typescript": {
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "dev": true,
+ "optional": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
"node_modules/@commitlint/resolve-extends": {
"version": "17.4.0",
"resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.4.0.tgz",
@@ -2567,6 +2581,12 @@
"node": ">=8"
}
},
+ "node_modules/ansi-sequence-parser": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz",
+ "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==",
+ "dev": true
+ },
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -9666,9 +9686,9 @@
}
},
"node_modules/marked": {
- "version": "4.2.5",
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.5.tgz",
- "integrity": "sha512-jPueVhumq7idETHkb203WDD4fMA3yV9emQ5vLwop58lu8bTclMghBWcYAavlDqIEMaisADinV1TooIFCfqOsYQ==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
+ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"dev": true,
"bin": {
"marked": "bin/marked.js"
@@ -12222,11 +12242,12 @@
}
},
"node_modules/shiki": {
- "version": "0.12.1",
- "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.12.1.tgz",
- "integrity": "sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==",
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz",
+ "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==",
"dev": true,
"dependencies": {
+ "ansi-sequence-parser": "^1.1.0",
"jsonc-parser": "^3.2.0",
"vscode-oniguruma": "^1.7.0",
"vscode-textmate": "^8.0.0"
@@ -13448,15 +13469,15 @@
}
},
"node_modules/typedoc": {
- "version": "0.23.24",
- "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.24.tgz",
- "integrity": "sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==",
+ "version": "0.24.6",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz",
+ "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==",
"dev": true,
"dependencies": {
"lunr": "^2.3.9",
- "marked": "^4.2.5",
- "minimatch": "^5.1.2",
- "shiki": "^0.12.1"
+ "marked": "^4.3.0",
+ "minimatch": "^9.0.0",
+ "shiki": "^0.14.1"
},
"bin": {
"typedoc": "bin/typedoc"
@@ -13465,7 +13486,7 @@
"node": ">= 14.14"
},
"peerDependencies": {
- "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
+ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x"
}
},
"node_modules/typedoc/node_modules/brace-expansion": {
@@ -13478,27 +13499,30 @@
}
},
"node_modules/typedoc/node_modules/minimatch": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
- "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz",
+ "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=10"
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/typescript": {
- "version": "4.9.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
- "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=12.20"
}
},
"node_modules/uglify-js": {
@@ -14891,6 +14915,13 @@
"dev": true,
"optional": true,
"requires": {}
+ },
+ "typescript": {
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "dev": true,
+ "optional": true
}
}
},
@@ -16278,6 +16309,12 @@
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
+ "ansi-sequence-parser": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz",
+ "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==",
+ "dev": true
+ },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -21705,9 +21742,9 @@
"dev": true
},
"marked": {
- "version": "4.2.5",
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.5.tgz",
- "integrity": "sha512-jPueVhumq7idETHkb203WDD4fMA3yV9emQ5vLwop58lu8bTclMghBWcYAavlDqIEMaisADinV1TooIFCfqOsYQ==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
+ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"dev": true
},
"mcl-wasm": {
@@ -23619,11 +23656,12 @@
"dev": true
},
"shiki": {
- "version": "0.12.1",
- "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.12.1.tgz",
- "integrity": "sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==",
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz",
+ "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==",
"dev": true,
"requires": {
+ "ansi-sequence-parser": "^1.1.0",
"jsonc-parser": "^3.2.0",
"vscode-oniguruma": "^1.7.0",
"vscode-textmate": "^8.0.0"
@@ -24531,15 +24569,15 @@
}
},
"typedoc": {
- "version": "0.23.24",
- "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.24.tgz",
- "integrity": "sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==",
+ "version": "0.24.6",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz",
+ "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==",
"dev": true,
"requires": {
"lunr": "^2.3.9",
- "marked": "^4.2.5",
- "minimatch": "^5.1.2",
- "shiki": "^0.12.1"
+ "marked": "^4.3.0",
+ "minimatch": "^9.0.0",
+ "shiki": "^0.14.1"
},
"dependencies": {
"brace-expansion": {
@@ -24552,9 +24590,9 @@
}
},
"minimatch": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
- "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz",
+ "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
@@ -24563,9 +24601,9 @@
}
},
"typescript": {
- "version": "4.9.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
- "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw=="
},
"uglify-js": {
"version": "3.17.4",
diff --git a/packages/lib-sourcify/package.json b/packages/lib-sourcify/package.json
index 32f1e9771..18a747232 100644
--- a/packages/lib-sourcify/package.json
+++ b/packages/lib-sourcify/package.json
@@ -88,7 +88,7 @@
"prettier": "^2.8.2",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
- "typedoc": "^0.23.24",
+ "typedoc": "^0.24.6",
"typescript": "^5.0.4"
},
"files": [
From b84e466eb2db77bce5360dff4cf439618669c5e7 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Wed, 3 May 2023 16:50:33 +0200
Subject: [PATCH 33/48] Handle libraries with call protection (#1000)
* #996 handle libraries with call protection
* #996 add tests for call protection
* legacy compilation placeholder test case
* via-IR test case
---
packages/lib-sourcify/src/lib/verification.ts | 21 ++++++++++
.../CallProtectionForLibraries/artifact.json | 4 ++
.../CallProtectionForLibraries/metadata.json | 27 +++++++++++++
.../sources/Ballot.sol | 7 ++++
.../artifact.json | 4 ++
.../metadata.json | 28 +++++++++++++
.../sources/Ballot.sol | 7 ++++
.../lib-sourcify/test/verification.spec.ts | 40 +++++++++++++++++++
8 files changed, 138 insertions(+)
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibraries/artifact.json
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibraries/metadata.json
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibraries/sources/Ballot.sol
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/artifact.json
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/metadata.json
create mode 100644 packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/sources/Ballot.sol
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index 8ff15b931..bd70d8dbd 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -237,6 +237,13 @@ export function matchWithDeployedBytecode(
deployedBytecode: string,
immutableReferences?: any
) {
+ // Check if is a library with call protection
+ // See https://docs.soliditylang.org/en/v0.8.19/contracts.html#call-protection-for-libraries
+ recompiledDeployedBytecode = checkCallProtectionAndReplaceAddress(
+ recompiledDeployedBytecode,
+ deployedBytecode
+ );
+
// Replace the library placeholders in the recompiled bytecode with values from the deployed bytecode
const { replaced, libraryMap } = addLibraryAddresses(
recompiledDeployedBytecode,
@@ -506,6 +513,20 @@ export function addLibraryAddresses(
};
}
+export function checkCallProtectionAndReplaceAddress(
+ template: string,
+ real: string
+): string {
+ const push20CodeOp = '73';
+ const callProtection = `0x${push20CodeOp}${'00'.repeat(20)}`;
+
+ if (template.startsWith(callProtection)) {
+ const replacedCallProtection = real.slice(0, 0 + callProtection.length);
+ return replacedCallProtection + template.substring(callProtection.length);
+ }
+ return template;
+}
+
/**
* Replaces the values of the immutable variables in the (onchain) deployed bytecode with zeros, so that the bytecode can be compared with the (offchain) recompiled bytecode.
* Example immutableReferences: {"97":[{"length":32,"start":137}],"99":[{"length":32,"start":421}]} where 97 and 99 are the AST ids
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibraries/artifact.json b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/artifact.json
new file mode 100644
index 000000000..a14553168
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/artifact.json
@@ -0,0 +1,4 @@
+{
+ "abi": [],
+ "bytecode": "0x60bd610039600b82828239805160001a60731461002c57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063fe073d11146038575b600080fd5b818015604357600080fd5b50604a604c565b005b60006057600182605b565b5050565b60ff8181168382160190811115608157634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122026efb28b74c882aa2f1f86cbe51d40fba727849fa6113630f5c12c98c1a9eb9b64736f6c63430008130033"
+}
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibraries/metadata.json b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/metadata.json
new file mode 100644
index 000000000..2fb60e9be
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/metadata.json
@@ -0,0 +1,27 @@
+{
+ "compiler": { "version": "0.8.19+commit.7dd6d404" },
+ "language": "Solidity",
+ "output": {
+ "abi": [],
+ "devdoc": { "kind": "dev", "methods": {}, "version": 1 },
+ "userdoc": { "kind": "user", "methods": {}, "version": 1 }
+ },
+ "settings": {
+ "compilationTarget": { "Ballot.sol": "Ballot" },
+ "evmVersion": "paris",
+ "libraries": {},
+ "metadata": { "bytecodeHash": "ipfs" },
+ "optimizer": { "enabled": true, "runs": 200 },
+ "remappings": []
+ },
+ "sources": {
+ "Ballot.sol": {
+ "keccak256": "0x21d251aa06c7fcbb362bca4b1645ef4fbc3d0844f6774f4598588f9045fdfe97",
+ "urls": [
+ "bzz-raw://7464b55b34107bd79040fa11eed489e2d20bde5e15b801e2ba144d7bd10bbeca",
+ "dweb:/ipfs/Qmbrd7Up3r6Q5JA9NMvZZawsJ5EuuoFfRuMBEjAYk7oDod"
+ ]
+ }
+ },
+ "version": 1
+}
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibraries/sources/Ballot.sol b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/sources/Ballot.sol
new file mode 100644
index 000000000..8714a01b0
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibraries/sources/Ballot.sol
@@ -0,0 +1,7 @@
+pragma solidity 0.8.19;
+library Ballot {
+ function giveRightToVote() public {
+ uint8 tempnumber = 0;
+ tempnumber += 1;
+ }
+}
\ No newline at end of file
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/artifact.json b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/artifact.json
new file mode 100644
index 000000000..f7c1d4fb5
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/artifact.json
@@ -0,0 +1,4 @@
+{
+ "abi": [],
+ "bytecode": "0x60808060405234601a57608d90816100208239308160240152f35b600080fdfe6004361015600c57600080fd5b6000803560e01c63fe073d1114602157600080fd5b307f0000000000000000000000000000000000000000000000000000000000000000146054578060031936011260545780f35b80fdfea26469706673582212201104b959cf92e8eead2cb6513fe1d88ee97c7b264a0dea0bd7ccaffd488db72764736f6c63430008130033"
+}
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/metadata.json b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/metadata.json
new file mode 100644
index 000000000..14d67f26e
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/metadata.json
@@ -0,0 +1,28 @@
+{
+ "compiler": { "version": "0.8.19+commit.7dd6d404" },
+ "language": "Solidity",
+ "output": {
+ "abi": [],
+ "devdoc": { "kind": "dev", "methods": {}, "version": 1 },
+ "userdoc": { "kind": "user", "methods": {}, "version": 1 }
+ },
+ "settings": {
+ "compilationTarget": { "Ballot.sol": "Ballot" },
+ "evmVersion": "paris",
+ "libraries": {},
+ "metadata": { "bytecodeHash": "ipfs" },
+ "optimizer": { "enabled": true, "runs": 200 },
+ "remappings": [],
+ "viaIR": true
+ },
+ "sources": {
+ "Ballot.sol": {
+ "keccak256": "0x21d251aa06c7fcbb362bca4b1645ef4fbc3d0844f6774f4598588f9045fdfe97",
+ "urls": [
+ "bzz-raw://7464b55b34107bd79040fa11eed489e2d20bde5e15b801e2ba144d7bd10bbeca",
+ "dweb:/ipfs/Qmbrd7Up3r6Q5JA9NMvZZawsJ5EuuoFfRuMBEjAYk7oDod"
+ ]
+ }
+ },
+ "version": 1
+}
diff --git a/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/sources/Ballot.sol b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/sources/Ballot.sol
new file mode 100644
index 000000000..8714a01b0
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/CallProtectionForLibrariesViaIR/sources/Ballot.sol
@@ -0,0 +1,7 @@
+pragma solidity 0.8.19;
+library Ballot {
+ function giveRightToVote() public {
+ uint8 tempnumber = 0;
+ tempnumber += 1;
+ }
+}
\ No newline at end of file
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index 8a3675638..d7f400ca8 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -398,6 +398,46 @@ describe('lib-sourcify tests', () => {
);
expectMatch(match, 'perfect', deployedAddress);
});
+
+ it('should fully verify a library with call protection when viaIR is disabled (legacy compilation placeholder: 0x73 plus 20 zero bytes)', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'CallProtectionForLibraries'
+ );
+ const [deployedAddress] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0]
+ );
+
+ const match = await checkAndVerifyDeployed(
+ contractFolderPath,
+ sourcifyChainGanache,
+ deployedAddress
+ );
+ expectMatch(match, 'perfect', deployedAddress);
+ });
+
+ it('should fully verify a library with call protection when viaIR is enabled', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'CallProtectionForLibrariesViaIR'
+ );
+ const [deployedAddress] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0]
+ );
+
+ const match = await checkAndVerifyDeployed(
+ contractFolderPath,
+ sourcifyChainGanache,
+ deployedAddress
+ );
+ expectMatch(match, 'perfect', deployedAddress);
+ });
});
describe('Unit tests', function () {
From 425438d1737050034ea0c7a74d7898c782084f91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Thu, 27 Apr 2023 15:51:15 +0200
Subject: [PATCH 34/48] Add "Lookup Another" button in Lookup result
---
ui/src/pages/Lookup/Result.tsx | 16 ++++++++++++----
ui/src/pages/Lookup/index.tsx | 2 +-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ui/src/pages/Lookup/Result.tsx b/ui/src/pages/Lookup/Result.tsx
index ce2c66ab7..0e14f0643 100644
--- a/ui/src/pages/Lookup/Result.tsx
+++ b/ui/src/pages/Lookup/Result.tsx
@@ -49,9 +49,11 @@ type NetworkRowProp = {
};
type FoundProp = {
response: CheckAllByAddressResult;
+ goBack: () => void;
};
type NotFoundProp = {
address: any;
+ goBack: () => void;
};
type MatchStatusProps = {
@@ -268,7 +270,7 @@ const Create2Info = (response: CheckAllByAddressResult) => {
);
};
-const Found = ({ response }: FoundProp) => {
+const Found = ({ response, goBack }: FoundProp) => {
const chains = response?.chainIds.filter((chain) => chain.chainId !== "0");
const isCreate2Verified =
response?.chainIds.findIndex((chain) => chain.chainId === "0") >= 0;
@@ -325,12 +327,15 @@ const Found = ({ response }: FoundProp) => {
Verify Contract
+
+ Lookup Another
+
);
};
-const NotFound = ({ address }: NotFoundProp) => {
+const NotFound = ({ address, goBack }: NotFoundProp) => {
return (
<>
@@ -344,6 +349,9 @@ const NotFound = ({ address }: NotFoundProp) => {
Verify Contract
+
+ Lookup Another
+
>
);
@@ -366,9 +374,9 @@ const Result = ({ response, goBack }: ResultProp) => {
{verificationIcon(response?.status)}
{!!response && response?.status !== "false" ? (
-
+
) : (
-
+
)}
diff --git a/ui/src/pages/Lookup/index.tsx b/ui/src/pages/Lookup/index.tsx
index f36c4841d..e7c9d040d 100644
--- a/ui/src/pages/Lookup/index.tsx
+++ b/ui/src/pages/Lookup/index.tsx
@@ -45,7 +45,7 @@ const Lookup = () => {
}
};
- const goBack = async () => {
+ const goBack = () => {
setResponse(undefined);
navigate(`/lookup`);
};
From 52a18c0aa2d263257ef4ee171b141701e5bf4952 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 4 May 2023 10:39:29 +0200
Subject: [PATCH 35/48] Add nginx exporter for prometheus
---
environments/grafana.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/environments/grafana.yaml b/environments/grafana.yaml
index 565042106..400e1402e 100644
--- a/environments/grafana.yaml
+++ b/environments/grafana.yaml
@@ -92,3 +92,13 @@ services:
- "/:/host:ro,rslave"
networks:
- source-verify
+
+ nginx_exporter:
+ image: nginx/nginx-prometheus-exporter:0.10.0
+ container_name: grafana-nginx_exporter-${TAG}
+ command:
+ - -nginx.scrape-uri
+ - https://sourcify.dev/nginx_status
+ restart: unless-stopped
+ networks:
+ - source-verify
From da736892c46a5b330b834a87ca84ddf3d66f86d7 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 4 May 2023 11:09:40 +0200
Subject: [PATCH 36/48] improve the function to sanitize path at `storeSources`
---
src/server/services/RepositoryService.ts | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/server/services/RepositoryService.ts b/src/server/services/RepositoryService.ts
index 34628f113..ad1d67afe 100644
--- a/src/server/services/RepositoryService.ts
+++ b/src/server/services/RepositoryService.ts
@@ -631,8 +631,22 @@ export default class RepositoryService implements IRepositoryService {
}
// This needs to be removed at some point https://github.com/ethereum/sourcify/issues/515
private sanitizePath(originalPath: string): string {
- return originalPath
+ const parsedPath = path.parse(originalPath);
+ const sanitizedDir = parsedPath.dir
+ .split(path.sep)
+ .filter((segment) => segment !== "..")
+ .join(path.sep)
.replace(/[^a-z0-9_./-]/gim, "_")
.replace(/(^|\/)[.]+($|\/)/, "_");
+
+ // Force absolute paths to be relative
+ if (parsedPath.root) {
+ parsedPath.root = "";
+ parsedPath.dir = sanitizedDir.slice(parsedPath.root.length);
+ } else {
+ parsedPath.dir = sanitizedDir;
+ }
+
+ return path.format(parsedPath);
}
}
From f464ef6ce8a81256aeec44c30bf5d2eb9ce2e0f3 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Thu, 4 May 2023 15:01:39 +0200
Subject: [PATCH 37/48] #860 display the create2 repo link only for create2
results
---
ui/src/pages/Lookup/Result.tsx | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/ui/src/pages/Lookup/Result.tsx b/ui/src/pages/Lookup/Result.tsx
index 0e14f0643..df1b5e08c 100644
--- a/ui/src/pages/Lookup/Result.tsx
+++ b/ui/src/pages/Lookup/Result.tsx
@@ -295,13 +295,22 @@ const Found = ({ response, goBack }: FoundProp) => {
{isCreate2Verified && <>create2>} verified
- ,{" "}
-
- view in Sourcify Repository
-
+ {isCreate2Verified && (
+ <>
+ ,{" "}
+
+ view in Sourcify Repository
+
+ >
+ )}
{isCreate2Verified && Create2Info(response)}
{chains.length > 0 && on the following networks: }
From 086db748c2297349e53c5ffc0287b8e79cdd4d6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Fri, 5 May 2023 09:53:25 +0200
Subject: [PATCH 38/48] Fix abitype req. typescript v5+
Because the latest abitype package 0.8.2 requires typescript v5+ the
package installations were failing.
Updating typescript would break multiformat typings which
is used by ipfs-core. We can't upgrade ipfs-core
because the newer versions use ES modules, and the tests are in commonjs
Hence define abitype in exact lower version 0.8.0
---
package-lock.json | 356 +++++++++++++++++++++++++++-------------------
package.json | 2 +-
2 files changed, 214 insertions(+), 144 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 7808bcb8d..32c7c2865 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5295,6 +5295,12 @@
"node": ">=8"
}
},
+ "node_modules/ansi-sequence-parser": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz",
+ "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==",
+ "dev": true
+ },
"node_modules/ansi-styles": {
"version": "3.2.1",
"license": "MIT",
@@ -14152,6 +14158,12 @@
"node": ">=6"
}
},
+ "node_modules/jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
+ "dev": true
+ },
"node_modules/jsonfile": {
"version": "4.0.0",
"license": "MIT",
@@ -15079,6 +15091,12 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/lunr": {
+ "version": "2.3.9",
+ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
+ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
+ "dev": true
+ },
"node_modules/macos-release": {
"version": "2.5.0",
"dev": true,
@@ -15169,6 +15187,18 @@
"node": ">=0.10.0"
}
},
+ "node_modules/marked": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
+ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
+ "dev": true,
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/mcl-wasm": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz",
@@ -20377,6 +20407,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/shiki": {
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz",
+ "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-sequence-parser": "^1.1.0",
+ "jsonc-parser": "^3.2.0",
+ "vscode-oniguruma": "^1.7.0",
+ "vscode-textmate": "^8.0.0"
+ }
+ },
"node_modules/side-channel": {
"version": "1.0.4",
"license": "MIT",
@@ -22256,6 +22298,51 @@
"is-typedarray": "^1.0.0"
}
},
+ "node_modules/typedoc": {
+ "version": "0.24.6",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz",
+ "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==",
+ "dev": true,
+ "dependencies": {
+ "lunr": "^2.3.9",
+ "marked": "^4.3.0",
+ "minimatch": "^9.0.0",
+ "shiki": "^0.14.1"
+ },
+ "bin": {
+ "typedoc": "bin/typedoc"
+ },
+ "engines": {
+ "node": ">= 14.14"
+ },
+ "peerDependencies": {
+ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x"
+ }
+ },
+ "node_modules/typedoc/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/typedoc/node_modules/minimatch": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz",
+ "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/typescript": {
"version": "4.9.4",
"license": "Apache-2.0",
@@ -22756,6 +22843,18 @@
"extsprintf": "^1.2.0"
}
},
+ "node_modules/vscode-oniguruma": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
+ "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
+ "dev": true
+ },
+ "node_modules/vscode-textmate": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz",
+ "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==",
+ "dev": true
+ },
"node_modules/wcwidth": {
"version": "1.0.1",
"dev": true,
@@ -29465,8 +29564,8 @@
"prettier": "^2.8.2",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
- "typedoc": "^0.23.24",
- "typescript": "^4.9.4"
+ "typedoc": "^0.24.6",
+ "typescript": "^5.0.4"
},
"engines": {
"node": ">=10"
@@ -29612,6 +29711,20 @@
"node": ">=v14"
}
},
+ "packages/lib-sourcify/node_modules/@commitlint/load/node_modules/typescript": {
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "dev": true,
+ "optional": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
"packages/lib-sourcify/node_modules/@commitlint/resolve-extends": {
"version": "17.4.0",
"dev": true,
@@ -36254,11 +36367,6 @@
"version": "5.0.1",
"license": "ISC"
},
- "packages/lib-sourcify/node_modules/jsonc-parser": {
- "version": "3.2.0",
- "dev": true,
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/jsonfile": {
"version": "6.1.0",
"dev": true,
@@ -36520,11 +36628,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "packages/lib-sourcify/node_modules/lunr": {
- "version": "2.3.9",
- "dev": true,
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/make-dir": {
"version": "3.1.0",
"dev": true,
@@ -36563,17 +36666,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "packages/lib-sourcify/node_modules/marked": {
- "version": "4.2.12",
- "dev": true,
- "license": "MIT",
- "bin": {
- "marked": "bin/marked.js"
- },
- "engines": {
- "node": ">= 12"
- }
- },
"packages/lib-sourcify/node_modules/md5.js": {
"version": "1.3.5",
"license": "MIT",
@@ -38348,16 +38440,6 @@
"node": ">=8"
}
},
- "packages/lib-sourcify/node_modules/shiki": {
- "version": "0.12.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "jsonc-parser": "^3.2.0",
- "vscode-oniguruma": "^1.7.0",
- "vscode-textmate": "^8.0.0"
- }
- },
"packages/lib-sourcify/node_modules/side-channel": {
"version": "1.0.4",
"license": "MIT",
@@ -39369,55 +39451,17 @@
"is-typedarray": "^1.0.0"
}
},
- "packages/lib-sourcify/node_modules/typedoc": {
- "version": "0.23.24",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "lunr": "^2.3.9",
- "marked": "^4.2.5",
- "minimatch": "^5.1.2",
- "shiki": "^0.12.1"
- },
- "bin": {
- "typedoc": "bin/typedoc"
- },
- "engines": {
- "node": ">= 14.14"
- },
- "peerDependencies": {
- "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
- }
- },
- "packages/lib-sourcify/node_modules/typedoc/node_modules/brace-expansion": {
- "version": "2.0.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "packages/lib-sourcify/node_modules/typedoc/node_modules/minimatch": {
- "version": "5.1.4",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
"packages/lib-sourcify/node_modules/typescript": {
- "version": "4.9.4",
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
"dev": true,
- "license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=12.20"
}
},
"packages/lib-sourcify/node_modules/uglify-js": {
@@ -39570,16 +39614,6 @@
"version": "1.0.2",
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/vscode-oniguruma": {
- "version": "1.7.0",
- "dev": true,
- "license": "MIT"
- },
- "packages/lib-sourcify/node_modules/vscode-textmate": {
- "version": "8.0.0",
- "dev": true,
- "license": "MIT"
- },
"packages/lib-sourcify/node_modules/vscode-uri": {
"version": "3.0.7",
"dev": true,
@@ -44050,8 +44084,8 @@
"solc": "^0.8.17",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
- "typedoc": "^0.23.24",
- "typescript": "^4.9.4",
+ "typedoc": "^0.24.6",
+ "typescript": "^5.0.4",
"web3": "^1.8.1",
"web3-utils": "^1.8.1"
},
@@ -44153,6 +44187,15 @@
"resolve-from": "^5.0.0",
"ts-node": "^10.8.1",
"typescript": "^4.6.4"
+ },
+ "dependencies": {
+ "typescript": {
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "dev": true,
+ "optional": true
+ }
}
},
"@commitlint/resolve-extends": {
@@ -51887,10 +51930,6 @@
"json-stringify-safe": {
"version": "5.0.1"
},
- "jsonc-parser": {
- "version": "3.2.0",
- "dev": true
- },
"jsonfile": {
"version": "6.1.0",
"dev": true,
@@ -52073,10 +52112,6 @@
"lowercase-keys": {
"version": "3.0.0"
},
- "lunr": {
- "version": "2.3.9",
- "dev": true
- },
"make-dir": {
"version": "3.1.0",
"dev": true,
@@ -52098,10 +52133,6 @@
"version": "4.3.0",
"dev": true
},
- "marked": {
- "version": "4.2.12",
- "dev": true
- },
"md5.js": {
"version": "1.3.5",
"requires": {
@@ -53205,15 +53236,6 @@
"version": "3.0.0",
"dev": true
},
- "shiki": {
- "version": "0.12.1",
- "dev": true,
- "requires": {
- "jsonc-parser": "^3.2.0",
- "vscode-oniguruma": "^1.7.0",
- "vscode-textmate": "^8.0.0"
- }
- },
"side-channel": {
"version": "1.0.4",
"requires": {
@@ -53841,34 +53863,10 @@
"is-typedarray": "^1.0.0"
}
},
- "typedoc": {
- "version": "0.23.24",
- "dev": true,
- "requires": {
- "lunr": "^2.3.9",
- "marked": "^4.2.5",
- "minimatch": "^5.1.2",
- "shiki": "^0.12.1"
- },
- "dependencies": {
- "brace-expansion": {
- "version": "2.0.1",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0"
- }
- },
- "minimatch": {
- "version": "5.1.4",
- "dev": true,
- "requires": {
- "brace-expansion": "^2.0.1"
- }
- }
- }
- },
"typescript": {
- "version": "4.9.4",
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
"dev": true
},
"uglify-js": {
@@ -53972,14 +53970,6 @@
}
}
},
- "vscode-oniguruma": {
- "version": "1.7.0",
- "dev": true
- },
- "vscode-textmate": {
- "version": "8.0.0",
- "dev": true
- },
"vscode-uri": {
"version": "3.0.7",
"dev": true
@@ -57938,6 +57928,12 @@
"version": "5.0.1",
"dev": true
},
+ "ansi-sequence-parser": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz",
+ "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==",
+ "dev": true
+ },
"ansi-styles": {
"version": "3.2.1",
"requires": {
@@ -64125,6 +64121,12 @@
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true
},
+ "jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
+ "dev": true
+ },
"jsonfile": {
"version": "4.0.0",
"requires": {
@@ -64841,6 +64843,12 @@
"version": "2.2.1",
"dev": true
},
+ "lunr": {
+ "version": "2.3.9",
+ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
+ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
+ "dev": true
+ },
"macos-release": {
"version": "2.5.0",
"dev": true
@@ -64900,6 +64908,12 @@
"object-visit": "^1.0.0"
}
},
+ "marked": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
+ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
+ "dev": true
+ },
"mcl-wasm": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz",
@@ -68430,6 +68444,18 @@
"integrity": "sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ==",
"dev": true
},
+ "shiki": {
+ "version": "0.14.2",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz",
+ "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==",
+ "dev": true,
+ "requires": {
+ "ansi-sequence-parser": "^1.1.0",
+ "jsonc-parser": "^3.2.0",
+ "vscode-oniguruma": "^1.7.0",
+ "vscode-textmate": "^8.0.0"
+ }
+ },
"side-channel": {
"version": "1.0.4",
"requires": {
@@ -69723,6 +69749,38 @@
"is-typedarray": "^1.0.0"
}
},
+ "typedoc": {
+ "version": "0.24.6",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz",
+ "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==",
+ "dev": true,
+ "requires": {
+ "lunr": "^2.3.9",
+ "marked": "^4.3.0",
+ "minimatch": "^9.0.0",
+ "shiki": "^0.14.1"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz",
+ "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ }
+ }
+ },
"typescript": {
"version": "4.9.4"
},
@@ -70048,6 +70106,18 @@
"extsprintf": "^1.2.0"
}
},
+ "vscode-oniguruma": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
+ "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
+ "dev": true
+ },
+ "vscode-textmate": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz",
+ "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==",
+ "dev": true
+ },
"wcwidth": {
"version": "1.0.1",
"dev": true,
diff --git a/package.json b/package.json
index 9de768026..8b44745b6 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"@ethereum-sourcify/bytecode-utils": "*",
"@ethereum-sourcify/lib-sourcify": "*",
"@types/node-fetch": "^2.5.7",
- "abitype": "^0.8.0",
+ "abitype": "0.8.0",
"bunyan": "^1.8.12",
"commander": "^9.0.0",
"cors": "^2.8.5",
From 4f10145fd1fc4c0f4a8abf6c93e4edaa8b065707 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Fri, 5 May 2023 12:07:05 +0200
Subject: [PATCH 39/48] Show error on bad Etherscan req
---
scripts/find_replace.sh | 3 ++-
src/server/controllers/VerificationController-util.ts | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/scripts/find_replace.sh b/scripts/find_replace.sh
index 7d5d76f00..e31a6441a 100755
--- a/scripts/find_replace.sh
+++ b/scripts/find_replace.sh
@@ -76,7 +76,8 @@ do
echo "find_repace.sh: replacing $VAR_NAME"
VAR_VAL=$(eval "echo \${$VAR_NAME}")
# Use @ as delimiter instead of / as values may contain / but @ is unlikely
- sed -i "s@${VAR_NAME}=xxx@${VAR_NAME}=${VAR_VAL}@g" ../environments/.env.$TAG
+ # sed on MacOS has different syntax. Install "gsed" with brew install gnu-sed and replace when developing on MacOS
+ gsed -i "s@${VAR_NAME}=xxx@${VAR_NAME}=${VAR_VAL}@g" ../environments/.env.$TAG
done
cp ../environments/.env.$TAG ../environments/.env
diff --git a/src/server/controllers/VerificationController-util.ts b/src/server/controllers/VerificationController-util.ts
index e9a63aad9..b4411c488 100644
--- a/src/server/controllers/VerificationController-util.ts
+++ b/src/server/controllers/VerificationController-util.ts
@@ -567,6 +567,12 @@ export const processRequestFromEtherscan = async (
) {
throw new BadRequestError("Etherscan API rate limit reached, try later");
}
+
+ if (resultJson.message === "NOTOK") {
+ throw new BadRequestError(
+ "Error in Etherscan API response. Result message: " + resultJson.message
+ );
+ }
if (resultJson.result[0].SourceCode === "") {
throw new BadRequestError("This contract is not verified on Etherscan");
}
From e2c92d911e47a4ebf7eec03df200c74d77735039 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Fri, 5 May 2023 12:33:14 +0200
Subject: [PATCH 40/48] Change OPTIMISTIC_ETHERSCAN to OPTIMISMSCAN
The overlap of the "ETHERSCAN_API_KEY" in both
"OPTIMISTIC_ETHERSCAN_API_KEY" and
"ETHERSCAN_API_KEY" was causing `sed` string replacement to behave
unexpectedly, causing the Optimism key to be set as ETHERSCAN_API_KEY
Change name to avoid this.
---
environments/.env.dev | 2 +-
environments/.env.latest | 2 +-
environments/.env.secrets.gpg | Bin 2689 -> 2682 bytes
environments/.env.stable | 2 +-
scripts/find_replace.sh | 6 +++---
src/config.ts | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/environments/.env.dev b/environments/.env.dev
index aaae137c3..397e7e275 100644
--- a/environments/.env.dev
+++ b/environments/.env.dev
@@ -79,7 +79,7 @@ MOONSCAN_MOONBEAM_API_KEY=
MOONSCAN_MOONRIVER_API_KEY=
BOBASCAN_API_KEY=
GNOSISSCAN_API_KEY=
-OPTIMISTIC_ETHERSCAN_API_KEY=
+OPTIMISMSCAN_API_KEY=
# Needed to call create2 APIs, format is: TOKEN1,TOKEN2,...
CREATE2_CLIENT_TOKENS=
diff --git a/environments/.env.latest b/environments/.env.latest
index 789eaf4dc..05d34d5e5 100644
--- a/environments/.env.latest
+++ b/environments/.env.latest
@@ -78,7 +78,7 @@ MOONSCAN_MOONBEAM_API_KEY=xxx
MOONSCAN_MOONRIVER_API_KEY=xxx
BOBASCAN_API_KEY=xxx
GNOSISSCAN_API_KEY=xxx
-OPTIMISTIC_ETHERSCAN_API_KEY=xxx
+OPTIMISMSCAN_API_KEY=xxx
CREATE2_CLIENT_TOKENS=xxx
diff --git a/environments/.env.secrets.gpg b/environments/.env.secrets.gpg
index 41e9268d4c0d282273b0a2781bf2a48ff5b91dd4..075fad5033afd35ccae47f37f9b4451732b831b5 100644
GIT binary patch
literal 2682
zcmV-=3WfEI4Fm}T0zjyNub7?42K&Wl9pq+zeKi+%c
z>14n17!yP^vtFdA%Q8&{b%WGf+mIadq8BzZ*I^RZA*KRoMK1Aelv;s$#ZIuI;
z-d{neyDSMWm0SIF5)o33FVJ17Dqitt8mo(<4Ucdutv(Y8^1Z|@dQ;PJOf4B!s02ZK(cxD&v2&o7iR+tTtJz;{9=P7R$NmExUUSGia77(~X6j
z!EGjkGOmctO%|Wa+AnlYv>|t~YhXxe^;3mj!z0TFPLsP2&IaL`&tvSaHK3%b);q1M
zs}umL|JP@5#SK#9X;TVF?BXZjM@MeOg0Od?gwgl2Xqnk7UkR%T`68DUa@rv$5$_O_
zeyv|0VS%iF4wF2tc`c-a{^c;O85H%Xm{Ak)2_-Y!W^-)!j4n|w@cG}|t$S(f_|>L8
zhr#{T_!@g;{Koq975lQ#B8Aq@V$r+uaS!jD+Q)Q(4AQax!-O(oTfA{xl&Eu5HOf^L
z+DVL9Vt{$o1w19>yKio|jdkYlIl^Op09c;^9D=0`*=>!S6ZB!nGdVD-<)YX_UW0IZ
z?Jpx+^qH($K{8=og>mMCSP&@Vpy@axs180EyT>f18Dx;^SpY}RiReu}5b|O2;>3x%
z)0xJ6DUGAnIVy>zHDJkG
z{2zpdqjZSQ==!P8)7%fXZ=7_6vkE55<+nL39(;MyCT`P=9|EiUu)LDE;~9SM-Ffag
zd1o$VU-5-2^L2*ASO^Y`0n9CMQnH=E$|6b{n&rdffa(ZnU~yh%GBdhQ$-s|@O%Be)zLfIp7gb=6A`cua_KDH$bxe6=p(Pzw@W~sjVD&&$lS1^raF!)IJ
z9dKsNuZx&nn>`=MV3;QPF;yni+T1!%%AkMkzF7UsNZ`wT(VYveceQyl-4DdW#<7=g
z$N~3K!I^7Q>ZBF{H>IgNSDkDkzK=+070f3`OwK#wVN?^aoBbl_ehJkZ>=p%3;0LyRah|XQBMp#<+~quIqpR+>wXk@_o{s*^pduWu
zHSw|b8Uj=3vFjQY+l0bXZ!v$2-8J08m(@n;Nub$w={&N9lF4CPN?RQ^nNVUv`qb(&
zUrLHx`LqpFlMcfUHKqml{bO+s%W-PL9J)12%O%-@$k`SM*hF|i+U#hFk(#qje53Hg
z6U)xoXXt!y#Gn|q9R;z}s3F2D3*`vj+<_JYC{(-ju`;fjw@x=b@fFr5PAWH${|y31
z&;vaK)!Jf7K6BGOiVmMsD{o^a44EFIK=Wrd?@40o30sbdj+@<5uxj-uT
zC@{ra9)oa9(XZM<`2POT(&j20S5sgzrW5~@j{^}9E%tjLGWU$;aRl(%YPz2xOT9
zw;Sycyqi=XT_54|=k6mGO;5Ss5wv=qv(N&y2{cfk+N$l>T;erBoK~vrAa!3{niO;5
zk}tKRRs5Xv>_!RDW&&%Y%MZA;f1(f+4VSIq=K~?Y=M@_!#JWHSPD`~H+h^;xu9=sV
z_!tXF)B_C@1x^#+AOmiP$@jC_dre2{3~j{4qft0|)yw$qdx|ZJQczC11*?g>G>3gy
zT}~&Qh~)4^T&vs+A_U@5>#hlrqI#z
zGg*FH+M}464qfk~*;&OjWT($$lv7pgoN!hug;g+j9Ka?{V5%$aERd}g4Z9)
zGNIv%UfPrwQ56#R|JfJB%{~oYjz(ryT1l69EkjiZdF0rDJ)2~25SrT6ZE9+lO0pxo
zA$SkfFDfYR3#UeHa@<|XPEbv2n0I^y`>+ekx9$mSUA7n$RkSM$GF;p;^X7Jkn3Tz-
zdRBE=lnRlQ*A1xqh#;?#^@5(SFT#c+lL@gcPm{j~tsnMSQ}xJz4Q1P~+_>~m{|-gg
z$MaX)PL?8ZXNH`-yD70=RkAZRu?9%0n>MT`1LP4IY@BrzUZ;7m}h#Qy!GG{>}XDtQ#IHqLp
z`VSo9b5x!IGitymyy0SuB}tr>x;=IQLZbR?Pv88~;p$i3ET)73O2d8#rwx5?PMQz5
zRj}3)&n5~jaXq=$*fLYb$4>$zzvsfWT4l)IDF9cE2t-5~M_tTV&~x|^o9qFE!Ny$E
zv4rWXDIn!gV6qVompg|9dX$}K7uJ4Utddk
z210wwn(n%okQuFEbska;@YL7z%=+;XEceixz+(%VW0YMKfMuj7(B$M~7&iq*
z>0Q>F(t^u=D|Hdz?y}L=Uh9LCrIC}nCctShqV)~yK6ZopY5Rh-Hvt;1kdz}zrk%^X
zRENrk-Lf2dar^+Z;mN}gY2p)SaXw`aHT(SO1jI*0rrw_`fDUG?A_f}k)9&d4#_C2~
z*@lQXaM}*>9o*k|h~mEzJt@>uhb1lJjtX;2bD&;bg)@($*F9dwKZoZMp6ORH8heCk
odE&*%s5)3*JK~&~HBt=qCORk41=WB>pF
literal 2689
zcmV-{3V!vB4Fm}T0>3&gXtjHP*!$Az0c8aLQeEu0X4Y7LOe=sCL~m=EJl5;s?u@vQ&I
zb!t1>N7%_5aJw6yS(3C=sMUB}$>pspIxTMQQCrbBu
zy=$@CE^33{B0iY!j@@F$9tA`%T)bQz=ag5_(?vO=_Um_+pWJL7pUS7pAssoG^y7L26?WVn$1HTSo=>a8`;UrR6z;@3q$BG})cEP}?PAVlMqE>&l>
zet(1^oKY_E9>qKPq6FFXp#aRj!q;a%a~Tz>Mll^TLtSJ~hUwZ{7IjAnN#l-y#+r7&
z-kGu}>hzhYcMXhIhk|MDwDbOBo164}YQOTdN{cd^2<)Mw;(ekAT$S7VrRE
zXmMm$Qb%n;@RKhq^}SK+@hWU-uRl#-tQJ2z*Rl&2dHc05GHr!byk=bh>^PHww^tl3(>}9NBjl$oT=;|Fm=*VZ1M*ls
zC~i52L3lSM^@;#6eQU###^-Auu|ln4%zpvWk+dOF3ENTNTBB{ZQX>s5XbdZe032m!
zN?BoAOGV?*pS2_ftQtwNL+`s34@+e?jE
zJ3T3w5$*gWi}WBT5q+WKf9uD?sjNmhs&6a&XRjj
zVc^oPwquNfv|`Mi)V}=5$~bx##d>z;hfl8gQq43|9^!bNPKh-MPQ;VXvY^7xI_5a5U=6inZvuw0EUO-nUoDDeCrK3SXP=|PTB~XHRusT{
zLJzR1)#1I=KfGM+7j0Z6dTK@m6n-^2OmsWMqS#UQ-_b9|eqMk<54yh5mJCD`l9*w_
z(~pzyVvV8}x!HJ*Z$&Z}*p*3g*@kgNiggQQPYs)K#D-G6e^*V?L+9)WIBmNvXfE;9
zCR`4U(H(>zrY3Ms)Kk|A%3EB`|TK*Br3-=1RXHb!}VfQ4~e#K0`HDXdU9h*VB
zbpAHFdTe?fvR1N|V;EggBk^U|44B+}=fH0JQ|Ll)=BnUQs{)#URDsKKF^*B|bwps<
z6qH6Yw1y7X5fcnq>IafO(SbTT8HSg`f+S=9pHUGrVvRVj|41aK8=W&LFFveI#~guk
zVGHH5t*+b1O=jlcJVa&*t!n1SBN9(zOjmt|W)OSGXt}pDD0T$-!}o$A9p?`zp`Og#k4OiZ%j+K`Pu2QLDL1-Zn53{?6_oSP8z#T=I`de
zxWKIYL#}xvg_C*9CHT=c#Q-lR6o?)q_&~yU3q>p)h^2g!u@&n?^fk5+=z%s61Jlng
z%+Fb%%Ar@GeMuP7Bi{G8mm(z>tHg&s@kLDWqi7@2LaUOG9s|n}2*PK8C=dQj*m@~Y
zSO2_M9MLr4(H&Bb=(o!`b~woPYm_z(9uFvZv{u<&i%iaht?5QBMs(4Ol2(A-08=)(
zPfO?d2qr_(d{496e!T7HO@gEmW00yI>wll^mCR^b9~Rw}_{AY0kNiyGQ|U#CM1oKA
zHv2h2nm@BC+Cos1)e!P%CQik(m~FQSfdd(n3Tg@ysKFVP;0W!sn`iqNcntrN$LlG%
zZrmg3NgCKu)HY8{zKO>0;c)x}?^tHcqS6)wkP}H^ILrF+XYTuxn}WO$L3EH*r%mxz
zh^8-xXm{!4v`+i>Clk*`5@1F;mgA~e)snCZm?@)3bE`ce)}##Tyk(8?pM4tRb_Avu_3lX&W+|ekv!GEhv*F{cl#fVns
z9->ls4QzH`q(~@{Md1M3=h0U~Iex9PSRZQ^g|`jr`+Fl^sYl-%;Y@&4KN46d_I*0g
zKXdxWr-YQ(7r)-G*8shsc%}$NsM@4okka8464t5k%X6A#YU97gw{%wkGe&h8iVrs<
zwSR~k#kt_`5Emz>iAmTzr}7OK*=w(Zt2C9X=H++a{~Kh+JcV+zKI*Hhd6Ua(r$4Y=go{;|6)3S!z_*
zUkKD>eQ45rD>f#LdjMs_bO8vbyo&8WeDboFQW3@X;ELflLhWKsbVly^Ao?X-!UJ$N
viL2-k{?!j}V`F_^+o@np#fE83tml;bu>s|mlzjC@j>b@}wX`oPqm76RzVaox
diff --git a/environments/.env.stable b/environments/.env.stable
index e9ef447aa..34200569e 100644
--- a/environments/.env.stable
+++ b/environments/.env.stable
@@ -76,7 +76,7 @@ MOONSCAN_MOONBEAM_API_KEY=xxx
MOONSCAN_MOONRIVER_API_KEY=xxx
BOBASCAN_API_KEY=xxx
GNOSISSCAN_API_KEY=xxx
-OPTIMISTIC_ETHERSCAN_API_KEY=xxx
+OPTIMISMSCAN_API_KEY=xxx
CREATE2_CLIENT_TOKENS=xxx
diff --git a/scripts/find_replace.sh b/scripts/find_replace.sh
index e31a6441a..e2bef1c49 100755
--- a/scripts/find_replace.sh
+++ b/scripts/find_replace.sh
@@ -38,7 +38,7 @@ if [ "$CIRCLE_BRANCH" == "staging" ]; then
MOONSCAN_MOONRIVER_API_KEY=$MOONSCAN_MOONRIVER_API_KEY_STAGING
BOBASCAN_API_KEY=$BOBASCAN_API_KEY_STAGING
GNOSISSCAN_API_KEY=$GNOSISSCAN_API_KEY_STAGING
- OPTIMISTIC_ETHERSCAN_API_KEY=$OPTIMISTIC_ETHERSCAN_API_KEY_STAGING
+ OPTIMISMSCAN_API_KEY=$OPTIMISMSCAN_API_KEY_STAGING
fi
if [ "$CIRCLE_BRANCH" == "master" ]; then
@@ -68,10 +68,10 @@ if [ "$CIRCLE_BRANCH" == "master" ]; then
MOONSCAN_MOONRIVER_API_KEY=$MOONSCAN_MOONRIVER_API_KEY_MASTER
BOBASCAN_API_KEY=$BOBASCAN_API_KEY_MASTER
GNOSISSCAN_API_KEY=$GNOSISSCAN_API_KEY_MASTER
- OPTIMISTIC_ETHERSCAN_API_KEY=$OPTIMISTIC_ETHERSCAN_API_KEY_MASTER
+ OPTIMISMSCAN_API_KEY=$OPTIMISMSCAN_API_KEY_MASTER
fi
-for VAR_NAME in INFURA_ID ALCHEMY_ID AWS_S3_ACCESS_KEY_ID AWS_S3_SECRET_ACCESS_KEY IPFS_SECRET NPM_TOKEN PUBLIC_IP LOCAL_IP SESSION_SECRET ALCHEMY_ID_OPTIMISM ALCHEMY_ID_ARBITRUM CHAINSAFE_S3_ACCESS_KEY_ID CHAINSAFE_S3_SECRET_ACCESS_KEY ESTUARY_PINNING_SECRET WEB3_STORAGE_PINNING_SECRET CREATE2_CLIENT_TOKENS GRAFANA_HTTP_USER GRAFANA_HTTP_PASS ETHERSCAN_API_KEY ARBISCAN_API_KEY POLYGONSCAN_API_KEY BSCSCAN_API_KEY SNOWTRACE_API_KEY CELOSCAN_API_KEY MOONSCAN_MOONBEAM_API_KEY MOONSCAN_MOONRIVER_API_KEY BOBASCAN_API_KEY GNOSISSCAN_API_KEY OPTIMISTIC_ETHERSCAN_API_KEY
+for VAR_NAME in INFURA_ID ALCHEMY_ID AWS_S3_ACCESS_KEY_ID AWS_S3_SECRET_ACCESS_KEY IPFS_SECRET NPM_TOKEN PUBLIC_IP LOCAL_IP SESSION_SECRET ALCHEMY_ID_OPTIMISM ALCHEMY_ID_ARBITRUM CHAINSAFE_S3_ACCESS_KEY_ID CHAINSAFE_S3_SECRET_ACCESS_KEY ESTUARY_PINNING_SECRET WEB3_STORAGE_PINNING_SECRET CREATE2_CLIENT_TOKENS GRAFANA_HTTP_USER GRAFANA_HTTP_PASS ETHERSCAN_API_KEY ARBISCAN_API_KEY POLYGONSCAN_API_KEY BSCSCAN_API_KEY SNOWTRACE_API_KEY CELOSCAN_API_KEY MOONSCAN_MOONBEAM_API_KEY MOONSCAN_MOONRIVER_API_KEY BOBASCAN_API_KEY GNOSISSCAN_API_KEY OPTIMISMSCAN_API_KEY
do
echo "find_repace.sh: replacing $VAR_NAME"
VAR_VAL=$(eval "echo \${$VAR_NAME}")
diff --git a/src/config.ts b/src/config.ts
index abfa62bfe..9e4ac0cae 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -80,11 +80,11 @@ export const etherscanAPIs: EtherscanAPIs = {
},
"10": {
apiURL: "https://api-optimistic.etherscan.io",
- apiKey: process.env.OPTIMISTIC_ETHERSCAN_API_KEY,
+ apiKey: process.env.OPTIMISMSCAN_API_KEY,
},
"420": {
apiURL: "https://api-goerli-optimism.etherscan.io",
- apiKey: process.env.OPTIMISTIC_ETHERSCAN_API_KEY,
+ apiKey: process.env.OPTIMISMSCAN_API_KEY,
},
"43114": {
apiURL: "https://api.snowtrace.io",
From f19e3546c0e998dabdae219b52c61e80c160909a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Fri, 5 May 2023 12:36:01 +0200
Subject: [PATCH 41/48] Revert accidentally setting `sed` to `gsed`
---
scripts/find_replace.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/find_replace.sh b/scripts/find_replace.sh
index e2bef1c49..a859276ad 100755
--- a/scripts/find_replace.sh
+++ b/scripts/find_replace.sh
@@ -77,7 +77,7 @@ do
VAR_VAL=$(eval "echo \${$VAR_NAME}")
# Use @ as delimiter instead of / as values may contain / but @ is unlikely
# sed on MacOS has different syntax. Install "gsed" with brew install gnu-sed and replace when developing on MacOS
- gsed -i "s@${VAR_NAME}=xxx@${VAR_NAME}=${VAR_VAL}@g" ../environments/.env.$TAG
+ sed -i "s@${VAR_NAME}=xxx@${VAR_NAME}=${VAR_VAL}@g" ../environments/.env.$TAG
done
cp ../environments/.env.$TAG ../environments/.env
From f9e74dc12deaddc0db97a4c263125fc9bd8821f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simon=20Vi=C3=A9not?=
Date: Mon, 8 May 2023 09:05:37 +0200
Subject: [PATCH 42/48] Add chain 295 (Hedera Mainnet) (#1009)
* Add chain details for 295 (Hedera Mainnet)
* Add test contracts for chain 295 (Hedera Mainnet)
* Change constructor argument to avoid any confusion with chainId.
* Attempt to reuse shared test contracts.
* Remove now unneeded directory for chain 295 test contracts.
---
package-lock.json | 132 +++++++++++++++++++++++++++++++++++++
src/sourcify-chains.ts | 6 ++
test/chains/chain-tests.js | 20 +++++-
3 files changed, 157 insertions(+), 1 deletion(-)
diff --git a/package-lock.json b/package-lock.json
index 32c7c2865..b0e24fc61 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34361,6 +34361,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/bn.js": {
"version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
+ "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34369,19 +34371,54 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/lru-cache": {
"version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
"dev": true,
"license": "MIT"
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/node": {
"version": "17.0.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
+ "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==",
"dev": true,
"license": "MIT"
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/seedrandom": {
"version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz",
+ "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==",
"dev": true,
"license": "MIT"
},
+ "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
+ "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "catering": "^2.1.0",
+ "is-buffer": "^2.0.5",
+ "level-supports": "^4.0.0",
+ "level-transcoder": "^1.0.1",
+ "module-error": "^1.0.1",
+ "queue-microtask": "^1.2.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
+ "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"packages/lib-sourcify/node_modules/ganache/node_modules/abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -34403,6 +34440,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/async": {
"version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34411,6 +34450,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/async-eventemitter": {
"version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz",
+ "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34475,6 +34516,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/bufferutil": {
"version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz",
+ "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -34527,6 +34570,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/emittery": {
"version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz",
+ "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -34658,6 +34703,20 @@
"node": ">=10"
}
},
+ "packages/lib-sourcify/node_modules/ganache/node_modules/level-transcoder": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
+ "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "module-error": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"packages/lib-sourcify/node_modules/ganache/node_modules/leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -34677,6 +34736,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/lodash": {
"version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
"license": "MIT"
},
@@ -34696,6 +34757,16 @@
"inBundle": true,
"license": "MIT"
},
+ "packages/lib-sourcify/node_modules/ganache/node_modules/module-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
+ "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
"packages/lib-sourcify/node_modules/ganache/node_modules/napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -34823,6 +34894,8 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/utf-8-validate": {
"version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz",
+ "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -50673,6 +50746,8 @@
},
"@types/bn.js": {
"version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
+ "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -50680,16 +50755,45 @@
},
"@types/lru-cache": {
"version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
"dev": true
},
"@types/node": {
"version": "17.0.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
+ "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==",
"dev": true
},
"@types/seedrandom": {
"version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz",
+ "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==",
"dev": true
},
+ "abstract-level": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
+ "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
+ "dev": true,
+ "requires": {
+ "buffer": "^6.0.3",
+ "catering": "^2.1.0",
+ "is-buffer": "^2.0.5",
+ "level-supports": "^4.0.0",
+ "level-transcoder": "^1.0.1",
+ "module-error": "^1.0.1",
+ "queue-microtask": "^1.2.3"
+ },
+ "dependencies": {
+ "level-supports": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
+ "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
+ "dev": true
+ }
+ }
+ },
"abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -50707,6 +50811,8 @@
},
"async": {
"version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
@@ -50714,6 +50820,8 @@
},
"async-eventemitter": {
"version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz",
+ "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==",
"dev": true,
"requires": {
"async": "^2.4.0"
@@ -50746,6 +50854,8 @@
},
"bufferutil": {
"version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz",
+ "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==",
"dev": true,
"optional": true,
"requires": {
@@ -50789,6 +50899,8 @@
},
"emittery": {
"version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz",
+ "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==",
"dev": true
},
"hash.js": {
@@ -50864,6 +50976,16 @@
"bundled": true,
"dev": true
},
+ "level-transcoder": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
+ "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
+ "dev": true,
+ "requires": {
+ "buffer": "^6.0.3",
+ "module-error": "^1.0.1"
+ }
+ },
"leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -50878,6 +51000,8 @@
},
"lodash": {
"version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"minimalistic-assert": {
@@ -50894,6 +51018,12 @@
"bundled": true,
"dev": true
},
+ "module-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
+ "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
+ "dev": true
+ },
"napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -50972,6 +51102,8 @@
},
"utf-8-validate": {
"version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz",
+ "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==",
"dev": true,
"optional": true,
"requires": {
diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts
index df1870069..0c7384a6d 100644
--- a/src/sourcify-chains.ts
+++ b/src/sourcify-chains.ts
@@ -196,6 +196,12 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = {
"https://blockscout.com/xdai/mainnet/" + BLOCKSCOUT_SUFFIX,
txRegex: getBlockscoutRegex("/xdai/mainnet"),
},
+ "295": {
+ // Hedera Mainnet
+ supported: true,
+ monitored: false,
+ contractFetchAddress: "https://hashscan.io/mainnet/" + ETHERSCAN_SUFFIX,
+ },
"300": {
supported: true,
monitored: false,
diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js
index eed336fb6..a22ad7c17 100644
--- a/test/chains/chain-tests.js
+++ b/test/chains/chain-tests.js
@@ -1423,7 +1423,7 @@ describe("Test Supported Chains", function () {
["shared/WithImmutables.sol"],
"shared/withImmutables.metadata.json"
);
-
+
// The Root Network Porcini (Testnet)
verifyContract(
"0x225F2cD344c61152F8E7200E62e03dEfD683f2c4",
@@ -1442,6 +1442,24 @@ describe("Test Supported Chains", function () {
"shared/withImmutables.metadata.json"
);
+ // Hedera Mainnet
+ verifyContract(
+ "0x00000000000000000000000000000000002265bb",
+ "295",
+ "Hedera Mainnet",
+ ["shared/1_Storage.sol"],
+ "shared/1_Storage.metadata.json"
+ );
+ verifyContractWithImmutables(
+ "0x00000000000000000000000000000000002265dd",
+ "295",
+ "Hedera Mainnet",
+ ["uint256"],
+ [42],
+ ["shared/WithImmutables.sol"],
+ "shared/withImmutables.metadata.json"
+ );
+
//////////////////////
// Helper functions //
//////////////////////
From 059422b2086514ed279d9fb68b96cfdaa80539f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?=
Date: Mon, 8 May 2023 09:11:17 +0200
Subject: [PATCH 43/48] Revert package-lock in commit
This reverts the package-lock
in commit f9e74dc12deaddc0db97a4c263125fc9bd8821f8.
---
package-lock.json | 132 ----------------------------------------------
1 file changed, 132 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b0e24fc61..32c7c2865 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34361,8 +34361,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/bn.js": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
- "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34371,54 +34369,19 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/lru-cache": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
"dev": true,
"license": "MIT"
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/node": {
"version": "17.0.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
- "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==",
"dev": true,
"license": "MIT"
},
"packages/lib-sourcify/node_modules/ganache/node_modules/@types/seedrandom": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz",
- "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==",
"dev": true,
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
- "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "packages/lib-sourcify/node_modules/ganache/node_modules/abstract-level/node_modules/level-supports": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
- "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -34440,8 +34403,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/async": {
"version": "2.6.4",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
- "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34450,8 +34411,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/async-eventemitter": {
"version": "0.2.4",
- "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz",
- "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34516,8 +34475,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/bufferutil": {
"version": "4.0.5",
- "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz",
- "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -34570,8 +34527,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/emittery": {
"version": "0.10.0",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz",
- "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -34703,20 +34658,6 @@
"node": ">=10"
}
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/level-transcoder": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
- "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -34736,8 +34677,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/lodash": {
"version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
"license": "MIT"
},
@@ -34757,16 +34696,6 @@
"inBundle": true,
"license": "MIT"
},
- "packages/lib-sourcify/node_modules/ganache/node_modules/module-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
- "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
"packages/lib-sourcify/node_modules/ganache/node_modules/napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -34894,8 +34823,6 @@
},
"packages/lib-sourcify/node_modules/ganache/node_modules/utf-8-validate": {
"version": "5.0.7",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz",
- "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -50746,8 +50673,6 @@
},
"@types/bn.js": {
"version": "5.1.0",
- "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
- "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -50755,45 +50680,16 @@
},
"@types/lru-cache": {
"version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
"dev": true
},
"@types/node": {
"version": "17.0.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
- "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==",
"dev": true
},
"@types/seedrandom": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz",
- "integrity": "sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw==",
"dev": true
},
- "abstract-level": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
- "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "catering": "^2.1.0",
- "is-buffer": "^2.0.5",
- "level-supports": "^4.0.0",
- "level-transcoder": "^1.0.1",
- "module-error": "^1.0.1",
- "queue-microtask": "^1.2.3"
- },
- "dependencies": {
- "level-supports": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
- "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
- "dev": true
- }
- }
- },
"abstract-leveldown": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
@@ -50811,8 +50707,6 @@
},
"async": {
"version": "2.6.4",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
- "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
@@ -50820,8 +50714,6 @@
},
"async-eventemitter": {
"version": "0.2.4",
- "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz",
- "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==",
"dev": true,
"requires": {
"async": "^2.4.0"
@@ -50854,8 +50746,6 @@
},
"bufferutil": {
"version": "4.0.5",
- "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz",
- "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==",
"dev": true,
"optional": true,
"requires": {
@@ -50899,8 +50789,6 @@
},
"emittery": {
"version": "0.10.0",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz",
- "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==",
"dev": true
},
"hash.js": {
@@ -50976,16 +50864,6 @@
"bundled": true,
"dev": true
},
- "level-transcoder": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
- "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
- "dev": true,
- "requires": {
- "buffer": "^6.0.3",
- "module-error": "^1.0.1"
- }
- },
"leveldown": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz",
@@ -51000,8 +50878,6 @@
},
"lodash": {
"version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"minimalistic-assert": {
@@ -51018,12 +50894,6 @@
"bundled": true,
"dev": true
},
- "module-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
- "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
- "dev": true
- },
"napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@@ -51102,8 +50972,6 @@
},
"utf-8-validate": {
"version": "5.0.7",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz",
- "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==",
"dev": true,
"optional": true,
"requires": {
From 132d403738e9e0d5cd8131eca3e2a4bd702edbbe Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Mon, 8 May 2023 14:54:30 +0200
Subject: [PATCH 44/48] fix `matchWithCreationTx` by decoding the constructor
arguments * add tests for wrong constructor arguments in creatorTx * add
missing test for successful creation bytecode verification
---
packages/lib-sourcify/package-lock.json | 1 +
packages/lib-sourcify/package.json | 1 +
packages/lib-sourcify/src/lib/verification.ts | 53 +++++++++--
.../artifact.json | 4 +
.../metadata.json | 44 ++++++++++
.../sources/WithImmutables.sol | 6 ++
.../lib-sourcify/test/verification.spec.ts | 87 ++++++++++++++++++-
7 files changed, 186 insertions(+), 10 deletions(-)
create mode 100644 packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/artifact.json
create mode 100644 packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/metadata.json
create mode 100644 packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/sources/WithImmutables.sol
diff --git a/packages/lib-sourcify/package-lock.json b/packages/lib-sourcify/package-lock.json
index f8070e310..899cd82a2 100644
--- a/packages/lib-sourcify/package-lock.json
+++ b/packages/lib-sourcify/package-lock.json
@@ -16,6 +16,7 @@
"@ethereumjs/statemanager": "^1.0.4",
"@ethereumjs/util": "^8.0.5",
"@ethereumjs/vm": "^6.4.1",
+ "@ethersproject/abi": "^5.7.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
diff --git a/packages/lib-sourcify/package.json b/packages/lib-sourcify/package.json
index 18a747232..313afc332 100644
--- a/packages/lib-sourcify/package.json
+++ b/packages/lib-sourcify/package.json
@@ -49,6 +49,7 @@
"@ethereumjs/statemanager": "^1.0.4",
"@ethereumjs/util": "^8.0.5",
"@ethereumjs/vm": "^6.4.1",
+ "@ethersproject/abi": "^5.7.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index bd70d8dbd..179df8149 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -4,6 +4,7 @@ import {
Create2Args,
ImmutableReferences,
Match,
+ Metadata,
RecompilationResult,
SourcifyChain,
StringMap,
@@ -27,6 +28,8 @@ import { hexZeroPad, isHexString } from '@ethersproject/bytes';
import { BigNumber } from '@ethersproject/bignumber';
import { getAddress, getContractAddress } from '@ethersproject/address';
import semverSatisfies from 'semver/functions/satisfies';
+import { defaultAbiCoder as abiCoder, ParamType } from '@ethersproject/abi';
+import { AbiConstructor } from 'abitype';
const RPC_TIMEOUT = 5000;
@@ -114,12 +117,14 @@ export async function verifyDeployed(
// Try to match with creationTx, if available
if (creatorTxHash) {
+ const recompiledMetadata: Metadata = JSON.parse(recompiled.metadata);
await matchWithCreationTx(
match,
recompiled.creationBytecode,
sourcifyChain,
address,
- creatorTxHash
+ creatorTxHash,
+ recompiledMetadata
);
if (isPerfectMatch(match)) {
return match;
@@ -134,7 +139,8 @@ export async function verifyDeployed(
recompiled.creationBytecode,
sourcifyChain,
address,
- creatorTxHash
+ creatorTxHash,
+ recompiledMetadata
);
}
);
@@ -355,7 +361,8 @@ export async function matchWithCreationTx(
recompiledCreationBytecode: string,
sourcifyChain: SourcifyChain,
address: string,
- creatorTxHash: string
+ creatorTxHash: string,
+ recompiledMetadata: Metadata
) {
const creatorTx = await getTx(creatorTxHash, sourcifyChain);
const creatorTxData = creatorTx.input;
@@ -387,6 +394,40 @@ export async function matchWithCreationTx(
}
if (match.status) {
+ const abiEncodedConstructorArguments =
+ extractAbiEncodedConstructorArguments(
+ creatorTxData,
+ recompiledCreationBytecode
+ );
+ let constructorAbiParamInputs = (
+ recompiledMetadata?.output?.abi?.find(
+ (param) => param.type === 'constructor'
+ ) as AbiConstructor
+ )?.inputs as ParamType[];
+ if (abiEncodedConstructorArguments) {
+ if (!constructorAbiParamInputs) {
+ match.status = null;
+ match.message = `Failed to match with creation bytecode: constructor ABI Inputs are missing`;
+ return;
+ }
+ // abiCoder doesn't break if called with a wrong `abiEncodedConstructorArguments`
+ // so in order to successfuly check if the constructor arguments actually match
+ // we need to re-encode it and compare them
+ const decodeResult = abiCoder.decode(
+ constructorAbiParamInputs,
+ abiEncodedConstructorArguments
+ );
+ const encodeResult = abiCoder.encode(
+ constructorAbiParamInputs,
+ decodeResult
+ );
+ if (encodeResult !== abiEncodedConstructorArguments) {
+ match.status = null;
+ match.message = `Failed to match with creation bytecode: constructor arguments ABI decoding failed ${encodeResult} vs ${abiEncodedConstructorArguments}`;
+ return;
+ }
+ }
+
// we need to check if this contract creation tx actually yields the same contract address https://github.com/ethereum/sourcify/issues/887
const createdContractAddress = getContractAddress({
from: creatorTx.from,
@@ -398,11 +439,7 @@ export async function matchWithCreationTx(
return;
}
match.libraryMap = libraryMap;
- const abiEncodedConstructorArguments =
- extractAbiEncodedConstructorArguments(
- creatorTxData,
- recompiledCreationBytecode
- );
+
match.abiEncodedConstructorArguments = abiEncodedConstructorArguments;
match.creatorTxHash = creatorTxHash;
}
diff --git a/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/artifact.json b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/artifact.json
new file mode 100644
index 000000000..56fc11e2e
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/artifact.json
@@ -0,0 +1,4 @@
+{
+ "bytecode": "60a060405234801561001057600080fd5b506040516103ca0000000000000000000000000000000000000000000000000000000000000001",
+ "abi": []
+}
diff --git a/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/metadata.json b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/metadata.json
new file mode 100644
index 000000000..06a0ba48c
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/metadata.json
@@ -0,0 +1,44 @@
+{
+ "compiler": {
+ "version": "0.8.19+commit.7dd6d404"
+ },
+ "language": "Solidity",
+ "output": {
+ "abi": [],
+ "devdoc": {
+ "kind": "dev",
+ "methods": {},
+ "version": 1
+ },
+ "userdoc": {
+ "kind": "user",
+ "methods": {},
+ "version": 1
+ }
+ },
+ "settings": {
+ "compilationTarget": {
+ "sources/WithImmutables.sol": "WithImmutables"
+ },
+ "evmVersion": "paris",
+ "libraries": {},
+ "metadata": {
+ "bytecodeHash": "ipfs"
+ },
+ "optimizer": {
+ "enabled": false,
+ "runs": 200
+ },
+ "remappings": []
+ },
+ "sources": {
+ "sources/WithImmutables.sol": {
+ "keccak256": "0xa67bac14ebd5956d06bd0f33e2ffd55db729d4ec85bca19ec5b321e6be0b7cc8",
+ "urls": [
+ "bzz-raw://6d83c127e075a149ec14c6af579bc7b24955cdb7578ae7da2f253b7142d267cc",
+ "dweb:/ipfs/QmW6tdCTV7X5dd5LCKDWedbMmkurQTMi4ePx7LY3DNuLn7"
+ ]
+ }
+ },
+ "version": 1
+}
diff --git a/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/sources/WithImmutables.sol b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/sources/WithImmutables.sol
new file mode 100644
index 000000000..4f90eb28e
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/WithImmutablesCreationBytecodeAttack/sources/WithImmutables.sol
@@ -0,0 +1,6 @@
+pragma solidity >=0.7.0;
+
+contract WithImmutables{
+ constructor (uint256 a) {
+ }
+}
\ No newline at end of file
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index d7f400ca8..248feb2f5 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import path from 'path';
-import { SourcifyChain } from '../src/lib/types';
+import { Metadata, SourcifyChain } from '../src/lib/types';
import Web3 from 'web3';
import Ganache from 'ganache';
import {
@@ -564,14 +564,97 @@ describe('lib-sourcify tests', () => {
chainId: sourcifyChainGanache.chainId.toString(),
status: null,
};
+ const recompiledMetadata: Metadata = JSON.parse(recompiled.metadata);
await matchWithCreationTx(
match,
recompiled.creationBytecode,
sourcifyChainGanache,
deployedAddress,
- wrongCreatorTxHash
+ wrongCreatorTxHash,
+ recompiledMetadata
);
expectMatch(match, null, deployedAddress, undefined); // status is null
});
+
+ it('should fail to matchWithCreationTx with creatorTxHash having wrong constructor arguments', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'WithImmutables'
+ );
+ const maliciousContractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'WithImmutablesCreationBytecodeAttack'
+ );
+
+ const [deployedAddress, wrongCreatorTxHash] =
+ await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0],
+ ['12345']
+ );
+ const [,] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ maliciousContractFolderPath,
+ accounts[0],
+ ['12345']
+ );
+
+ const checkedContracts = await checkFilesFromContractFolder(
+ maliciousContractFolderPath
+ );
+ const recompiled = await checkedContracts[0].recompile();
+ const match = {
+ address: deployedAddress,
+ chainId: sourcifyChainGanache.chainId.toString(),
+ status: null,
+ };
+ const recompiledMetadata: Metadata = JSON.parse(recompiled.metadata);
+ await matchWithCreationTx(
+ match,
+ '0x60a060405234801561001057600080fd5b506040516103ca', // I force recompiled.creationBytecode because it would take time to generate the right attack,
+ sourcifyChainGanache,
+ deployedAddress,
+ wrongCreatorTxHash,
+ recompiledMetadata
+ );
+ expectMatch(match, null, deployedAddress, undefined); // status is null
+ });
+
+ it('should successfuly verify with matchWithCreationTx with creationTxHash', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'WithImmutables'
+ );
+ const [deployedAddress, creatorTxHash] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0],
+ ['12345']
+ );
+
+ const checkedContracts = await checkFilesFromContractFolder(
+ contractFolderPath
+ );
+ const recompiled = await checkedContracts[0].recompile();
+ const match = {
+ address: deployedAddress,
+ chainId: sourcifyChainGanache.chainId.toString(),
+ status: null,
+ };
+ const recompiledMetadata: Metadata = JSON.parse(recompiled.metadata);
+ await matchWithCreationTx(
+ match,
+ recompiled.creationBytecode,
+ sourcifyChainGanache,
+ deployedAddress,
+ creatorTxHash,
+ recompiledMetadata
+ );
+ expectMatch(match, 'perfect', deployedAddress, undefined); // status is null
+ });
});
});
From 763e0d57342dd3fbba878f90cd14496b62a53564 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Mon, 8 May 2023 16:05:54 +0200
Subject: [PATCH 45/48] test for paths in metadata containing multiple `../`
* check that the file is saved in the correct directory
---
test/server.js | 54 ++++++++++++++++
.../Storage/metadata.upMultipleDirs.json | 64 +++++++++++++++++++
2 files changed, 118 insertions(+)
create mode 100644 test/testcontracts/Storage/metadata.upMultipleDirs.json
diff --git a/test/server.js b/test/server.js
index 6b211554d..bce28a0ca 100644
--- a/test/server.js
+++ b/test/server.js
@@ -890,6 +890,60 @@ describe("Server", function () {
);
});
});
+
+ it("should store a contract in /contracts/full_match|partial_match/0xADDRESS despite the files paths in the metadata", async () => {
+ const artifact = require("./testcontracts/Storage/Storage.json");
+ const [address] = await deployFromAbiAndBytecodeForCreatorTxHash(
+ localWeb3Provider,
+ artifact.abi,
+ artifact.bytecode,
+ accounts[0],
+ []
+ );
+
+ const metadata = require("./testcontracts/Storage/metadata.upMultipleDirs.json");
+ const sourcePath = path.join(
+ "test",
+ "testcontracts",
+ "Storage",
+ "Storage.sol"
+ );
+ const sourceBuffer = fs.readFileSync(sourcePath);
+
+ // Now pass the creatorTxHash
+ const res = await chai
+ .request(server.app)
+ .post("/")
+ .send({
+ address: address,
+ chain: defaultContractChain,
+ files: {
+ "metadata.json": JSON.stringify(metadata),
+ "Storage.sol": sourceBuffer.toString(),
+ },
+ });
+ assertVerification(
+ null,
+ res,
+ null,
+ address,
+ defaultContractChain,
+ "partial"
+ );
+ const isExist = fs.existsSync(
+ path.join(
+ server.repository,
+ "contracts",
+ "partial_match",
+ defaultContractChain,
+ address,
+ "sources",
+ "..contracts",
+ "Storage.sol"
+ )
+ );
+ chai.expect(isExist, "Files saved in the wrong directory").to.be.true;
+ });
});
describe("solc v0.6.12 and v0.7.0 extra files in compilation causing metadata match but bytecode mismatch", function () {
diff --git a/test/testcontracts/Storage/metadata.upMultipleDirs.json b/test/testcontracts/Storage/metadata.upMultipleDirs.json
new file mode 100644
index 000000000..e51b7ceac
--- /dev/null
+++ b/test/testcontracts/Storage/metadata.upMultipleDirs.json
@@ -0,0 +1,64 @@
+{
+ "compiler": { "version": "0.8.4+commit.c7e474f2" },
+ "language": "Solidity",
+ "output": {
+ "abi": [
+ {
+ "inputs": [],
+ "name": "retrieve",
+ "outputs": [
+ { "internalType": "uint256", "name": "", "type": "uint256" }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "uint256", "name": "num", "type": "uint256" }
+ ],
+ "name": "store",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+ ],
+ "devdoc": {
+ "details": "Store & retrieve value in a variable",
+ "kind": "dev",
+ "methods": {
+ "retrieve()": {
+ "details": "Return value ",
+ "returns": { "_0": "value of 'number'" }
+ },
+ "store(uint256)": {
+ "details": "Store value in variable",
+ "params": { "num": "value to store" }
+ }
+ },
+ "title": "Storage",
+ "version": 1
+ },
+ "userdoc": { "kind": "user", "methods": {}, "version": 1 }
+ },
+ "settings": {
+ "compilationTarget": {
+ "..contracts/../../../../../Storage.sol": "Storage"
+ },
+ "evmVersion": "istanbul",
+ "libraries": {},
+ "metadata": { "bytecodeHash": "ipfs" },
+ "optimizer": { "enabled": false, "runs": 200 },
+ "remappings": []
+ },
+ "sources": {
+ "..contracts/../../../../../Storage.sol": {
+ "keccak256": "0x88c47206b5ec3d60ab820e9d126c4ac54cb17fa7396ff49ebe27db2862982ad8",
+ "license": "GPL-3.0",
+ "urls": [
+ "bzz-raw://5d1eeb01c8c10bed9e290f4a80a8d4081422a7b298a13049d72867022522cf6b",
+ "dweb:/ipfs/QmaFRC9ZtT7y3t9XNWCbDuMTEwKkyaQJzYFzw3NbeohSn5"
+ ]
+ }
+ },
+ "version": 1
+}
From a6af063cfd97a3c8ef1a9535e4d5e101eca740fa Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Mon, 8 May 2023 16:56:23 +0200
Subject: [PATCH 46/48] fix linter error
---
packages/lib-sourcify/src/lib/verification.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index 179df8149..aa126c49a 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -399,7 +399,7 @@ export async function matchWithCreationTx(
creatorTxData,
recompiledCreationBytecode
);
- let constructorAbiParamInputs = (
+ const constructorAbiParamInputs = (
recompiledMetadata?.output?.abi?.find(
(param) => param.type === 'constructor'
) as AbiConstructor
From c7f92eb6dca7c43c6bf436bc6ddae531696d7eb9 Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Mon, 8 May 2023 17:00:21 +0200
Subject: [PATCH 47/48] fix linter warning * remove unused Metadata variable
from RepositoryController
---
src/server/services/RepositoryService.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/server/services/RepositoryService.ts b/src/server/services/RepositoryService.ts
index ad1d67afe..0ef87d004 100644
--- a/src/server/services/RepositoryService.ts
+++ b/src/server/services/RepositoryService.ts
@@ -6,7 +6,6 @@ import {
Status,
Create2Args,
StringMap,
- Metadata,
/* ContextVariables, */
CheckedContract,
} from "@ethereum-sourcify/lib-sourcify";
From dceda9f77251b56888f1cdc5cf287f7c073b383e Mon Sep 17 00:00:00 2001
From: Marco Castignoli
Date: Tue, 9 May 2023 09:25:13 +0200
Subject: [PATCH 48/48] return an error for an empty
`recompiledCreationBytecode` in `matchWithCreationTx`
---
packages/lib-sourcify/src/lib/verification.ts | 5 +++
.../metadata.json | 44 +++++++++++++++++++
.../sources/FFF.sol | 6 +++
.../lib-sourcify/test/verification.spec.ts | 41 +++++++++++++++++
4 files changed, 96 insertions(+)
create mode 100644 packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/metadata.json
create mode 100644 packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/sources/FFF.sol
diff --git a/packages/lib-sourcify/src/lib/verification.ts b/packages/lib-sourcify/src/lib/verification.ts
index aa126c49a..7e6ac8175 100644
--- a/packages/lib-sourcify/src/lib/verification.ts
+++ b/packages/lib-sourcify/src/lib/verification.ts
@@ -364,6 +364,11 @@ export async function matchWithCreationTx(
creatorTxHash: string,
recompiledMetadata: Metadata
) {
+ if (recompiledCreationBytecode === '0x') {
+ match.status = null;
+ match.message = `Failed to match with creation bytecode: recompiled contract's creation bytecode is empty`;
+ return;
+ }
const creatorTx = await getTx(creatorTxHash, sourcifyChain);
const creatorTxData = creatorTx.input;
diff --git a/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/metadata.json b/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/metadata.json
new file mode 100644
index 000000000..d434360de
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/metadata.json
@@ -0,0 +1,44 @@
+{
+ "compiler": {
+ "version": "0.6.12+commit.27d51765"
+ },
+ "language": "Solidity",
+ "output": {
+ "abi": [],
+ "devdoc": {
+ "kind": "dev",
+ "methods": {},
+ "version": 1
+ },
+ "userdoc": {
+ "kind": "user",
+ "methods": {},
+ "version": 1
+ }
+ },
+ "settings": {
+ "compilationTarget": {
+ "sources/FFF.sol": "FFF"
+ },
+ "evmVersion": "istanbul",
+ "libraries": {},
+ "metadata": {
+ "bytecodeHash": "ipfs"
+ },
+ "optimizer": {
+ "enabled": false,
+ "runs": 200
+ },
+ "remappings": []
+ },
+ "sources": {
+ "sources/FFF.sol": {
+ "keccak256": "0x7ed3554b3f768ad3b3069d7fc8b1a08a24500507fc8a60eb11c726e37f3cd9a3",
+ "urls": [
+ "bzz-raw://6d83c127e075a149ec14c6af579bc7b24955cdb7578ae7da2f253b7142d267cc",
+ "dweb:/ipfs/QmW6tdCTV7X5dd5LCKDWedbMmkurQTMi4ePx7LY3DNuLn7"
+ ]
+ }
+ },
+ "version": 1
+}
diff --git a/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/sources/FFF.sol b/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/sources/FFF.sol
new file mode 100644
index 000000000..b12b1d274
--- /dev/null
+++ b/packages/lib-sourcify/test/sources/AbstractCreationBytecodeAttack/sources/FFF.sol
@@ -0,0 +1,6 @@
+pragma solidity 0.6.12;
+
+abstract contract FFF{
+ constructor (uint256 a) public payable {
+ }
+}
\ No newline at end of file
diff --git a/packages/lib-sourcify/test/verification.spec.ts b/packages/lib-sourcify/test/verification.spec.ts
index 248feb2f5..821bed1bf 100644
--- a/packages/lib-sourcify/test/verification.spec.ts
+++ b/packages/lib-sourcify/test/verification.spec.ts
@@ -623,6 +623,47 @@ describe('lib-sourcify tests', () => {
expectMatch(match, null, deployedAddress, undefined); // status is null
});
+ it('should fail to matchWithCreationTx when passing an abstract contract', async () => {
+ const contractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'WithImmutables'
+ );
+
+ const [deployedAddress, creatorTxHash] = await deployFromAbiAndBytecode(
+ localWeb3Provider,
+ contractFolderPath,
+ accounts[0],
+ ['12345']
+ );
+
+ const maliciousContractFolderPath = path.join(
+ __dirname,
+ 'sources',
+ 'AbstractCreationBytecodeAttack'
+ );
+ const checkedContracts = await checkFilesFromContractFolder(
+ maliciousContractFolderPath
+ );
+ const recompiled = await checkedContracts[0].recompile();
+ const match = {
+ address: deployedAddress,
+ chainId: sourcifyChainGanache.chainId.toString(),
+ status: null,
+ };
+ const recompiledMetadata: Metadata = JSON.parse(recompiled.metadata);
+
+ await matchWithCreationTx(
+ match,
+ recompiled.creationBytecode,
+ sourcifyChainGanache,
+ deployedAddress,
+ creatorTxHash,
+ recompiledMetadata
+ );
+ expectMatch(match, null, deployedAddress, undefined); // status is null
+ });
+
it('should successfuly verify with matchWithCreationTx with creationTxHash', async () => {
const contractFolderPath = path.join(
__dirname,