disable deploy and execute kind

pull/2260/head
David Disu 3 years ago
parent 56f3c745e4
commit dd39916cb0
  1. 11
      libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts
  2. 21
      libs/remix-ui/run-tab/src/lib/actions/index.ts

@ -11,6 +11,7 @@ const UUPS = '@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.so
export class OpenZeppelinProxy extends Plugin {
blockchain: any
kind: 'UUPS' | 'Transparent'
constructor(blockchain) {
super(proxyProfile)
this.blockchain = blockchain
@ -18,11 +19,19 @@ export class OpenZeppelinProxy extends Plugin {
async isConcerned(ast: ContractAST): Promise<boolean> {
// check in the AST if it's an upgradable contract
if (ast.nodes.find(node => node.absolutePath === UUPS)) return true
if (ast.nodes.find(node => node.absolutePath === UUPS)) {
this.kind = 'UUPS'
return true
}
return false
}
async execute(contractData: ContractData, contractMetadata: any, compiledContracts: any) {
// deploy the proxy, or use an existing one
if (this.kind === 'UUPS') this.deployUUPSProxy()
}
async deployUUPSProxy () {
}
}

@ -483,16 +483,17 @@ export const createInstance = async (
return terminalLogger(log)
}))
}
deployContract(selectedContract, args, contractMetadata, compilerContracts, {
continueCb: (error, continueTxExecution, cancelCb) => {
continueHandler(gasEstimationPrompt, error, continueTxExecution, cancelCb)
},
promptCb: (okCb, cancelCb) => {
promptHandler(passphrasePrompt, okCb, cancelCb)
},
statusCb,
finalCb
}, confirmationCb)
await plugin.call('openzeppelin-proxy', 'execute')
// deployContract(selectedContract, args, contractMetadata, compilerContracts, {
// continueCb: (error, continueTxExecution, cancelCb) => {
// continueHandler(gasEstimationPrompt, error, continueTxExecution, cancelCb)
// },
// promptCb: (okCb, cancelCb) => {
// promptHandler(passphrasePrompt, okCb, cancelCb)
// },
// statusCb,
// finalCb
// }, confirmationCb)
}
const deployContract = (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) => {

Loading…
Cancel
Save