Skip to content

Instantly share code, notes, and snippets.

@makoto
makoto / contracts...4_TestCustomError .sol
Created May 4, 2022
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
View contracts...4_TestCustomError .sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
error ErrorWithNoParams();
error ErrorWithParams(int x, string errorMessage);
contract TestCustomError {
address payable owner = payable(msg.sender);
function CustomErrorWithParamsView(int _x) external pure {
@makoto
makoto / contracts...4_TestCustomError .sol
Created May 4, 2022
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
View contracts...4_TestCustomError .sol
pragma solidity ^0.8.4;
error ErrorWithNoParams();
error ErrorWithParams(int x, string errorMessage);
contract TestCustomError {
address payable owner = payable(msg.sender);
function CustomErrorNoParams() public {
revert ErrorWithNoParams();
View index.js
const Web3 = require('web3')
const Web3Legacy = require('web3legacy')
console.log('web3 version', (new Web3()).version)
console.log('web3 legacy version', (new Web3Legacy()).version)
// Do "export INFURA_PROJECT_ID=YOURPROJECTID" on your terminal
const projectid = process.env.INFURA_PROJECT_ID
const endpoint = 'https://mainnet.infura.io/v3/' + projectid
const provider = new Web3.providers.HttpProvider(endpoint)
const legacyProvider = new Web3Legacy.providers.HttpProvider(endpoint)
const web3 = new Web3(provider)
@makoto
makoto / index.js
Last active Mar 27, 2019
contenthash
View index.js
const namehash = require('eth-ens-namehash').hash
document.querySelector('input').value = 'matoken.eth'
window.namehash = namehash
var sayHello = function(){
var name = document.querySelector('input').value
console.log(namehash(name))
}
View universalloginerror.log
makoto@Makotos-MacBook-Air: [~/src/tmp/univesal - (master)] $ more package.json
{
"name": "univesal",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:dev": "universal-login start:dev"
},
View universalloginerror.log
makoto@Makotos-MacBook-Air: [~/src/tmp/univesal - (master)] $ more package.json
{
"name": "univesal",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:dev": "universal-login start:dev"
},
View myth.log
makoto@Makotos-MacBook-Air: [~/work/blockparty - (coverage)] $ myth -x contracts/Conference.sol
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: _function_0x05f203d9
PC address: 543
A possible integer overflow exists in the function `_function_0x05f203d9`.
View rtifacts_require.txt
makoto@Makotos-MacBook-Air: [~/work/ens/dnsprove-js - (dnsprove)] $ ls node_modules/@ensdomains/dnssec-oracle/contracts/RSASHA1Algorithm.sol
node_modules/@ensdomains/dnssec-oracle/contracts/RSASHA1Algorithm.sol
makoto@Makotos-MacBook-Air: [~/work/ens/dnsprove-js - (dnsprove)] $ ls node_modules/dnssec-oracle/contracts/RSASHA1Algorithm.sol
node_modules/dnssec-oracle/contracts/RSASHA1Algorithm.sol
makoto@Makotos-MacBook-Air: [~/work/ens/dnsprove-js - (dnsprove)] $ node inspect node_modules/.bin/truffle migrate
< Debugger listening on ws://127.0.0.1:9229/12a647df-fb0d-45da-a906-0db3172da72b
< For help see https://nodejs.org/en/docs/inspector
< Debugger attached.
debug> c
Break on start in node_modules/truffle/build/cli.bundled.js:1
View keybase.md

Keybase proof

I hereby claim:

  • I am makoto on github.
  • I am makoto_inoue (https://keybase.io/makoto_inoue) on keybase.
  • I have a public key ASDWPH9EJ_8hE-iTvOw7KpeuKUOfh94dm098MMdJbqaEngo

To claim this, I am signing this object: