Merge branch 'master' into desktop-master

pull/5200/head
bunsenstraat 2 months ago committed by GitHub
commit 4dd9650c5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts
  2. 35
      apps/remix-ide-e2e/src/tests/eip1153.test.ts
  3. 14
      apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
  4. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts
  5. 6
      apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json
  6. 2
      libs/remix-analyzer/package.json
  7. 2
      libs/remix-astwalker/package.json
  8. 2
      libs/remix-debug/package.json
  9. 2
      libs/remix-simulator/package.json
  10. 2
      libs/remix-solidity/package.json
  11. 6
      libs/remix-tests/package.json
  12. 2
      libs/remix-ui/settings/src/lib/remix-ui-settings.tsx
  13. 14
      libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx
  14. 8
      package.json
  15. 18
      yarn.lock

@ -90,6 +90,8 @@ module.exports = {
browser browser
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.20+commit.a1b79de6.js') .setSolidityCompilerVersion('soljson-v0.8.20+commit.a1b79de6.js')
.click('*[data-id="scConfigExpander"]')
.setValue('#evmVersionSelector', 'berlin') // set target EVM for parser to berlin
.addFile('contracts/mytoken.sol', { .addFile('contracts/mytoken.sol', {
content: myToken content: myToken
}).useXpath().waitForElementVisible("//*[@class='view-line' and contains(.,'gas')]") }).useXpath().waitForElementVisible("//*[@class='view-line' and contains(.,'gas')]")

@ -31,7 +31,21 @@ module.exports = {
1: 'uint256: out2 15' 1: 'uint256: out2 15'
} }
}) })
.end() },
'Should clear transient storage after tx execution #group1' : function (browser: NightwatchBrowser) {
browser.addFile('clear_transient.sol', { content: clearTransient })
.verifyContracts(['ClearTransient'])
.clickLaunchIcon('udapp')
.createContract('')
.clickInstance(1)
.clickFunction('get - call')
.testFunction('last',
{
'decoded output': {
0: 'uint256: 0'
}
})
} }
} }
@ -49,3 +63,22 @@ contract TestTransientStorage {
} }
} }
}` }`
const clearTransient = `
// SPDX-License-Identifier: none
pragma solidity 0.8.26;
import "hardhat/console.sol";
contract ClearTransient {
uint p;
constructor() {
uint256 value;
assembly { value := tload(hex"1234") }
p = value;
assembly { tstore(hex"1234", 10) }
}
function get () public view returns (uint) {
return p;
}
}`

@ -246,13 +246,13 @@ module.exports = {
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000) .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000) .waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000)
.pause(2000) .pause(2000)
.assert.containsText('#journal > div:nth-child(4) > span', 'Before all:') .assert.textContains('#journal > div:nth-child(3) > span', 'Before all:')
.assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll') .assert.textContains('#journal > div:nth-child(3) > span', 'Inside beforeAll')
.assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:') .assert.textContains('#journal > div:nth-child(4) > span', 'Check sender:')
.assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') .assert.textContains('#journal > div:nth-child(4) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4')
.assert.containsText('#journal > div:nth-child(6) > span', 'Check int logs:') .assert.textContains('#journal > div:nth-child(5) > span', 'Check int logs:')
.assert.containsText('#journal > div:nth-child(6) > span', '10 20') .assert.textContains('#journal > div:nth-child(5) > span', '10 20')
.assert.containsText('#journal > div:nth-child(6) > span', 'Number is 25') .assert.textContains('#journal > div:nth-child(5) > span', 'Number is 25')
.openFile('tests/hhLogs_test.sol') .openFile('tests/hhLogs_test.sol')
.removeFile('tests/hhLogs_test.sol', 'workspace_new') .removeFile('tests/hhLogs_test.sol', 'workspace_new')
}, },

@ -161,7 +161,7 @@ export default class CodeParserCompiler {
"*": ["evm.gasEstimates"] "*": ["evm.gasEstimates"]
} }
}, },
"evmVersion": state.evmVersion && state.evmVersion.toString() || "berlin", "evmVersion": state.evmVersion && state.evmVersion.toString() || "cancun",
} }
} }

@ -4,10 +4,10 @@
"remixUiTabs.tooltipText3": "Select .sol or .yul file to compile OR a .ts or .js file to run", "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile OR a .ts or .js file to run",
"remixUiTabs.tooltipText4": "To explain a contract, choose a .sol file", "remixUiTabs.tooltipText4": "To explain a contract, choose a .sol file",
"remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]", "remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]",
"remixUiTabs.tooltipText6": "Enable Remix AI Copilot [BETA]", "remixUiTabs.tooltipText6": "Enable RemixAI Copilot [BETA]",
"remixUiTabs.tooltipText7": "Disable Remix AI Copilot [BETA]", "remixUiTabs.tooltipText7": "Disable RemixAI Copilot [BETA]",
"remixUiTabs.tooltipText8": "Remix AI Tools Documentation", "remixUiTabs.tooltipText8": "Remix AI Tools Documentation",
"remixUiTabs.tooltipTextDisabledCopilot": "To use Remix AI Copilot, choose a .sol file", "remixUiTabs.tooltipTextDisabledCopilot": "To use RemixAI Copilot, choose a .sol file",
"remixUiTabs.zoomOut": "Zoom out", "remixUiTabs.zoomOut": "Zoom out",
"remixUiTabs.zoomIn": "Zoom in" "remixUiTabs.zoomIn": "Zoom in"
} }

