CRYPTO NEWS

How long is SIGHASH?

I am reading these two posts 1 2, and following step by step. I almost understand, but I still have some questions.

  1. Before signing, input script should be removed and replaced by pre locking script. In the last, SIGHASH should be appended. in this time, SIGHASH is 4 bytes(0x01000000). However, after signing, SIGHASH should also be appended. in this time(DER), SIGHASH is 1 byte(0x01), as seen in the raw transaction. So how long SIGHASH is?

  2. in the pizza transaction, the r takes 33 bytes, whit 0x00 in the first. When i use ecdsa in python, i have to delete the first byte 0x00. So when DER process, why not just use 32 bytes.

Crypto Hats, Crypto Shirts, Crypto Socks, Crypto Clothing

how to send additional data to a function

I’m tying to send a token to an address using ethers.js and here is my code: contract.transfer(address , amount) I want to send additional data like "helloworld" to this function to use it later. I tried this: contract.transfer(address , amount , { data: "helloworld" }) but it gives me error: cannot override "data" is it::Listen

I’m tying to send a token to an address using ethers.js and here is my code:

contract.transfer(address , amount) 

I want to send additional data like "helloworld" to this function to use it later. I tried this:

contract.transfer(address , amount , { data: "helloworld" }) 

but it gives me error:

cannot override "data" 

is it possible to do this? how can I send the data? or is there a way to save additional data to blockchain using one transaction? note: the transfer function is from BUSD token

How long is SIGHASH?

Shopping cart
There are no products in the cart!
Continue shopping
0