Merge branch 'master' into matv

pull/5480/head
Joseph Izang 1 month ago committed by GitHub
commit 50b8fd00a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CONTRIBUTING.md
  2. 6
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  3. 2
      apps/remix-ide-e2e/src/tests/dgit_local.test.ts
  4. 2
      apps/remix-ide-e2e/src/tests/url.test.ts
  5. 2
      apps/remixdesktop/TEST.md
  6. 2
      apps/remixdesktop/test/lib/git.ts
  7. 2
      apps/vyper/webpack.config.js
  8. 2
      libs/remix-ai-core/src/agents/securityAgent.ts
  9. 2
      libs/remix-ai-core/src/types/constants.ts
  10. 6
      libs/remix-ai-core/src/types/models.ts
  11. 2
      libs/remix-ai-core/src/types/types.ts
  12. 8
      libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts
  13. 2
      libs/remix-astwalker/src/types.ts
  14. 4
      libs/remix-core-plugin/src/lib/compiler-artefacts.ts
  15. 6
      libs/remix-debug/src/Ethdebugger.ts
  16. 2
      libs/remix-solidity/src/compiler/helper.ts
  17. 2
      libs/remix-ui/renderer/src/lib/renderer.tsx
  18. 4
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  19. 2
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -30,7 +30,7 @@ There are many languages, for each project. But if you do not see your desired
In addition to writing translations, you can also review other's work.
### How to make your plugin suport string internationalization?
### How to make your plugin support string internationalization?
First, put the string in the locale file located under `apps/remix-ide/src/app/tabs/locales/en`.
Each json file corresponds to a module. If the module does not exist, then create a new json and import it in the `index.js`.
Then you can replace the string with an intl component. The `id` prop will be the key of this string.

@ -253,9 +253,9 @@ module.exports = {
.clickLaunchIcon('solidity')
.waitForElementVisible('*[data-id="scConfigExpander"]')
.click('*[data-id="scManualConfiguration"]')
.waitForElementVisible('select[id="compilierLanguageSelector"]', 10000)
.click('select[id="compilierLanguageSelector"]')
.click('select[id="compilierLanguageSelector"] option[value=Yul]')
.waitForElementVisible('select[id="compilerLanguageSelector"]', 10000)
.click('select[id="compilerLanguageSelector"]')
.click('select[id="compilerLanguageSelector"] option[value=Yul]')
.waitForElementContainsText('[data-id="compiledContracts"]', 'Contract', 65000)
.clickLaunchIcon('udapp')
.click('*[data-id="Deploy - transact (not payable)"]')

@ -583,7 +583,7 @@ async function createCommitOnLocalServer(path: string, message: string) {
});
git.stderr.on('data', function (data) {
console.error('data commiting', data.toString());
console.error('data committing', data.toString());
reject(data.toString());
});

@ -265,7 +265,7 @@ module.exports = {
locateStrategy: 'xpath'
})
.assert.containsText('#evmVersionSelector option[data-id="selected"]', 'istanbul')
.assert.containsText('#compilierLanguageSelector option[data-id="selected"]', 'Yul')
.assert.containsText('#compilerLanguageSelector option[data-id="selected"]', 'Yul')
.verify.elementPresent('#optimize:checked')
.verify.elementPresent('#autoCompile:checked')
.verify.attributeEquals('#runs', 'value', '300')

@ -35,7 +35,7 @@ Normally when you would do a 'real' release you would package remix IDE into the
### Local testing
In order to facilitate local testing nightwatch will boot the executable with the --e2e-local flag when running locally ( so outside of CIRCLE CI ). This means the electron app with load the local running Remix IDE.
In order to facilitate local testing nightwatch will boot the executable with the --e2e-local flag when running locally ( so outside of CIRCLE CI ). This means the electron app will load the local running Remix IDE.
So to start testing locally
- run the IDE with 'yarn serve' as you would normally do.

