Add url parmas test for proxy deployment

pull/5370/head
David Disu 2 years ago committed by Aniket
parent cb23fd0219
commit 80a1f4fe70
  1. 34
      apps/remix-ide-e2e/src/tests/url.test.ts
  2. 7
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx

@ -5,7 +5,39 @@ import init from '../helpers/init'
import examples from '../examples/example-contracts'
const sources = [
{ 'Untitled.sol': { content: examples.ballot.content } }
{ 'Untitled.sol': { content: examples.ballot.content } },
{
'myTokenV1.sol': {
content: `
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize() initializer public {
__ERC721_init("MyToken", "MTK");
__Ownable_init();
__UUPSUpgradeable_init();
}
function _authorizeUpgrade(address newImplementation)
internal
onlyOwner
override
{}
}
`
}
}
]
module.exports = {

@ -26,11 +26,8 @@ export function ContractGUI (props: ContractGUIProps) {
useEffect(() => {
if (props.deployOption && Array.isArray(props.deployOption)) {
if (props.deployOption[0] && props.deployOption[0].title === 'Deploy with Proxy') {
handleDeployProxySelect(props.deployOption[0].active)
} else if (props.deployOption[1] && props.deployOption[1].title === 'Deploy with Proxy') {
handleUpgradeImpSelect(props.deployOption[1].active)
}
if (props.deployOption[0] && props.deployOption[0].title === 'Deploy with Proxy' && props.deployOption[0].active) handleDeployProxySelect(true)
else if (props.deployOption[1] && props.deployOption[1].title === 'Upgrade with Proxy' && props.deployOption[1].active) handleUpgradeImpSelect(true)
}
}, [props.deployOption])

Loading…
Cancel
Save