Skip to content

Instantly share code, notes, and snippets.

safeContract.getTransactionHash(myToAddress,1000,NULL_HASH,0,0,0,0,NULL_ADDRESS,NULL_ADDRESS,0)
.then(
(hashedTx) => {
console.log("Hashed Tx:", hashedTx);
let binHashedTx = ethers.utils.arrayify(hashedTx);
console.log("binHashedTx:", binHashedTx);
wallet.signMessage(binHashedTx)
.then(
(signature) => {
console.log("signature:", signature);
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmVL4tSEWWGVkcq7MU8GEXCajyuGeSueWPQDNscEjttj5G ✅
Create your profile today to start building social connection and trust online. https://3box.io/
pragma solidity ^0.5.4;
/**
* RealMath: fixed-point math library, based on fractional and integer parts.
* Using uint256 as real248x8, which isn't in Solidity yet.
* Internally uses the wider uint256 for some math.
*
* Note that for addition, subtraction, and mod (%), you should just use the
* built-in Solidity operators. Functions for these operations are not provided.
*
pragma solidity ^0.4.21;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;