sourcifyeth / remix-sourcify

Remix plugin for source verify project
21 stars 12 forks source link

Rebase #57

Closed bunsenstraat closed 3 years ago

FabijanC commented 3 years ago

Ok, so the summary of this PR is that it updates the plugin to use a newer Remix plugin version which enables the methods to be called directly via this instead of this.client? I saw you reacted to this comment. Are you in charge of handling routing and can that be done once this PR #57 is merged?

bunsenstraat commented 3 years ago

No, the exposed methods would not have worked in any version: If you create a pluginclient like this the methods need to be exposed on that class

class SourcifyPlugin extends PluginClient {
    constructor() {
        super()
        this.methods = ["fetch", "fetchAndSave", "fetchByNetwork", "verify", "verifyByNetwork"];
    }
}

But the SourcifyPlugin class did not have those methods, the methods were created on RemixClient. So they could not be called from the IDE or another plugin. So either way you have to define the methods on the PluginClient itself. Your calls worked of course because you used the SourcifyPlugin to call, but you could not be called.

The newer version of the plugin is to ensure compatibility for VSCODE and API changes.

If you merge and deploy you can create a PR in https://github.com/ethereum/remix-plugins-directory for the updated IPFS link. OR I will publish it myself.

FabijanC commented 3 years ago

Ok, thanks for the update. I will merge this PR. I can also introduce the new IPFS link in a PR to ethereum/remix-plugins-directory, but last time I did that (link), it went unmerged. Might be because profile.json already contains a symbolic name (https://sourcify.web.app/), so the rerouting is done behind the PR?

bunsenstraat commented 3 years ago

No I merged and pushed to web.app because we made a lot of updates. then but it's not necessary now, please create the IPFS I will approve it.

FabijanC commented 3 years ago

@bunsenstraat This is the IPFS address: ipfs://QmaMqVAW6r1AsUDT4WXkf8tx14MMVkvWbTLoBpHsfqiwds