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 ...
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<...
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 :...
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 ...
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 ...
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....
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 = ...
3
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 ...
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....
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!({
...
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"
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 ...
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 ...
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/ , ...
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 ...
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.
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/...
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.
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 (...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rust × 46solidity × 9
stylus × 9
arbitrum × 7
openethereum × 5
foundry × 4
ethers.rs × 4
web3js × 3
blockchain × 3
evm × 3
go-ethereum × 2
transactions × 2
javascript × 2
events × 2
golang × 2
substrate × 2
contract-development × 1
tokens × 1
erc-20 × 1
ether × 1
metamask × 1
contract-deployment × 1
wallets × 1
dapps × 1
security × 1