Skip to content

Commit b3e181b

Browse files
authored
Merge branch 'master' into contract-verification-i18n
2 parents 68726b1 + 692f893 commit b3e181b

File tree

36 files changed

+327
-61
lines changed

36 files changed

+327
-61
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.gg/mh9hFCKkEq).
3+
Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.com/invite/nfv6ZYjAeP).
44

55
## Development
66
Remix libraries work closely with [Remix IDE](https://remix.ethereum.org). Each library has a README to explain its application.
@@ -72,7 +72,7 @@ import panelJson from './panel.json';
7272
import enJson from '../en';
7373

7474
// There may have some untranslated content. Always fill in the gaps with EN JSON.
75-
// No need for a defaultMessage prop when render a FormattedMessage component.
75+
// No need for a defaultMessage prop when rendering a FormattedMessage component.
7676
export default Object.assign({}, enJson, {
7777
...panelJson,
7878
})

apps/circuit-compiler/src/app/services/circomPluginClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@ export class CircomPluginClient extends PluginClient {
502502
const exists = await this.call('fileManager', 'exists', path)
503503

504504
if (exists) return path
505-
else throw new Error(`Report path ${path} do no exist in the Remix FileSystem`)
505+
else throw new Error(`Report path ${path} does not exist in the Remix FileSystem`)
506506
} else {
507-
throw new Error(`Report path ${path} do no exist in the Remix FileSystem`)
507+
throw new Error(`Report path ${path} does not exist in the Remix FileSystem`)
508508
}
509509
}
510510
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contract Verification Plugin
2+
3+
With this plugin, contracts written and compiled in Remix can be verified at Sourcify, Etherscan, Blockscout and Routescan at the same time. Besides that, the source code of any address can be fetched from the verifiers and added to the file editor.
4+
5+
## Adding a new verification service
6+
7+
Currently, the plugin supports Sourcify, Etherscan, Blockscout and Routescan. To add a new verifier, you need to make the following changes:
8+
9+
In `./src/app/types/VerificationTypes.ts`, add the new verifier to the `VerifierIdentifier` type and the`VERIFIERS` array.
10+
11+
In order to interact with the API of the verification service, you need to create a new class that extends the `AbstractVerifier` class. If your API is based on the Etherscan API, you can simply extend the `EtherscanVerifier` class. In this case, see the `RoutescanVerifier` and the `BlockscoutVerifier` for reference. All related classes are located in the `./src/app/Verifiers` directory.
12+
13+
In `./src/app/Verifiers/index.ts`, add your new verifier to the `getVerifier` function. Validate any settings properties that are required by your verifier.
14+
15+
In `./src/app/utils/default-apis.json`, you need to add default settings for your new verifier. If you can, simply add your defaults in the form of `{ [VerifierIdentifier]: { [chainId]: { apiUrl: [value], explorerUrl: [value] } } }`. If you need more flexibility, you might also want to change the `src/app/utils/default-settings.ts` file. See Routescan there for reference.
16+
17+
Your new verifier will automatically be shown in the `VerifyView` and the `LookupView` since we added it to the `VERIFIERS` array. You only need to make a change to the `SettingsView` because the required settings depend on the verifier. There, add a new div block in the same format as the other verifiers. Only add the `ConfigInput` elements for the settings that your verifier needs to the div block.
18+
19+
That's it! Your verification service should be able to verify contracts through Remix now.

apps/debugger/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = composePlugins(withNx(), (config) => {
4848
})
4949
)
5050

51-
// souce-map loader
51+
// source-map loader
5252
config.module.rules.push({
5353
test: /\.js$/,
5454
use: ['source-map-loader'],

apps/doc-viewer/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
2828
new webpack.DefinePlugin({})
2929
)
3030

31-
// souce-map loader
31+
// source-map loader
3232
config.module.rules.push({
3333
test: /\.js$/,
3434
use: ['source-map-loader'],

apps/remix-dapp/src/locales/en/udapp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"udapp.contractCreation": "Contract Creation",
134134
"udapp.transactionFee": "Transaction is invalid. Max fee should not be less than Base fee",
135135
"udapp.title1": "Represents the part of the tx fee that goes to the miner.",
136-
"udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimun needs to be set to base fee.",
136+
"udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimum needs to be set to base fee.",
137137
"udapp.gasPrice": "Gas price",
138138
"udapp.gweiText": "visit {a} for current gas price info.",
139139
"udapp.maxTransactionFee": "Max transaction fee",

apps/remix-ide-e2e/src/tests/layout.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
.assert.containsText('.sidepanel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER')
2727
.waitForElementNotVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]')
2828
},
29-
'Should pin a plugin while a another plugin is already pinned': function (browser: NightwatchBrowser) {
29+
'Should pin a plugin while an another plugin is already pinned': function (browser: NightwatchBrowser) {
3030
browser.waitForElementVisible('[data-id="movePluginToRight"]')
3131
.click('[data-id="movePluginToRight"]')
3232
.waitForElementVisible('[data-id="movePluginToLeft"]')

apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module.exports = {
101101
browser.assert.equal(content, 'testing')
102102
})
103103
},
104-
'Should have a artifacts file with JSON test data #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) {
104+
'Should have an artifacts file with JSON test data #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) {
105105
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
106106
.click('*[data-id="treeViewLitreeViewItemtest_contracts/artifacts"]')
107107
.openFile('test_contracts/artifacts/Storage_metadata.json')
@@ -111,7 +111,7 @@ module.exports = {
111111
browser.assert.equal(metadata.test, 'data')
112112
})
113113
},
114-
'Should have a empty workspace #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) {
114+
'Should have an empty workspace #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) {
115115
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
116116
.switchWorkspace('emptyspace')
117117
},

apps/remix-ide-e2e/src/tests/specialFunctions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
before: function (browser: NightwatchBrowser, done: VoidFunction) {
88
// this test suite also contribute testing https://github.com/ethereum/remix/pull/1497 and https://github.com/ethereum/remix-ide/pull/2898
99
// quick explanation:
10-
// the goal of https://github.com/ethereum/remix-ide/pull/2898 is to keep track of all the compiled contracts an not only the last one.
10+
// the goal of https://github.com/ethereum/remix-ide/pull/2898 is to keep track of all the compiled contracts a not only the last one.
1111
// this introduce an issue: if 2 compiled contracts have the same name, the second one override the first which is not wanted.
1212
// fix's delivered by https://github.com/ethereum/remix/pull/1497: instead of getting contract by name,
1313
// which result in name clashing we process the whole contract object (which contain bytecode, deployedbytecode, ...)

apps/remix-ide-e2e/src/tests/terminal.test.ts

Lines changed: 69 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)