@ -147,7 +147,7 @@ export async function createCommitOnLocalServer(path: string, message: string) {
});
git.stderr.on('data', function (data) {
console.error('data commiting', data.toString());
console.error('data committing', data.toString());
reject(data.toString());
});

@ -48,7 +48,7 @@ module.exports = composePlugins(withNx(), (config) => {
})
)
// souce-map loader
// source-map loader
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],

@ -2,7 +2,7 @@
import * as fs from 'fs';
class SecurityAgent {
private codebase: string[]; // list of code base file
private codebase: string[]; // list of code base files
public currentFile: string;
constructor(codebasePath: string) {

@ -6,4 +6,4 @@ export enum ModelType {
CODE_COMPLETION_INSERTION = 'code_completion_insertion',
}
export const COMPLETION_SYSTEM_PROMPT = "You are a Solidity AI Assistant that complete user code with provided context. You provide accurate solution and always answer as helpfully as possible, while being safe. You only provide code using this context:\n"
export const COMPLETION_SYSTEM_PROMPT = "You are a Solidity AI Assistant that completes user code with provided context. You provide accurate solution and always answer as helpfully as possible, while being safe. You only provide code using this context:\n"

@ -26,7 +26,7 @@ const DefaultModels = (): IModel[] => {
};
const model3: IModel = {
name: 'llaama3.1_8B',
name: 'llama3.1_8B',
modelOP: RemoteBackendOPModel.CODELLAMA,
task: 'text-generation',
modelName: 'llama3_1_8B-q4_0.gguf',
@ -36,7 +36,7 @@ const DefaultModels = (): IModel[] => {
};
const model4: IModel = {
name: 'llaama3.1_8B_instruct',
name: 'llama3.1_8B_instruct',
modelOP: RemoteBackendOPModel.CODELLAMA,
task: 'text-generation',
modelName: 'llama3_1_8B-q4_0_instruct.gguf',
@ -82,4 +82,4 @@ const GenerationParams:IParams = {
terminal_output: false,
}
export { DefaultModels, CompletionParams, InsertionParams, GenerationParams }
export { DefaultModels, CompletionParams, InsertionParams, GenerationParams }

@ -1,6 +1,6 @@
// model implementation for the model selection component
import exp from 'constants';
import constants from 'constants';
import { ModelType } from './constants';
export interface IModelRequirements{

@ -11,7 +11,7 @@ import {
type WrapFunction = ((contracts: ContractHLAst[], isSameName: boolean, version: string) => ReportObj[])
export default class abstractAstView {
export default class AbstractAstView {
contracts: ContractHLAst[] = []
currentContractIndex = -1
currentFunctionIndex = -1
@ -91,7 +91,7 @@ export default class abstractAstView {
parameters: this.getLocalParameters(node)
})
} else if (node.nodeType === 'ModifierInvocation') {
if (!this.isFunctionNotModifier) throw new Error('abstractAstView.js: Found modifier invocation outside of function scope.')
if (!this.isFunctionNotModifier) throw new Error('AbstractAstView.js: Found modifier invocation outside of function scope.')
this.getCurrentFunction().modifierInvocations.push(node)
} else if (relevantNodeFilter(node)) {
let scope: FunctionHLAst | ModifierHLAst | ContractHLAst = (this.isFunctionNotModifier) ? this.getCurrentFunction() : this.getCurrentModifier()
@ -130,7 +130,7 @@ export default class abstractAstView {
if (inheritsFrom) {
currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables)
} else {
console.log('abstractAstView.js: could not find contract definition inherited from ' + inheritsFromName)
console.log('AbstractAstView.js: could not find contract definition inherited from ' + inheritsFromName)
}
})
}
@ -138,7 +138,7 @@ export default class abstractAstView {
private setCurrentContract (contract: ContractHLAst): void {
const name: string = getContractName(contract.node)
if (this.contracts.map((c: ContractHLAst) => getContractName(c.node)).filter((n) => n === name).length > 0) {
console.log('abstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment')
console.log('AbstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment')
this.multipleContractsWithSameName = true
}
this.currentContractIndex = (this.contracts.push(contract) - 1)

@ -1,5 +1,5 @@
// FIXME: should this be renamed to indicate its offset/length orientation?
// Add "reaadonly property"?
// Add "readonly property"?
export interface Location {
start: number;
length: number;

@ -68,7 +68,7 @@ export class CompilerArtefacts extends Plugin {
/**
* Get compilation output for contracts compiled during a session of Remix IDE
* @returns compilatin output
* @returns compilation output
*/
getAllContractDatas() {
return this.filterAllContractDatas(() => true)
@ -76,7 +76,7 @@ export class CompilerArtefacts extends Plugin {
/**
* filter compilation output for contracts compiled during a session of Remix IDE
* @returns compilatin output
* @returns compilation output
*/
filterAllContractDatas(filter) {
const contractsData = {}

@ -10,13 +10,13 @@ import { SolidityProxy, stateDecoder, localDecoder, InternalCallTree } from './s
import { extractStateVariables } from './solidity-decoder/stateDecoder'
/**
* Ethdebugger is a wrapper around a few classes that helps debugging a transaction
* Ethdebugger is a wrapper around a few classes that helps debug a transaction
*
* - TraceManager - Load / Analyze the trace and retrieve details of specific test
* - CodeManager - Retrieve loaded byte code and help to resolve AST item from vmtrace index
* - SolidityProxy - Basically used to extract state variable from AST
* - Breakpoint Manager - Used to add / remove / jumpto breakpoint
* - InternalCallTree - Used to retrieved local variables
* - Breakpoint Manager - Used to add / remove / jump to breakpoint
* - InternalCallTree - Used to retrieve local variables
* - StorageResolver - Help resolving the storage across different steps
*
* @param {Map} opts - { function compilationResult } //

@ -39,7 +39,7 @@ export default {
// ^ e.g:
// browser/gm.sol: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.12
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0/contracts/introspection/IERC1820Registry.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.7.4+commit.3f05b770.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0/contracts/introspection/IERC1820Registry.sol: ParserError: Source file requires different compiler version (current compiler is 0.7.4+commit.3f05b770.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
getPositionDetails: (msg: string) => {
const result = { } as Record<string, number | string>

@ -47,7 +47,7 @@ export const Renderer = ({ message, opt, plugin, context }: RendererProps) => {
// ^ e.g:
// browser/gm.sol: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.12
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0/contracts/introspection/IERC1820Registry.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.7.4+commit.3f05b770.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0/contracts/introspection/IERC1820Registry.sol: ParserError: Source file requires different compiler version (current compiler is 0.7.4+commit.3f05b770.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
if (!opt.errLine) {
const positionDetails = helper.getPositionDetails(text)

@ -927,7 +927,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
</div>
<div className={`flex-column 'd-flex'}`}>
<div className="mb-2 ml-4">
<label className="remixui_compilerLabel form-check-label" htmlFor="compilierLanguageSelector">
<label className="remixui_compilerLabel form-check-label" htmlFor="compilerLanguageSelector">
<FormattedMessage id="solidity.language" />
</label>
<CustomTooltip
@ -946,7 +946,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
disabled={state.useFileConfiguration}
value={state.language}
className="custom-select"
id="compilierLanguageSelector"
id="compilerLanguageSelector"
style={{
pointerEvents: state.useFileConfiguration ? 'none' : 'auto'
}}

@ -247,7 +247,7 @@ export const TabsUI = (props: TabsUIProps) => {
<div className="d-flex border-left ml-2 align-items-center" style={{ height: "3em" }}>
<CustomTooltip
placement="bottom"
tooltipId="overlay-tooltip-explaination"
tooltipId="overlay-tooltip-explanation"
tooltipText={
<span>
{((tabsState.currentExt === 'sol') || (tabsState.currentExt === 'vy') || (tabsState.currentExt === 'circom')) ? (

Loading…
Cancel
Save