This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |