Skip to content

Commit

Permalink
Merge branch 'master' into contract-verification-i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang authored Jan 10, 2025
2 parents bdb44e0 + 496e315 commit 4ac77c2
Show file tree
Hide file tree
Showing 33 changed files with 95 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Windows, Linux or MacOS]
- Browser [e.g. chrome, firefox]
- Version [e.g. 22]
- Browser: [e.g. chrome, firefox]
- Version: [e.g. 22]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion apps/circuit-compiler/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ["source-map-loader"],
Expand Down
2 changes: 1 addition & 1 deletion apps/contract-verification/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
2 changes: 1 addition & 1 deletion apps/doc-gen/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = composePlugins(withNx(), withReact(), config => {
new webpack.DefinePlugin({}),
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
4 changes: 3 additions & 1 deletion apps/learneth/src/redux/models/remixide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const Model: ModelType = {
},
})

yield remixClient.onload()
yield remixClient.onload(() => {
remixClient.call('manager', 'activatePlugin', 'solidityUnitTesting')
})

toast.dismiss()

Expand Down
2 changes: 1 addition & 1 deletion apps/learneth/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
2 changes: 1 addition & 1 deletion apps/noir-compiler/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ["source-map-loader"],
Expand Down
2 changes: 1 addition & 1 deletion apps/quick-dapp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-dapp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/local-plugin/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = composePlugins(withNx(), (config) => {
// add public path
config.output.publicPath = '/'

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ["source-map-loader"],
Expand Down
10 changes: 5 additions & 5 deletions apps/remix-ide-e2e/src/tests/quickDapp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const tests = {
.setValue('input[data-id="surgePassword"]', surgePassword)
.setValue('input[data-id="surgeSubdomain"]', surgeSubdomain)
.setValue('input[data-id="functionTitle0x6057361d"]', 'Function Store Title')
.setValue('input[data-id="functionTitle0x2e64cec1"]', 'Function Retrive Title')
.setValue('input[data-id="functionTitle0x2e64cec1"]', 'Function Retrieve Title')
.execute((function() {
document.querySelector('input[data-id="uploadLogo"]').classList.remove('d-none');
}))
Expand Down Expand Up @@ -176,7 +176,7 @@ const tests = {
})
})
.assert.containsText('*[data-id="functionTitle0x6057361d"]', 'Function Store Title')
.assert.containsText('*[data-id="functionTitle0x2e64cec1"]', 'Function Retrive Title')
.assert.containsText('*[data-id="functionTitle0x2e64cec1"]', 'Function Retrieve Title')
.assert.containsText('*[data-id="dappTitle"]', 'Storage')
.assert.containsText('*[data-id="dappInstructions"]', 'Store & retrieve value in a variable')
.assert.elementPresent('.fa-twitter.btn', 'Twitter icon should be present')
Expand All @@ -191,9 +191,9 @@ const tests = {
.getLocation('*[data-id="function0x6057361d"]', function (result: any) {
const funcStoreLocation = result.value
browser.getLocation('*[data-id="function0x2e64cec1"]', function (result: any) {
const funcRetriveLocation = result.value
browser.assert.strictEqual(funcStoreLocation.y, funcRetriveLocation.y, 'Both functions should be on the same horizontal line')
browser.assert.ok(funcStoreLocation.x > funcRetriveLocation.x, 'Function Store should be on the right of Function Retrive')
const funcRetrieveLocation = result.value
browser.assert.strictEqual(funcStoreLocation.y, funcRetrieveLocation.y, 'Both functions should be on the same horizontal line')
browser.assert.ok(funcStoreLocation.x > funcRetrieveLocation.x, 'Function Store should be on the right of Function Retrieve')
})
})
.getAttribute('a[data-id="viewSourceCode"]', 'href', function (result) {
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/tests/solidityImport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const sources = [
'Untitled5.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/token/ERC20/ERC20.sol"; contract test8 {}' }
},
{
'Untitled6.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract test10 {}' }
'Untitled6.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test10 {}' }
},
{
'Untitled7.sol': { content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test11 {}' }
Expand Down
16 changes: 8 additions & 8 deletions apps/remix-ide-e2e/src/tests/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ module.exports = {
.selectContract('OwnerTest')
.createContract('')
.pause(1000)
.journalChildIncludes('constructor', { shouldHaveOnlyOneOccurence: true })
.journalChildIncludes('constructor', { shouldHaveOnlyOneOccurrence: true })
.pause(5000)
.click('*[data-id="terminalClearConsole"]') // clear the terminal
.clickInstance(0)
.clickFunction('changeOwner - transact (not payable)', { types: 'address newOwner', values: '0xd9145CCE52D386f254917e481eB44e9943F39138' })
.pause(1000)
.journalChildIncludes('inside changeOwner', { shouldHaveOnlyOneOccurence: true })
.journalChildIncludes('inside changeOwner', { shouldHaveOnlyOneOccurrence: true })
.clickFunction('getOwner - call')
.pause(1000)
.journalChildIncludes('inside getOwner', { shouldHaveOnlyOneOccurence: true })
.journalChildIncludes('inside getOwner', { shouldHaveOnlyOneOccurrence: true })
},

'Emit 2 similar events and check the filtering is done properly #group4': function (browser: NightwatchBrowser) {
Expand Down Expand Up @@ -385,7 +385,7 @@ module.exports = {
}
function resolveENS() view {
// Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks;
// Same address for Mainnet, Ropsten, Rinkerby, Gorli and other networks;
ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e);
(,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth");
Resolver resolver = ens.resolver(node);
Expand Down Expand Up @@ -602,14 +602,14 @@ library Lib {
}
/**
* @title Storage
* @dev Store & retrieve value inr a variable
* @dev Store & retrieve value in a variable
*/
contract StorageWithLib {
uint256 number;
/**
* @dev Store valrue in variable
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
Expand Down Expand Up @@ -750,15 +750,15 @@ const scriptAutoExec = {
/**
* @title Storage
* @dev Store & retrieve value inr a variable
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_storage.js
*/
contract Storage {
uint256 number;
/**
* @dev Store valrue in variable
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
Expand Down
4 changes: 2 additions & 2 deletions apps/remix-ide-e2e/src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'nightwatch' {
journalLastChildIncludes(val: string): NightwatchBrowser
executeScriptInTerminal(script: string): NightwatchBrowser
clearEditableContent(cssSelector: string): NightwatchBrowser
journalChildIncludes(val: string, opts = {shouldHaveOnlyOneOccurence: boolean}): NightwatchBrowser
journalChildIncludes(val: string, opts = {shouldHaveOnlyOneOccurrence: boolean}): NightwatchBrowser
debugTransaction(index: number): NightwatchBrowser
checkElementStyle(cssSelector: string, styleProperty: string, expectedResult: string): NightwatchBrowser
openFile(name: string): NightwatchBrowser
Expand Down Expand Up @@ -57,7 +57,7 @@ declare module 'nightwatch' {
journalLastChild(val: string): NightwatchBrowser
checkTerminalFilter(filter: string, test: string, notContain: boolean): NightwatchBrowser
noWorkerErrorFor(version: string): NightwatchBrowser
validateValueInput(selector: string, valueTosSet: string[], expectedValue: string): NightwatchBrowser
validateValueInput(selector: string, valueToSet: string[], expectedValue: string): NightwatchBrowser
checkAnnotations(type: string): NightwatchBrowser
checkAnnotationsNotPresent(type: string): NightwatchBrowser
getLastTransactionHash(callback: (hash: string) => void)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import React, { useCallback } from 'react';
import { ICompletions, IModel, RemoteInferencer, IRemoteModel, IParams, GenerationParams, CodeExplainAgent } from '@remix/remix-ai-core';
import { CustomRemixApi } from '@remix-api'
import { PluginViewWrapper } from '@remix-ui/helper'
const _paq = (window._paq = window._paq || [])

type chatRequestBufferT<T> = {
[key in keyof T]: T[key]
Expand Down Expand Up @@ -199,6 +200,7 @@ export class RemixAIPlugin extends ViewPlugin {
else {
console.log("chatRequestBuffer is not empty. First process the last request.")
}
_paq.push(['trackEvent', 'ai', 'remixAI_chat', 'askFromTerminal'])
}

async ProcessChatRequestBuffer(params:IParams=GenerationParams){
Expand Down
4 changes: 2 additions & 2 deletions apps/remix-ide/src/app/tabs/locales/en/pluginManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"pluginManager.displayName": "Plugin manager",
"pluginManager.activate": "Activate",
"pluginManager.deactivate": "Deactivate",
"pluginManager.activeModules": "Active Modules",
"pluginManager.inactiveModules": "Inactive Modules",
"pluginManager.activeModules": "Active Plugins",
"pluginManager.inactiveModules": "Inactive Plugins",
"pluginManager.connectLocal": "Connect to a Local Plugin",
"pluginManager.localForm.title": "Local Plugin",
"pluginManager.localForm.pluginName": "Plugin Name",
Expand Down
Binary file added apps/remix-ide/src/assets/img/solSurvey2024.webp
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion apps/remix-ide/src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export function isNative(name) {
'templateSelection',
'walletconnect',
'contract-verification',
'popupPanel'
'popupPanel',
'LearnEth',
]
return nativePlugins.includes(name) || requiredModules.includes(name) || isInjectedProvider(name) || isVM(name) || isScriptRunner(name)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
})
)

// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
Expand Down
14 changes: 7 additions & 7 deletions libs/remix-debug/src/code/codeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,25 @@ export class CodeManager {
return findNodeAtInstructionIndex('FunctionDefinition', instIndex, sourceMap, ast)
}

private retrieveCodeAndTrigger (codeMananger, address, stepIndex, tx) {
codeMananger.getCode(address).then((result) => {
this.retrieveIndexAndTrigger(codeMananger, address, stepIndex, result.instructions)
private retrieveCodeAndTrigger (codeManager, address, stepIndex, tx) {
codeManager.getCode(address).then((result) => {
this.retrieveIndexAndTrigger(codeManager, address, stepIndex, result.instructions)
}).catch((error) => {
return console.log(error)
})
}

private async retrieveIndexAndTrigger (codeMananger, address, step, code) {
private async retrieveIndexAndTrigger (codeManager, address, step, code) {
let result
const next = []
const returnInstructionIndexes = []
const outOfGasInstructionIndexes = []

try {
result = codeMananger.getInstructionIndex(address, step)
result = codeManager.getInstructionIndex(address, step)
for (let i = 1; i < 6; i++) {
if (this.traceManager.inRange(step + i)) {
next.push(codeMananger.getInstructionIndex(address, step + i))
next.push(codeManager.getInstructionIndex(address, step + i))
}
}

Expand All @@ -177,7 +177,7 @@ export class CodeManager {
return console.log(error)
}
try {
codeMananger.event.trigger('changed', [code, address, result, next, returnInstructionIndexes, outOfGasInstructionIndexes])
codeManager.event.trigger('changed', [code, address, result, next, returnInstructionIndexes, outOfGasInstructionIndexes])
} catch (e) {
console.log('dispatching event failed', e)
}
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-lib/src/execution/txHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function sortAbiFunction (contractabi) {
// Check if function is constant (introduced with Solidity 0.6.0)
const isConstant = ({ stateMutability }) => stateMutability === 'view' || stateMutability === 'pure'
// Sorts the list of ABI entries. Constant functions will appear first,
// followed by non-constant functions. Within those t wo groupings, functions
// followed by non-constant functions. Within those two groupings, functions
// will be sorted by their names.
return contractabi.sort(function (a, b) {
if (isConstant(a) && !isConstant(b)) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/ethereum/remix-project/issues)

`@remix-project/remix-simulator` is a web3 wrapper for different kind of providers. It is used in `remix-tests` library and in Remix IDE codebase.
`@remix-project/remix-simulator` is a web3 wrapper for different kinds of providers. It is used in `remix-tests` library and in Remix IDE codebase.

### Installation
`@remix-project/remix-simulator` is an NPM package and can be installed using NPM as:
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Events', () => {
toBlock: 2,
topics: [['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735', '0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc']]
})
// 0xdcd9c7fa0342f01013b is a topic from a event emitted by the other contract and should not be take into account.
// 0xdcd9c7fa0342f01013b is a topic from an event emitted by the other contract and should not be take into account.
assert.equal(ownerLogs.length, 1, '5) ownerLogs length should be equal to 1')
})
})
Expand Down
6 changes: 3 additions & 3 deletions libs/remix-ui/editor/src/lib/web-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export const loadTypes = async (monaco) => {
monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersSha2Default, `file:///node_modules/@types/@ethersproject_sha2/index.d.ts`)

// @ts-ignore
const ethersSingningkey = await import('raw-loader!@ethersproject/signing-key/lib/index.d.ts')
const ethersSingningkeyDefault = ethersSingningkey.default.replace(/@ethersproject\//g, '@ethersproject_')
monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersSingningkeyDefault, `file:///node_modules/@types/@ethersproject_signing-key/index.d.ts`)
const ethersSigningkey = await import('raw-loader!@ethersproject/signing-key/lib/index.d.ts')
const ethersSigningkeyDefault = ethersSigningkey.default.replace(/@ethersproject\//g, '@ethersproject_')
monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersSigningkeyDefault, `file:///node_modules/@types/@ethersproject_signing-key/index.d.ts`)

// @ts-ignore
const ethersSolidity = await import('raw-loader!@ethersproject/solidity/lib/index.d.ts')
Expand Down
34 changes: 34 additions & 0 deletions libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,40 @@ function HomeTabFeatured(props:HomeTabFeaturedProps) {
autoPlaySpeed={10000}
dotListClass="position-relative mt-2"
>
<div
className="mx-1 px-1 d-flex" // Please do not delete. just comment this out. To be used every year.
>
<a href="https://cryptpad.fr/form/#/2/form/view/pV-DdryeJoYUWvW+gXsFaMNynEY7t5mUsgeD1urgwSE/" target="__blank">
<img className="remixui_carouselImage" src={'/assets/img/solSurvey2024.webp'} alt=""></img>
</a>
<div className="h6 w-50 p-2 pl-4 align-self-center" style={{ flex: '1' }}>
<h5>
The Solidity Developer Survey 2024 is live!
</h5>
<p className='pt-2'>
Please take a few minutes of your time to
<a
className="mx-1"
onClick={() => _paq.push(['trackEvent', 'hometab', 'featuredSection', 'soliditySurvey24'])}
target="__blank"
href="https://cryptpad.fr/form/#/2/form/view/9xjPVmdv8z0Cyyh1ejseMQ0igmx-TedH5CPST3PhRUk/"
>
COMPLETE THE SURVEY.
</a>
</p>
<p style={{ fontSize: '0.8rem' }} className="mb-3">
Thank you for your support! Read the full announcement
<a
className="remixui_home_text mx-1"
onClick={() => _paq.push(['trackEvent', 'hometab', 'featuredSection', 'soliditySurvey24'])}
target="__blank"
href="https://soliditylang.org/blog/2024/12/27/solidity-developer-survey-2024-announcement/"
>
here.
</a>
</p>
</div>
</div>
<div className="mr-1 pr-1 d-flex align-items-center justify-content-center h-100">
<a href={releaseDetails.moreLink} target="__blank">
<img src={'assets/img/remi_drums_whatsnew.webp'} className="remixui_carouselImage" alt=""></img>
Expand Down
Loading

0 comments on commit 4ac77c2

Please sign in to comment.