diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
index 1be9168abb..feb70d7d62 100644
--- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
+++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
@@ -195,6 +195,26 @@ module.exports = {
.journalLastChildIncludes('"documentation": "param2 from library"')
.journalLastChildIncludes('"documentation": "param3 from library"')
.journalLastChildIncludes('Debug the transaction to get more information.')
+ },
+
+ 'Should compile and deploy 2 simple contracts, the contract creation component state should be correctly reset for the deployment of the second contract #group4': function (browser: NightwatchBrowser) {
+ browser
+ .addFile('Storage.sol', sources[6]['Storage.sol'])
+ .addFile('Owner.sol', sources[6]['Owner.sol'])
+ .clickLaunchIcon('udapp')
+ .createContract('42')
+ .openFile('Storage.sol')
+ .clickLaunchIcon('udapp')
+ .createContract('') // this creation will fail if the component hasn't been properly reset.
+ .clickInstance(1)
+ .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '24' })
+ .testFunction('last', // we check if the contract is actually reachable.
+ {
+ status: 'true Transaction mined and execution succeed',
+ 'decoded input': {
+ 'uint256 num': '24'
+ }
+ })
.end()
}
}
@@ -322,5 +342,92 @@ contract C {
}
}`
}
+ },
+ {
+ 'Owner.sol': {
+ content: `
+ // SPDX-License-Identifier: GPL-3.0
+
+ pragma solidity >=0.7.0 <0.9.0;
+
+ /**
+ * @title Owner
+ * @dev Set & change owner
+ */
+ contract Owner {
+
+ address private owner;
+
+ // event for EVM logging
+ event OwnerSet(address indexed oldOwner, address indexed newOwner);
+
+ // modifier to check if caller is owner
+ modifier isOwner() {
+ // If the first argument of 'require' evaluates to 'false', execution terminates and all
+ // changes to the state and to Ether balances are reverted.
+ // This used to consume all gas in old EVM versions, but not anymore.
+ // It is often a good idea to use 'require' to check if functions are called correctly.
+ // As a second argument, you can also provide an explanation about what went wrong.
+ require(msg.sender == owner, "Caller is not owner");
+ _;
+ }
+
+ /**
+ * @dev Set contract deployer as owner
+ */
+ constructor(uint p) {
+ owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor
+ emit OwnerSet(address(0), owner);
+ }
+
+ /**
+ * @dev Change owner
+ * @param newOwner address of new owner
+ */
+ function changeOwner(address newOwner) public isOwner {
+ emit OwnerSet(owner, newOwner);
+ owner = newOwner;
+ }
+
+ /**
+ * @dev Return owner address
+ * @return address of owner
+ */
+ function getOwner() external view returns (address) {
+ return owner;
+ }
+ }`
+ },
+ 'Storage.sol': {
+ content: `
+ // SPDX-License-Identifier: GPL-3.0
+
+ pragma solidity >=0.7.0 <0.9.0;
+
+ /**
+ * @title Storage
+ * @dev Store & retrieve value in a variable
+ */
+ contract Storage {
+
+ uint256 number;
+
+ /**
+ * @dev Store value in variable
+ * @param num value to store
+ */
+ function store(uint256 num) public {
+ number = num;
+ }
+
+ /**
+ * @dev Return value
+ * @return value of 'number'
+ */
+ function retrieve() public view returns (uint256){
+ return number;
+ }
+ }`
+ }
}
]
diff --git a/apps/remix-ide/src/app/plugins/remixd-handle.tsx b/apps/remix-ide/src/app/plugins/remixd-handle.tsx
index 68367d1df3..9ff3d8339f 100644
--- a/apps/remix-ide/src/app/plugins/remixd-handle.tsx
+++ b/apps/remix-ide/src/app/plugins/remixd-handle.tsx
@@ -142,11 +142,11 @@ function remixdDialog () {
If you are just looking for the remixd command, here it is:
-
${commandText}
+
{commandText}
- When connected, a session will be started between
${window.location.origin} and your local file system at
ws://127.0.0.1:65520.
+ When connected, a session will be started between
{window.location.origin} and your local file system at
ws://127.0.0.1:65520.
The shared folder will be in the "File Explorers" workspace named "localhost".
Read more about other
Remixd ports usage
@@ -155,7 +155,7 @@ function remixdDialog () {
- Before using, make sure remixd version is latest i.e. ${remixdVersion}
+ Before using, make sure remixd version is latest i.e. v{remixdVersion}
Read here how to update it
diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
index 73bd4f0357..1d0f594f74 100644
--- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
+++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
@@ -173,7 +173,6 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
_paq.push(['trackEvent', 'pluginManager', 'userActivate', 'sourcify'])
}
const startPluginManager = async () => {
- await plugin.appManager.activatePlugin('pluginManager')
plugin.verticalIcons.select('pluginManager')
}
diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
index 4bd6c7df96..0533030946 100644
--- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
+++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
@@ -25,6 +25,7 @@ export function ContractGUI (props: ContractGUIProps) {
} else {
setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)')
}
+ setBasicInput('')
}, [props.title, props.funcABI])
useEffect(() => {
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
index efeceed420..94a56bed15 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
@@ -7,7 +7,7 @@ interface HomeProps {
function Home ({ verticalIconPlugin }: HomeProps) {
return (
await verticalIconPlugin.activateHome()}
{...{ plugin: 'home'}}
title="Home"
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
index cb5cc56931..a0aa750e73 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
@@ -85,7 +85,7 @@ const Icon = ({
return (
<>
{
(verticalIconPlugin as any).toggle(name)
}}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
index c14e3bb47c..42d8ddbbce 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
@@ -29,6 +29,7 @@
width: 36px;
height: 36px;
border-radius: 8px;
+ align-items: center;
}
.remixui_icon img {
width: 28px;
@@ -39,15 +40,12 @@
.remixui_icon .selected-dark {
filter: invert(1) grayscale(1);
-
}
.remixui_icon .selected-light {
filter: invert(0) grayscale(1);
}
- .remixui_image {
- }
.remixui_icon svg {
width: 28px;
height: 28px;
@@ -119,9 +117,12 @@
}
.remixui_default-icons-container {
border-bottom: 2px solid #3f4455;
+ text-align: center;
}
.remixui_icon-chevron {
z-index: 1000;
+ cursor: pointer;
+ align-items: center;
}
.remixui_settings {
@@ -132,7 +133,3 @@
list-style: none;
margin: 0px;
}
-
- .remixui_icon-chevron {
- cursor: pointer;
- }
\ No newline at end of file
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
index 6d606d3149..3d4413eb4d 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
@@ -90,7 +90,7 @@ const RemixUiVerticalIconsPanel = ({
) : null
}
@@ -109,19 +109,19 @@ const RemixUiVerticalIconsPanel = ({
itemContextAction={itemContextAction}
/>
-
- { scrollableRef.current && scrollableRef.current.scrollHeight > scrollableRef.current.clientHeight ? () : null }
- p.profile.name === 'settings' || p.profile.name === 'pluginManager')}
- verticalIconsPlugin={verticalIconsPlugin}
- itemContextAction={itemContextAction}
- />
-
+
+ { scrollableRef.current && scrollableRef.current.scrollHeight > scrollableRef.current.clientHeight ? () : null }
+ p.profile.name === 'settings' || p.profile.name === 'pluginManager')}
+ verticalIconsPlugin={verticalIconsPlugin}
+ itemContextAction={itemContextAction}
+ />
+
)