All Questions
18 questions
0
votes
0
answers
12
views
DNS using blockchain (how can i hashed my domain name ) in the code below help me to complete this code
import Web3 from "web3";
import Registry from "./contracts/Registry.json";
import Resolver from "./contracts/Resolver.json";
import Cache from "./contracts/Cache....
0
votes
0
answers
140
views
How to get order hash?
I have an order in the form of a js object:
let order = {
chainId: '56',
exchangeAddress: '0x',
makerAddress: wallet,
takerAddress: '0x0000000000000000000000000000000000000000',
...
1
vote
1
answer
382
views
How to know if a transaction gets dropped and txhash becomes irrelevant before its mined
I am using a web3 sendTransaction function to send coins, and then storing the transactionHash in my databse
await web3SendInstance.eth.sendTransaction({to:receiveAddress, from:web3.eth.defaultAccount,...
8
votes
2
answers
6k
views
Solidity's keccak256 hash doesn't match WEB3 keccak hash
TL;DR: I have a method in a contract to calculate a keccak256 hash, and I'm trying to replicate it in Web3, but the hashes don't match. My problem is very similar to the one in this question, but the ...
0
votes
1
answer
1k
views
Keccak256 hash different in solidity and web3js
I am trying to sign a message in NodeJS and verify the signature with smart contract. Here is my code:
async function prepareAndSignMessage(to, amount, referenceTransaction){
let contractInstance =...
0
votes
1
answer
7k
views
web3 eth return returns a nonexistent transaction hash
I'm trying to create transactions something like this:
var sender = meth.eth.accounts.privateKeyToAccount(data.fromPrivate)
meth.sendTransaction({
sender,
to: data.to,
amount: data.value,
}, cb)
...
0
votes
1
answer
683
views
web3.eth.getBlock isn't triggered
Basically, i want get the callback result of first method to get each index value in pass it to the second method to scan this value, in this case is an ethereum transaction to get the input value. ...
1
vote
2
answers
1k
views
Get hash transaction by your encode input data
In my application i must follow the use case:
I need to record any document hash on the Ropsten (eth testnet) blockchain. The hash is unique and i'm using a mapping in my smart contract to accomplish ...
1
vote
1
answer
982
views
How to find the value of erc20 token sent out using transaction hash
How can i find the value of erc20 token in a transaction using the hash generated?
I can't seem to find answers anywhere.
Edit:I found that it is possible to use w.eth.getTransactionReceipt('...
1
vote
2
answers
3k
views
How to hash multiple values including array keccak256 Solidity v5.0.x and web3 'Autodetection of array types is not supported.'
How can I receive the same hash in solidity and web3?
Multiple values where one is a multi dimensional array.
Solidity v0.5.x:
pragma solidity 0.5.6;
pragma experimental ABIEncoderV2;
contract Hash{...
0
votes
3
answers
1k
views
web3.eth.sendSignedTransaction executed successfully but never any ETH transferred actually
as you see in below, i the raw transaction has been set by the gas simplify value, the returned value is an implemented transaction hashcode, but never assumed result by this transaction figure out
...
1
vote
1
answer
2k
views
Getting the transaction hash on function call
I am new to Solidity, Web3, and Ethereum.
I am trying to build a web application through which users can upload a file to IPFS, then store the IPFS hash in the blockchain. I am using the React truffle ...
2
votes
1
answer
480
views
How to retrieve transaction hash value from the Promise object using web3js?
I'm trying to retrieve the transaction hash value after I call my smart contract method.
My Promise object looks like below.
returnPromise:
Promise { "pending" }
<state>: "...
1
vote
0
answers
162
views
Does web3 soliditySha3 work with json object?
The above hash data is generated by web3 soliditySha3 with the objects below.
It seems the function generates hashes as I wanted; each object has different hash value. But I am not sure if it's ...
2
votes
1
answer
3k
views
Creating hash of a struct in Solidity and JavaScript
I have created a message hash in JavaScript using:
let message = {
'message': 'Receiver closing signature',
'sender': sender,
'balance': value
};
message = web3.utils.toHex(...
1
vote
1
answer
2k
views
messageHash hash function
In this example, by which algorithm is messageHash hashed by?
web3.eth.accounts.sign("Hello, world!", '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef')
{ message: 'Hello, world!',
...
5
votes
1
answer
12k
views
Convert hash function hex to bytes32
The output of hash function SHA256 is a hex string of size 64. For example: 3ed54831f488a22b28398de0c567a3b064b937f54f81739ae9bd545967f3abab
I want to call the function of a smart contract with the ...
11
votes
2
answers
10k
views
trying to use web3-utils but not working
Trying to use web3-utils.
I installed the package via NPM , however, I am getting the error that sha3 is undefined..
TypeError: Cannot read property 'sha3' of undefined
at C:\block2\deliver.js:...