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
const lsMessages = { | |
}; | |
function pleaseRegister(msg) { | |
return sendMessageAndClear('register', msg, bot.sendMessage(msg.chat.id, `Please register in bot`, {parse_mode: 'HTML'})); | |
} | |
function alreadyRegistered(msg) { | |
return sendMessageAndClear('register', msg, bot.sendMessage(msg.chat.id, `You already registered`, {parse_mode: 'HTML'})); |
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
library PolygonUtils { | |
struct PolygonData { | |
int256[2][] points; | |
} | |
function isInsidePolygon(PolygonData storage _polygon, int256[2] memory _point) public view returns (bool) { | |
bool inside = false; | |
uint256 j = _polygon.points.length - 1; |
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
import "./PolygonUtils.sol"; | |
contract PolygonChecker { | |
mapping(uint256 => PolygonUtils.PolygonData) polygons; | |
function addPolygonPoint(uint256 polygonId, int256[2] memory point) public { | |
polygons[polygonId].points.push(point); | |
} | |
function isInsidePolygonById(int256[2] memory _point, uint256 _polygonId) public view returns (bool) { |
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
contract PolygonChecker { | |
struct PolygonData { | |
int256[2][] points; | |
} | |
mapping(uint256 => PolygonData) polygons; | |
function addPolygonPoint(uint256 polygonId, int256[2] memory point) public { | |
polygons[polygonId].points.push(point); | |
} |
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
const fs = require('fs'); | |
const Table = require('cli-table'); | |
const table = new Table({ | |
head: ['Contract', 'Size (bytes)'], | |
colWidths: [50, 15] | |
}); | |
const testFolder = './build/contracts/'; |
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
// File: @openzeppelin/contracts/GSN/Context.sol | |
pragma solidity ^0.5.0; | |
/* | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with GSN meta-transactions the account sending and |
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
``` | |
createdb my_database | |
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" | |
sudo apt install pgloader | |
mysql -uroot -proot -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | |
pgloader --with "quote identifiers" mysql://root:root@localhost/my_database postgresql:///my_database | |
``` |
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
license: mit |
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.2; | |
/** | |
* @title Roles | |
* @dev Library for managing addresses assigned to a Role. | |
*/ | |
library Roles { | |
struct Role { | |
mapping (address => bool) bearer; | |
} |
This file has been truncated, but you can view the full file.
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
I[22016-01-22|23:03:52.578] Starting ABCI with Tendermint module=main | |
I[22016-01-22|23:03:52.627] Loading mem state module=main | |
I[22016-01-22|23:03:52.627] App loaded module=main time=249.405µs | |
I[22016-01-22|23:04:07.550] Executed block module=state height=1 validTxs=0 invalidTxs=0 | |
I[22016-01-22|23:04:07.551] Rank calculated module=main time=102.2µs links=0 cids=0 | |
E[22016-01-22|23:04:22.593] SendTimeout module=blockchain peer=7f9db6d13282c1984a6fb180b43bb07e5871a271 reason="peer did not send us anything" timeout=15s | |
I[22016-01-22|23:04:40.760] Committed state module=state height=1 txs=0 appHash=E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 | |
E[22016-01-22|23:04:40.765] Stopping peer for error module=p2p peer="Peer{MConn{93.125.26.210:34656} 7f9db6d13282c1984a6fb180b43bb07e5871 |
NewerOlder