Apps: EVM Contracts

Created on 22 Nov 2019  ·  5Comments  ·  Source: polkadot-js/apps

Hey Jaco.

Did you spend some thoughts on EVM contracts yet? Maybe to have different tabs for Webassembly and Ethereum VMs? What would be required to access the EVM pallet?

So, I have enabled the EVM module for our runtime in https://github.com/dothereum/dothereum/pull/49 however, the Polkadot UI fails to load the chain's metadata.

Screenshot at 2019-11-22 10-33-14

WS endpoint= ws://127.0.0.1:9944/
web3Enable: Enabled 0 extensions: 
2019-11-22 10:24:21        RPC-CORE: getMetadata(block?: Hash): Metadata:: createType(Metadata):: Unable to find plain type for {"info":6,"type":"Log"}
m @ main.d71de1ea.js:52
2019-11-22 10:24:21   API/DECORATOR: Error: FATAL: Unable to initialize the API: getMetadata(block?: Hash): Metadata:: createType(Metadata):: Unable to find plain type for {"info":6,"type":"Log"}
    at u._onProviderConnect (main.d71de1ea.js:73)
m @ main.d71de1ea.js:52

(Is this unrelated? It used to work previously.)

Running dothereum 0.2.2-d0b5fdc-x86_64-linux-gnu from the s1-evm-runtime branch in --dev mode.

~/.opt/dothereum s1-evm-runtime
❯ target/release/dothereum --dev 
2019-11-22 10:04:01 Running in --dev mode, RPC CORS has been disabled.
2019-11-22 10:04:01   _ _    Dothereum Node
2019-11-22 10:04:01  | | \      version 0.2.2-d0b5fdc-x86_64-linux-gnu
2019-11-22 10:04:01  | |\_\     by Schoedon, Akinfiev, 2019 - 2020
2019-11-22 10:04:01  | |/ /  Chain specification: Dothereum Development
2019-11-22 10:04:01  |_|_/   Node name: embarrassed-lift-3179
2019-11-22 10:04:01          Roles: AUTHORITY
2019-11-22 10:04:01 Initializing Genesis block/state (state: 0xae9a…7815, header-hash: 0xb291…1f0c)
2019-11-22 10:04:01 Loading GRANDPA authority set from genesis on what appears to be first startup.
2019-11-22 10:04:01 Loaded block-time = 15000 milliseconds from genesis on first-launch
2019-11-22 10:04:01 Highest known block at #0
2019-11-22 10:04:01 Using default protocol ID "sup" because none is configured in the chain specs
2019-11-22 10:04:01 Local node identity is: QmRwwwiC8MykNCq8wZPsoEEpke8o9SshtaQGcPAh4weDEf
2019-11-22 10:04:06 Idle (0 peers), best: #0 (0xb291…1f0c), finalized #0 (0xb291…1f0c), ⬇ 0 ⬆ 0
-size-m @app-contracts

All 5 comments

The API needs to be updated with the new types. No types for the EVM module has been added.

The API types track Polkadot/Substrate master branches, for all other chains the custom types needs to be defined and added - in this case since it is a pallet, I should probably be added to the base. (Although it will be very tough to keep updated unless a default, i.e. the tooling complains on missing types based on the default metadata)

As for the second part of the question - I would make sense to support it yes, when that will happen UI-wise I have no idea.

At least the type stuff should now not disallow the UI to load. (It will still complain and it still needs to be to added to be usable)

Closing this.

Like any urgent vs important discussion (which is how the next-up it prioritized), this doesn't mean it it won't add value, but rather that it won't get any focus. So the options are to have it sit gathering more dust or just be honest that based on capacity and focus-wise it will not get addressed.

If there is appetite for PRs to move things in the direction intended here, they will always be welcome.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

Was this page helpful?
0 / 5 - 0 ratings