@ -24,7 +24,7 @@
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@remix-project/remix-astwalker": "^0.0.86", "@remix-project/remix-astwalker": "^0.0.86",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"async": "^2.6.2", "async": "^2.6.2",

@ -36,7 +36,7 @@
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"@types/tape": "^4.2.33", "@types/tape": "^4.2.33",
"async": "^2.6.2", "async": "^2.6.2",

@ -25,7 +25,7 @@
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@remix-project/remix-astwalker": "^0.0.86", "@remix-project/remix-astwalker": "^0.0.86",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"@remix-project/remix-simulator": "^0.2.56", "@remix-project/remix-simulator": "^0.2.56",

@ -21,7 +21,7 @@
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@metamask/eth-sig-util": "^7.0.2", "@metamask/eth-sig-util": "^7.0.2",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"ansi-gray": "^0.1.1", "ansi-gray": "^0.1.1",

@ -18,7 +18,7 @@
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"async": "^2.6.2", "async": "^2.6.2",
"eslint-scope": "^5.0.0", "eslint-scope": "^5.0.0",

@ -40,7 +40,7 @@
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-lib": "^0.5.63",
"@remix-project/remix-simulator": "^0.2.56", "@remix-project/remix-simulator": "^0.2.56",
"@remix-project/remix-solidity": "^0.5.42", "@remix-project/remix-solidity": "^0.5.42",
@ -81,11 +81,11 @@
"@ethereumjs/blockchain": "7.3.0", "@ethereumjs/blockchain": "7.3.0",
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/evm": "3.1.0", "@ethereumjs/evm": "3.1.1",
"@ethereumjs/statemanager": "2.4.0", "@ethereumjs/statemanager": "2.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@ethereumjs/trie": "6.2.1" "@ethereumjs/trie": "6.2.1"
}, },
"typings": "src/index.d.ts", "typings": "src/index.d.ts",

@ -139,13 +139,11 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => {
const onchangeCopilotActivate = () => { const onchangeCopilotActivate = () => {
if (!props.useCopilot) { if (!props.useCopilot) {
copilotActivate(props.config, props.useCopilot, dispatch) copilotActivate(props.config, props.useCopilot, dispatch)
props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot not activated!` })
return return
} }
const startCopilot = async () => { const startCopilot = async () => {
copilotActivate(props.config, props.useCopilot, dispatch) copilotActivate(props.config, props.useCopilot, dispatch)
props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot activated!` })
} }
startCopilot() startCopilot()

@ -14,13 +14,11 @@ export default function AIStatus(props: AIStatusProps) {
const [copilotActive, setCopilotActive] = useState(false) const [copilotActive, setCopilotActive] = useState(false)
useEffect(() => { useEffect(() => {
const run = async () => { const run = async () => {
props.plugin.on('fileManager', 'currentFileChanged', async (isAiActive) => { const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate')
const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') setCopilotActive(aiActivate)
setCopilotActive(aiActivate)
})
} }
run() run()
}, [props.plugin.isAiActive, props.isAiActive]) }, [])
useEffect(() => { useEffect(() => {
const run = async () => { const run = async () => {
@ -30,14 +28,14 @@ export default function AIStatus(props: AIStatusProps) {
}) })
} }
run() run()
}, [props.plugin.isAiActive]) }, [props.plugin.isAiActive, props.plugin.isAiActive])
return ( return (
<CustomTooltip <CustomTooltip
tooltipText={copilotActive ? "Remix Copilot activated" : "Remix Copilot disabled. To activate copilot, open a .sol file and toggle the ai switch at the top of the Ide"} tooltipText={copilotActive ? "RemixAI Copilot enabled" : "RemixAI Copilot disabled. To enable, open a .sol file and toggle the switch at the left-top of the editor"}
> >
<div className="d-flex flex-row pr-2 text-white justify-content-center align-items-center"> <div className="d-flex flex-row pr-2 text-white justify-content-center align-items-center">
<span className={copilotActive === false ? "small mx-1 text-white semi-bold" : "small mx-1 text-white semi-bold" }> <span className={copilotActive === false ? "small mx-1 text-white semi-bold" : "small mx-1 text-white semi-bold" }>
{copilotActive === false ? 'Remix Copilot (disabled)' : 'Remix Copilot (enabled)'} {copilotActive === false ? 'RemixAI Copilot (disabled)' : 'RemixAI Copilot (enabled)'}
</span> </span>
</div> </div>
</CustomTooltip> </CustomTooltip>

@ -92,11 +92,11 @@
"@erebos/bzz-node": "^0.13.0", "@erebos/bzz-node": "^0.13.0",
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/evm": "3.1.0", "@ethereumjs/evm": "3.1.1",
"@ethereumjs/statemanager": "2.4.0", "@ethereumjs/statemanager": "2.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@ethersphere/bee-js": "^3.2.0", "@ethersphere/bee-js": "^3.2.0",
"@floating-ui/react": "^0.26.15", "@floating-ui/react": "^0.26.15",
"@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/fontawesome-svg-core": "^6.5.1",
@ -382,11 +382,11 @@
"@ethereumjs/blockchain": "7.3.0", "@ethereumjs/blockchain": "7.3.0",
"@ethereumjs/block": "5.3.0", "@ethereumjs/block": "5.3.0",
"@ethereumjs/common": "4.4.0", "@ethereumjs/common": "4.4.0",
"@ethereumjs/evm": "3.1.0", "@ethereumjs/evm": "3.1.1",
"@ethereumjs/statemanager": "2.4.0", "@ethereumjs/statemanager": "2.4.0",
"@ethereumjs/tx": "5.4.0", "@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0", "@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0", "@ethereumjs/vm": "8.1.1",
"@ethereumjs/trie": "6.2.1" "@ethereumjs/trie": "6.2.1"
} }
} }

