Skip to main content
10 votes

How to convert a Substrate address to an Etherum address?

The Ethereum address correspond to the last 20 bytes of the keccak-256 hash of the (decompressed) secp256k1 public key. For example, given the following key generated via subkey tool: ❯ subkey ...
Davide Galassi's user avatar
6 votes
Accepted

How do ECDSA subkeys differ from Bitcoin/Ethereum keys?

The process of how the private keys are derived is slightly different. This applies to both the how the (parent) key is generated and then subsequent derivations on this. In BTC/ETC and most (all ...
Jaco's user avatar
  • 5,865
4 votes
Accepted

Process ethereum transactions in an offchain worker

You can use some of the tools from: https://github.com/rust-ethereum/. Namely, if you're looking to create Ethereum transactions in an offchain worker then this should work: https://github.com/rust-...
Drew Stone's user avatar
  • 1,194
4 votes
Accepted

Polkadot Patricia Trie compatible with Ethereum implementation

Openethereum did use the same dependency but with a different node codec (https://github.com/openethereum/openethereum/tree/d8305c52ea805e62d7532c3ac76386873984d326/crates/db/patricia-trie-ethereum). ...
cheme's user avatar
  • 456
3 votes

which libp2p module do I use to broadcast data to peers in the network e.g blockchain? do I use mdns or kademlia for blockchain?

Kademlia and mDNS are different kinds of peer discovery mechanisms. For Kademlia you need at least one bootnode that you already know and from whom you can learn about other nodes of the network. mDNS ...
Aaro Altonen's user avatar
3 votes

Ethereum chain as a Substrate chain

Besides what has already been said, there was indeed a related thought experiment in the past exploring the flexibility of Substrate framework. We know Ethereum block structures vs Polkadot/Substrate ...
sorpaas's user avatar
  • 31
3 votes

How to Sign an Ethereum transaction from substrate?

You can not sign from your on chain code. Your on chain code needs to be deterministic. If you don't provide your private key to every node in the network, they could not import the block and while ...
bkchr's user avatar
  • 11.5k
3 votes

the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256` & `ethereum_types::U256`

Resolved after updating the version below two crates as ethereum = { version = "0.12", default-features = false, features = ["with-codec"] } ethereum-types = { version = "0....
Asmita's user avatar
  • 305
2 votes

convert ethereum public key to substrate public key

The EVM works in a sandbox with its own accounts (and mapped accounts). So it is possible to access all tokens within the EVM sandbox with a Ethereum signer, while EVM accounts cannot make a ...
Hoon Kim's user avatar
  • 123
2 votes

How do ECDSA subkeys differ from Bitcoin/Ethereum keys?

In Substrate related blockchains the account id is derived from the public key using SS58 encoding. See here: https://docs.substrate.io/v3/advanced/ss58/
Davide Galassi's user avatar
2 votes
Accepted

Ink smart contracts are giving build error when i am using ethabi rust crate

Add the following changes in your contact Cargo.toml [dependencies] ink = { version ="4.0.0-alpha.3", default-features = false } ethabi = { path = "../ethabi", default-features = ...
crypto sahdev's user avatar
2 votes

How to add evm and ethereum pallet from scratch into substrate node?

If you are totally new first take a look into the Substrate Documentation: Add a pallet to the runtime. Then take a look into the Frontier Node Template, it is a template node that has this two ...
Alex Bean's user avatar
  • 5,747
2 votes
Accepted

How do I use the AccountId20 and EthereumSignature Signer with polkadot.js.org?

There is an answer in Unified accounts with AURA. But that question's title is too specific. So, I try to answer this again. I think you need this to make PolkadotJS adapt for your chain. https://...
AurevoirXavier's user avatar
  • 10.6k
2 votes

Is it possible to turn a Frontier node into an Ethereum client?

Not a comprehensive answer, but I do not think this is trivial. The first and most obvious issue to me would be networking support, as ETH uses devp2p and Substrate / Frontier uses libp2p.
Shawn Tabrizi's user avatar
  • 16.1k
2 votes

Ethereum chain as a Substrate chain

Substrate plus Frontier enables Ethereum compatibility. Substrate also has various Proof of Work implementations and tweaks to the default node template that one could configure to be compliant with ...
Nuke's user avatar
  • 1,842
1 vote
Accepted

Error While Configuring EVM in Substrate Parachain: Conflict in 'syn' Crate

You will inevitably encounter this issue. Your polkadot-sdk dependencies are at version https://github.com/sayyedkamran/blockguard-node/commit/69266c74ee67d29ff8337176cd225a47ed230554#diff-...
AurevoirXavier's user avatar
  • 10.6k
1 vote
Accepted

How to query the number of EVM contracts in a chain

One way is by querying chain state for all entries of EVM::AccountCodes or EVM::AccountCodesMetadata storages and counting them. For each deployed contract, its code is stored in AccountCodes. Keep in ...
dastansam's user avatar
  • 576
1 vote

Invalid transaction:1010 Invalid: Transaction has a bad signature

Follow the steps on this tutorial Access EVM Accounts, you have to Setting -> Developer in PolkadotJS UI and define the account information to create an EVM Account as the tutorial explain. Check ...
Alex Bean's user avatar
  • 5,747
1 vote

How can I create a bridge between a solo chain created with substrate and Ethereum blockchain?

Any parachain in Polkadot could benefit from BridgeHub systemchain, though in your case being a solo-chain I think you will want to look for solutions like https://github.com/ChainSafe/chainbridge-...
Alejandro Martínez's user avatar
1 vote
Accepted

Troubleshooting Polkadot.js Recognition of Prefunded Dev Accounts on a Network Using EthereumSignature

Apps actually does have a dedicated set of ethereum-style dev accounts and it does know how to make ethereum-style signatures. The tricky part is that it only enables this feature on a few hard-coded ...
JoshOrndorff's user avatar
  • 1,201
1 vote

Troubleshooting Polkadot.js Recognition of Prefunded Dev Accounts on a Network Using EthereumSignature

There is no recognition logic, just hardcoded values https://github.com/polkadot-js/common/blob/master/packages/keyring/src/testing.ts So you just should update the addresses of prefunded accounts to ...
Bryan Chen's user avatar
1 vote

I Can't Generate The right AccountId from Ethereum(H160) Address

There isn’t Alice or Bob in H160. Use these instead: [ { "name": "Alith", "p": "...
AurevoirXavier's user avatar
  • 10.6k
1 vote

Derived H160 address is different than showing in metamask?

It depends on the deriving algorithm. // sr25519 privatek --f(privatek)--> publick1 // ecdsa privatek --g(privatek)--> publick2 // derived ecdsa (from sr25519) privatek --f(privatek)--> ...
AurevoirXavier's user avatar
  • 10.6k
1 vote

Balance becomes zero after changing Account address type from Substrate address to Ethereum address

That's true. You shouldn't see any balances. Here is how the account data is stored: Account StorageMap - 32 bytes -> account data After the runtime upgrade it was changed to: Account StorageMap - ...
AurevoirXavier's user avatar
  • 10.6k
1 vote

How to connect substrate node to metamask?

The HTTP RPC url is what you want, which is what you see at the beginning of the logs. By default this is localhost and port 9933, but you can change this with the flag --rpc-port In terms of chainId,...
Tim B's user avatar
  • 36
1 vote

Is there any way to compile ink contract to EVM bytecode?

I think it's not possible to compile ink smart contract to evm bytecode. As per ink doc here, ink contract can compile in ANY WASM VM and If anyhow if we try to compile then, I think we may face some ...
go11li's user avatar
  • 1,241
1 vote

deploy solidity ethereum to parachain with ExhaustsResources error

BlockWeights was set here. Tips: If you have sudo pallet on your chain. You could try sudo_unchecked_weight. To verify if this is the root cause.
AurevoirXavier's user avatar
  • 10.6k
1 vote
Accepted

How to make a Frontier demo for running Ethereum smart contracts?

[Solved] here are the steps to take: Go into the Frontier repo Fix the Substrate version to what you need: like polkadot-v0.9.24 Open this file repo/template/runtime/src/lib.rs Change your default ...
Russo's user avatar
  • 1,193
1 vote
Accepted

How to connect my Parachain and Ethereum to ChainBridge?

You can take a look at this documentation.
ironman_ch_parami's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible