Questions tagged [hash]

A hash function is an algorithm that transfers data input of any size into a fixed size data which acts as a kind of "signature" for the data provided.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

Why does mining difficulty, gas prices raise, yet some transactions still fail?

I would be grateful if someone was able to clarify this, given my assumptions: Mining difficulty is depending on the amount of computational power invested into verifying transactions on the ...
0
votes
0answers
17 views

How to pass a bytes32 hash to a contract

I am working with the contract deployed to Mumbai here. You'll see a few transaction errors from me trying to run the below code (using Alchemy). I am trying to hash the input startupName locally so ...
0
votes
0answers
26 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', ...
3
votes
2answers
45 views

How do you prove ownership of a digital asset with NFTs?

I have a few questions regarding NFTs. Every source I find online roughly says that an NFT is a blockchain-stored ownership certificate for a certain digital asset. But I don't understand how that ...
1
vote
0answers
69 views

How do I perform _hashTypedDataV4 on a struct containing an array of structs

I have signed a typed data, and I am trying to recover the address of the signer from my contract using ECDSA.recover(). But each time I try it, I get an address that is different from the address of ...
0
votes
0answers
40 views

Is it theoretically possible to remove the receipt root hash in the Ethereum block header?

I was just wondering if Ethereum would still work without a receipt root hash? Is it theoretically possible?
1
vote
1answer
52 views

Why is value of ECDSA v often neither 27 nor 28?

There are a lot of information out there explaining that in the ECDSA signature the value of v is always either 27 or 28. However there are many transactions which, when decoded using several decoders,...
0
votes
1answer
169 views

Try to mint from a contract but the hash is missing

function mint(bytes32 hash) external { require(!_hasMinted[msg.sender]); require(totalSupply() + premineRemaining < 500); require(hash == sha256(abi.encodePacked(msg.sender, ...
0
votes
0answers
13 views

Dynamic values in signatures

I followed this tutorial about signatures https://forum.openzeppelin.com/t/sign-it-like-you-mean-it-creating-and-verifying-ethereum-signatures/697 At first, I managed to replicate and test, but ...
0
votes
0answers
12 views

How exactly is the unique Transaction hash ID generated? [duplicate]

The reason I am asking is because I want to know if it's possible to guess / manipulate the next transaction hash ID on the chain.
0
votes
0answers
12 views

Examples of checksum/hash used to establish ownership

Are there any examples of one-way hashes or checksums being used in a legal context to establish ownership, creation, or prior art?
0
votes
0answers
19 views

How can I manually calculate a transaction hash of a transaction JSON object

So I have a transaction. I have a transaction that I would like to manually calculate the hash: { "hash": "0xf4584008cc70f2f532765a2f035a2525992a258b2d2afd6b49ad5b2857a6197d", &...
1
vote
0answers
23 views

How to check if ETH transaction was ever sent

I'm creating a transaction with web3.eth.accounts.signTransaction. I'm then storing that transaction hash, then sending it over the ETH network with web3.eth.sendSignedTransaction How do I ...
1
vote
0answers
9 views

Understanding Hash Lock Atomic Swaps

I have trouble understanding how exactly atomic swaps take place in HTLCs. Let's take the generic example: Alice wants to trade 1 BTC with Bob in exchange for 15 ETH. Alice creates a contract where ...
0
votes
0answers
11 views

Can I get the hash of any past block using Solidity? [duplicate]

Is there a limit of blocks ago that I can get the hash of within solidity using block.blockhash()?
2
votes
2answers
485 views

Why some ERC20 tokens have different Transfer event ABI signature than Transfer(address,address,uint256)?

Looking at ChainLink ABI (using this tool) I see { "anonymous": false, "inputs": [ { "indexed": true, "name": "from", "type": &...
0
votes
1answer
70 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,...
1
vote
0answers
31 views

Is using blockhash a good source of randomness on PoS blockchains with a lot of blocks mined in a short period of time?

I am trying to make a casino-like game using a smart contract and employing only on-chain data. I understand that on a blockchain like Ethereum a malicious miner can cheat the system by withholding ...
0
votes
2answers
234 views

Code example: How to get transaction hash before sending transaction

I know their might be examples online, but they do not really solve my issue. So let us say I have the code below: this.factoryContract = new ethers.Contract( "factoryContractAddress", ...
1
vote
0answers
31 views

How to prevent front-running the salt when using CREATE2?

I was looking at Optionality's clone-factory, which is based off EIP-1167, and wondering whether it can be ported to use CREATE2. One concern is that a third-party could, in theory, "front-run&...
2
votes
0answers
141 views

Signing a hash with EIP712

Is it possible to sign just a hash with the EIP712 standard (either within Solidity or Ethers.js)? If so, how? All that I'm finding online is the full EIP712 process of domain, types, values, signing ...
0
votes
1answer
13 views

Hashing an input

I'm writing a protocol that requires users to not be able to see previous input. Is it possible to hash a users input and send the parameter as the hashed version of the input?
0
votes
1answer
41 views

Two buy orders at the same exact time, no miner tips included, but lower GWEI order wins. How is this possible?

question for the group: if two buyers submit a Buy at the exact same time, one chooses 300 gwei and the other chooses 400gwei, no Miner tips on either one, is there some scenario where the 300gwei one ...
0
votes
0answers
21 views

Index and Search Archive node database for method hash

I want to find similar method hashes, either from contract bytecode or transaction hashes (which in theory are the same because the contract bytecode comes from a contract creation transaction) I have ...
0
votes
0answers
9 views

Examples or standard methods on carrying out numerical tests on hashed values by keccak256

I am wondering if items described in the title can be found anywhere like in published literatures, forum discussions, or academic research papers. Thanks.
0
votes
1answer
101 views

How exactly was the small pics inside the Beeple NFT cryptographically hashed along with the consolidated big one?

I understand that the Beeple pic consists of very small circles each lead to a pic drawn by the same artist, ie it's uniqueness or high price came from the fact that it is like a consolidation of all ...
0
votes
0answers
23 views

Is there any way to check if certain tx hash is mined / confirmed before my contract execution in solidity?

I want to check within my solidity contract if a transaction hash is already executed/confirmed on the current or previous block, is that possible ? The point is, I want to revert my transaction if ...
2
votes
0answers
27 views

Dataset for efficient data retrieval

I am currently struggling to design a Solidity-based data structure that is meant to store bits of information indexed by a 10-character base32-encoded key (i.e. geohashes). Trick is, that I will need ...
1
vote
0answers
154 views

Ethereum Keystore Hashcat

I have a keystore file but I can't remember all the passwords. Then I use Hashcat and I try to crack it with my list of words that I made but I don't know if I use the correct commands. hashcat.exe -...
0
votes
0answers
38 views

How do I cancel an Etherscan transaction?

I did a transfer with Eth, the transaction shows completed, but I didn't received the coin in my wallet. How do I revert the transaction with its hash value? Thank you.
1
vote
0answers
9 views

Check string similarity percentage

How can I efficiently check the similarity of two strings? Or better yet, if I have an array of strings, I want to check that the given string is less than e.g. 80 % similar to any of the other ...
0
votes
0answers
29 views

passing left for uint256

I'm trying to use this method: function test(uint amount) public { address(0xf5eA38B6b9644224dA1aECbC1219e8543c0689b2).call(abi.encodeWithSignature("deposit(uint)",amount)); } ...
2
votes
1answer
273 views

Is IPFS mandatory for NFT

Is it mandatory to use IPFS for file storage and use its hash in metadata for NFT, What if file is stored on s3 and we save its sha256 or md5 in metadata? Hash will be same until file content is ditto,...
1
vote
0answers
44 views

How to get new transaction hash after user speed up the transaction

Hello Everyone When a transaction starts and finishes we are able to get the information via getTransactionReceipt and the other functions that provided with web3. When a user speeds up the ...
3
votes
1answer
100 views

Why in some contracts I see: If (condition_1 & 0xfffffffffffffff...)?

I'm looking at the code of some smart contracts and I've seen somewhere where the code is something like: if (msg.sender == storage[0x00] & 0xffffffffffffffffffffffffffffffffffffffff) From my ...
0
votes
1answer
268 views

When is hashing used when creating a smart contract?

I was going through the solidity docs and in a contract example given I have seen keccak256 used. // Perform checks to determine if transferring a token to the // `OwnedToken` contract should proceed ...
4
votes
1answer
2k 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 ...
3
votes
3answers
612 views

Can we use block hash as verifiable randomness for the off-chain lottery?

My team is writing a discord lottery bot, we want to use the block hash of some block in the future as a seed for the random generator. We want to allow lottery participants to independently verify ...
0
votes
1answer
2k views

Hardhat local network keys generation

I noticed the generation of Hardhat local Etheruem network keys are found on the Mainnet. Example: After running npx hardhat node. Accounts ======== Account #0: ...
0
votes
1answer
71 views

How to use bcrypt in a smart contract?

Is it possible to use bcrypt hash function in a ethereum smart contract? Or only keccak is available? Searching I got to this question, where the OP apparently assumes it's possible, but there is no ...
1
vote
1answer
87 views

How do I find the transaction success from a receipt?

Here is an example of a sucess: { "hash": "0x17e0b789c7645eef46316d475419c02391181881f70eb0451bb13c29a2dd5133", "nonce": "0x14d", "blockHash": &...
3
votes
1answer
50 views

How can callable contracts have an empty account state?

On page 4 of the yellow-paper, the definition of an "empty" account is provided. An account is empty when it has no code, zero nonce and zero balance. A formal definition is then provided, ...
0
votes
1answer
250 views

How to generate a signature with web3py like metamask does?

Most ethereum apps request signatures like this How exactly do i recreate this signature in web3 py? Is there any way i can view the data that gets sent thru metamask? I have tried the following code ...
1
vote
0answers
18 views

How to store in `address` two kinds of addresses at once?

I have a set of address values, each of them can contain a real Ethereum account (user account or contract) or a "virtual" address (an address pseudo-randomly generated by my contract, in ...
1
vote
1answer
28 views

Do Data and Nonce both play a role in hash?

If a transaction's hash doesn't change with data it makes blockchain mutable.
0
votes
0answers
72 views

From what source does etherscan.io aggregate and broadcast data that appears on the blockchain ledger?

as blocks are hashed together as transactions pile up and are broadcasted on the Ethereum blockchain, how exactly does the website etherscan.io in turn publish and broadcast all that information in ...
0
votes
1answer
328 views

Can a transaction hash be used to identify the sender of a payment?

A user suggested using a transaction hash as a way to track user deposits (especially for ECR20 tokens): The major issue arises when you start accepting erc-20 tokens as payment, in that case when ...
0
votes
0answers
27 views

Building TransactionRoot from a single transaction

I'm trying to follow through the trie construction for transaction data - and the multiple resources online seem quite conflicting! Let's consider transaction https://etherscan.io/tx/...
0
votes
1answer
367 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
0answers
23 views

When is the transaction mined?

I'm working on an ethereum blockchain project where people want to make reservations in a city. My backend sends a transaction to the smart contract with the user id, city and other data. The smart ...

1
2 3 4 5