Skip to content

Instantly share code, notes, and snippets.

View igorbarinov's full-sized avatar
🌿

Igor Barinov igorbarinov

🌿
View GitHub Profile
Unhandled rejection Error: Error: [number-to-bn] while converting number 1e+21 to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1e+21"
at Object.l [as toBN] (https://wizard.oracles.org/static/js/main.3ba23847.js:1:423452)
at s (https://wizard.oracles.org/static/js/main.3ba23847.js:1:92390)
at o.c [as _inputFormatter] (https://wizard.oracles.org/static/js/main.3ba23847.js:1:92487)
at o.encode (https://wizard.oracles.org/static/js/main.3ba23847.js:1:111282)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:111119
at Array.forEach (<anonymous>)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:111090
at o.encode (https://wizard.oracles.org/static/js/main.3ba23847.js:1:111136)
at https://wizard.oracles.org/static/js/main.3ba23847.js:1:358198

Keybase proof

I hereby claim:

  • I am igorbarinov on github.
  • I am igorbarinov (https://keybase.io/igorbarinov) on keybase.
  • I have a public key ASCQyb1l-VyT3kHoDxqf2m3qtMCEErVqboloCZEqbsEB6Ao

To claim this, I am signing this object:

0xc1253365dADE090649147Db89EE781d10f2b972f
// Temporarily have SafeMath here until all contracts have been migrated to SafeMathLib version from OpenZeppelin
pragma solidity ^0.4.8;
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
// Temporarily have SafeMath here until all contracts have been migrated to SafeMathLib version from OpenZeppelin
pragma solidity ^0.4.8;
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
@igorbarinov
igorbarinov / etc.js
Created August 13, 2017 18:34 — forked from anonymous/etc.js
go!
const Web3 = require('web3');
const net = require('net');
const { Pool, Client } = require('pg');
let web3 = new Web3('/Users/user/repos/private_net/here.ipc', net);
const pool = new Pool({
user: 'readonly',
host: 'localhost',
0x2c57E1E3AD53F0b971422696c1470cEB84F83B1B
0x1798014475d139AC0FDFfC5747d14AFD106855FD
@igorbarinov
igorbarinov / MyToken.sol
Last active July 9, 2017 21:12
Combined contract
pragma solidity ^0.4.11;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
0x8BeadF636208cC2DB066f0308f334a7d76e2E475