CRYPTO NEWS

Bitcoin hits $60K for the first time since April after reports of imminent ETF approval

Bitcoin has recaptured the $60,000 position after a six-month period of ups and downs.

Merkle Tree & Custom Signatures

Hello fellow developres to do I have been brought to the attention that some solidity written contracts expect a signature. Signatures I am not sure how this works yet, I have found out the following things though The signature must be created by the backend (it is not you’re signature but the server-sided one) You::Listen

Hello fellow developres to do I have been brought to the attention that some solidity written contracts expect a signature.

Signatures

I am not sure how this works yet, I have found out the following things though

  • The signature must be created by the backend (it is not you’re signature but the server-sided one)
  • You cannot sign the same message, it must be the backend which made this signature and not you

I have found that usually the backend is forming is issues, is there a way to get a signature without relying on the backend? Or not.

Some code of what they use:

            require(                 daSigner ==                     keccak256(                         abi.encodePacked(                             "x19Ethereum Signed Message:n32",                             bytes32(uint256(uint160(msg.sender)))                         )                     ).recover(signature),                 "Signer address mismatch."             ); 

I don’t really understand how this works.

Merkle Tree

I have also found that some contracts expect bytes32, however, they want the hex proof of a merkle tree. Is there anyway to grab this with just the merkle root? Or do you need the full tree in order to create a hex a proof?

A code example for merkle tree:

        require(MerkleProof.verify(proof, PreSaleMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "INVALID_PROOF"); 

I understand what this code does, I understand how you get the hex proof, I just need to figure out if it’s possible to get the hex proof without the whole tree, just the merkle root.

Thanks for reading this far, I would appreciate any reaction this is my first time asking on this platform but there is almost 0 info availible on the web about signatures & merkle trees.

Bitcoin hits $60K for the first time since April after reports of imminent ETF approval

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