allow yul deployment

pull/2696/head
Aniket-Engg 2 years ago committed by Aniket
parent 3610439d0e
commit 2c95f7b799
  1. 2
      libs/remix-core-plugin/src/lib/compiler-metadata.ts
  2. 2
      libs/remix-core-plugin/src/lib/editor-context-listener.ts
  3. 4
      libs/remix-ui/run-tab/src/lib/actions/events.ts

@ -87,7 +87,7 @@ export class CompilerMetadata extends Plugin {
let parsedMetadata
try {
parsedMetadata = JSON.parse(contract.object.metadata)
parsedMetadata = contract.object && contract.object.metadata ? JSON.parse(contract.object.metadata) : null
} catch (e) {
console.log(e)
}

@ -92,7 +92,7 @@ export class EditorContextListener extends Plugin {
this._stopHighlighting()
this.currentPosition = cursorPosition
this.currentFile = file
if (compilationResult && compilationResult.data && compilationResult.data.sources[file]) {
if (compilationResult && compilationResult.data && compilationResult.data.sources && compilationResult.data.sources[file]) {
const nodes = sourceMappingDecoder.nodesAtPosition(null, cursorPosition, compilationResult.data.sources[file])
this.nodes = nodes
if (nodes && nodes.length && nodes[nodes.length - 1]) {

@ -95,7 +95,6 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
const broadcastCompilationResult = async (plugin: RunTab, dispatch: React.Dispatch<any>, file, source, languageVersion, data, input?) => {
// TODO check whether the tab is configured
const compiler = new CompilerAbstract(languageVersion, data, source, input)
plugin.compilersArtefacts[languageVersion] = compiler
plugin.compilersArtefacts.__last = compiler
@ -103,9 +102,8 @@ const broadcastCompilationResult = async (plugin: RunTab, dispatch: React.Dispat
return { name: languageVersion, alias: contract.name, file: contract.file, compiler }
})
const index = contracts.findIndex(contract => contract.alias === plugin.REACT_API.contracts.currentContract)
if ((index < 0) && (contracts.length > 0)) dispatch(setCurrentContract(contracts[0].alias))
const isUpgradeable = await plugin.call('openzeppelin-proxy', 'isConcerned', data.sources[file] ? data.sources[file].ast : {})
const isUpgradeable = await plugin.call('openzeppelin-proxy', 'isConcerned', data.sources && data.sources[file] ? data.sources[file].ast : {})
if (isUpgradeable) {
const options = await plugin.call('openzeppelin-proxy', 'getProxyOptions', data, file)

Loading…
Cancel
Save