@ -2835,10 +2835,10 @@
bigint-crypto-utils "^3.2.2" bigint-crypto-utils "^3.2.2"
ethereum-cryptography "^2.2.1" ethereum-cryptography "^2.2.1"
"@ethereumjs/evm@3.1.0", "@ethereumjs/evm@^3.1.0": "@ethereumjs/evm@3.1.1", "@ethereumjs/evm@^3.1.1":
version "3.1.0" version "3.1.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/evm/-/evm-3.1.0.tgz#d036a7986d2a4914a82324ee4fbc2ae7a503e515" resolved "https://registry.yarnpkg.com/@ethereumjs/evm/-/evm-3.1.1.tgz#f593ea99e564ba6d916d81a833bb9af5713caf34"
integrity sha512-m6L8wPDpNDqCBeiCQDwoKtKMcFjcvctuZs6XHaVnFocMwsAsN9Wg89nAT7Gs6ic2kDUgVGhtGTvEAaH51B70ew== integrity sha512-JbDXtIn0PPZFU2oqVngje0YvW/JuNa6Y+kIYp1MCh5pn9NRplR8FkBbvb991fVSSo6AzuFMHJxSwgVl+OksnvQ==
dependencies: dependencies:
"@ethereumjs/common" "^4.4.0" "@ethereumjs/common" "^4.4.0"
"@ethereumjs/statemanager" "^2.4.0" "@ethereumjs/statemanager" "^2.4.0"
@ -2914,15 +2914,15 @@
ethereum-cryptography "^2.0.0" ethereum-cryptography "^2.0.0"
micro-ftch "^0.3.1" micro-ftch "^0.3.1"
"@ethereumjs/vm@8.1.0": "@ethereumjs/vm@8.1.1":
version "8.1.0" version "8.1.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-8.1.0.tgz#9f795a7802b0ccdedd4ca45193a3895eafe51ef9" resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-8.1.1.tgz#6b58f298ee6f665d4ac412cd0d3351bb9c0ceea3"
integrity sha512-CjQ57Kl2JYMyX8UNUW2aWFWJnb7M5a8gUEtBMZ+A3K+wNNTALVPOKx9eNCiSwBn1bijB05FyvcNMnHEDwqSuiA== integrity sha512-h9gIN/maMKXltM4VxZ9ac581PPUUObnFVBniLuu9vJgGTELdnwqxLwJVxSfho/Bhk56YyvKBYf1RpHwoLZZ6xw==
dependencies: dependencies:
"@ethereumjs/block" "^5.3.0" "@ethereumjs/block" "^5.3.0"
"@ethereumjs/blockchain" "^7.3.0" "@ethereumjs/blockchain" "^7.3.0"
"@ethereumjs/common" "^4.4.0" "@ethereumjs/common" "^4.4.0"
"@ethereumjs/evm" "^3.1.0" "@ethereumjs/evm" "^3.1.1"
"@ethereumjs/rlp" "^5.0.2" "@ethereumjs/rlp" "^5.0.2"
"@ethereumjs/statemanager" "^2.4.0" "@ethereumjs/statemanager" "^2.4.0"
"@ethereumjs/trie" "^6.2.1" "@ethereumjs/trie" "^6.2.1"

Loading…
Cancel
Save