This file contains hidden or 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
#!/bin/bash | |
# See https://github.com/docker-library/mongo/pull/63 | |
docker run --rm --volumes-from my-mongo-server mongo unlink "/data/db/mongod.lock" | |
docker run --rm --volumes-from my-mongo-server mongo --repair |
This file contains hidden or 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
const Web3 = require('web3'); | |
const Provider = require('@truffle/hdwallet-provider'); | |
const MyContract = require('./build/contracts/MyContract.json'); | |
const address = ''; | |
const privateKey = ''; | |
const infuraUrl = ''; | |
// Very hard way (web3#signTransaction() + web3#sendSignedTransaction()) | |
const init1 = async () => { | |
const web3 = new Web3(infuraUrl); |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
interface IERC20 { | |
/** | |
* @dev Returns the amount of tokens in existence. | |
*/ | |
function totalSupply() external view returns (uint256); |