Skip to main content
4 votes
Accepted

Using Rust to call Geth's RPC interface

The params field in JSON-RPC needs to be an array, while you are passing a single serialized Param struct. To create a dynamic array containing different JSON-primitive values you can use a Vec<...
Maciej's user avatar
  • 106
4 votes
Accepted

Parity installation problem in OSX

I have worked on parity few weeks ago on OS X. This guide is for Parity 1.2. The build is very long. I suppose you have installed homebrew. Homebrew (juin 2016) have a preinstalled version of Parity :...
Ellis's user avatar
  • 2,354
4 votes

How to sign a transaction in Rust

It is a function of wallet to store and use your private key. web3 API like rust-web3 usually leave transaction signing to wallet. Therefore your option is to reuse the code in Ethereum wallets that ...
Anatoli Babenia's user avatar
4 votes

How to sign a transaction in Rust

There is a package for this called ethereum-tx-sign on crates.io. It provides a RawTransaction structure with a sign method. It doesn't have any dependency on web3 and you can sign the transactions ...
YardGlassOfCode's user avatar
3 votes
Accepted

How to generate public key from private key in Rust?

I'm also not a Rust programmer, so someone will probably have a better answer, but have a look in Parity's keypair.rs, which itself uses rust-secp256k1. Of interest is probably the KeyPair ...
Richard Horrocks's user avatar
3 votes
Accepted

How to run ethkey under Parity

I asked it on the gitter. Thanks for @maciejhirsz's answer. He told me to try this command cargo build -p ethkey-cli --release I try it under the parity source folder again. It comply successfully....
YangYifei's user avatar
  • 409
3 votes

How to sign a transaction in Rust

There's a trick using python's web3 package with cpython: let gil = Python::acquire_gil(); let py = gil.python(); let web3 = py.import("web3").unwrap(); let transaction = { let transaction = ...
AurevoirXavier's user avatar
3 votes
Accepted

Is Rust used to write smart contract code on Ethereum?

There is actually a number of programming languages used for smart contract development. Solidity, Rust, Cairo, Vyper, Clarity and likely many others. But Solidity is by far the most used and holds ...
Sky's user avatar
  • 2,332
2 votes

Foundry remapping error VS Code: foundry config error: stream did not contain valid UTF-8 in Remapping Provider

I ran into the same issue and as a workaround I did: Create file remappings.txt in vs code Run forge remappings (will display the remappings) Copy the console displayed remappings into the remappings....
donoso.eth's user avatar
  • 1,503
2 votes

Provider error: transaction would cause overdraft: I got this error when deploying to sepolia testnet

This is usually the time when your wallet has low funds, meaning that the transaction fees will cause your wallet balance to go below 0. Make sure to fund your wallet before deploying. Let me know if ...
Zartaj Afser's user avatar
  • 4,529
2 votes
Accepted

Compiling...The application panicked (crashed)

In my case problem has gone when I specify version of solc in foundry.toml config file: solc_version = "0.8.19"
KKaminsk's user avatar
2 votes

Is it possible to import foundry anvil in rust?

async fn anvil_mine() -> Result<(), reqwest::Error> { let client = reqwest::Client::new(); let res = client.post("http://127.0.0.1:8545") .json(&serde_json::json!({ ...
Clement549's user avatar
1 vote

Add a key, value pair to a sol mapping in stylus?

When you add mapping(string => string) name_to_favorite_number; into your contract SimpleStorage, you behind-the-scenes add a StorageMap<String, StorageUint<256, 4>> object to self as ...
Patrick Collins's user avatar
1 vote
Accepted

How to verify a stylus smart contract?

Well, what is verification? It's something not related to the blockchain per se, but about blockchain explorers. And the only explorer I could find was https://stylus-testnet-explorer.arbitrum.io/ , ...
Lauri Peltonen's user avatar
1 vote

how can i connect to ethereum p2p network without node?

Yes, it is possible. There are a lot of node providers that give you free API keys for interaction with the blockchain.(e.g. Alchemy, Ankr). You can use node providers to send your transactions to be ...
d3mage's user avatar
  • 11
1 vote

Uniswap V2 swap tx - invalid codepoint at offset 22; missing continuation byte

The error is not very explicit, and the fact that the exact same code was working in one situation but not the other was weird. The code finally ran when I manually provided a gas amount (gas limit) ...
Cizia's user avatar
  • 263
1 vote

Rust vs Golang, overall for smart contract development

I would suggest you to concentrate and refine your Solidity knowledge. Conserve your time and energies by keeping them concentrated at your strongest point. You gain more by finding a rich mine and ...
Yongjian P.'s user avatar
  • 4,218
1 vote

Is it possible to to deploy a smart-contract written in Solidity, on Solana?

Solana has its own EVM compatible virtual machine called Neon EVM. However it is not ready yet.
Mikko Ohtamaa's user avatar
1 vote
Accepted

How o start code in Solana contract?

Go though helloworld example on Solana https://github.com/solana-labs/example-helloworld/blob/master/src/program-rust/src/lib.rs https://github.com/solana-labs/example-helloworld/tree/master/src/...
anwar's user avatar
  • 144
1 vote
Accepted

How to deploy a contract with Rust?

This is a known bug and has been reported as Issue #410. There is also a list of open issues for the web3 crate.
Zephyrus's user avatar
  • 350
1 vote

Smart Contract Transfer Event Log Data & transfer _value [Rust]

Found the answer to my question: The data field from the returned Log struct contains indeed the transferred token amount value: The Bytes' vector needs to be converted into a hexadecimal figure (...
khangle27's user avatar
1 vote
Accepted

Comparing Rust and Solidity hash of big number or hex

The input is a hexadecimal string, so you have to first convert from hex to bytes. The code below produces the right output for me (same as web3.sha3 except for a prefix which I assume comes from the ...
user19510's user avatar
  • 28.1k

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