Skip to content

Instantly share code, notes, and snippets.

View snaketh4x0r's full-sized avatar
💭
move fast and break things

snaketh4x0r snaketh4x0r

💭
move fast and break things
View GitHub Profile
@snaketh4x0r
snaketh4x0r / HumanityRegistry.sol
Created July 10, 2019 17:49
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.5.7+commit.6da8b019.js&optimize=false&gist=
pragma solidity 0.5.7;
pragma experimental ABIEncoderV2;
contract HumanityRegistry {
mapping (address => bool) public humans;
address public governance;
function initplz(address _governance) public {
[
{
"constant": false,
"inputs": [
{
"name": "who",
"type": "address"
}
],
"name": "add",
[
{
"constant": false,
"inputs": [
{
"name": "who",
"type": "address"
}
],
"name": "add",
[
{
"constant": false,
"inputs": [
{
"name": "_jor",
"type": "address"
},
{
"name": "_amount",
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806336c96cc01461005c5780635144417c146100c25780636791f1e31461010c5780637b103999146101c7578063a3a23fe714610211575b600080fd5b6100a86004803603604081101561007257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610275565b604051808215151515815260200191505060405180910390f35b6100ca61056a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101c56004803603602081101561012257600080fd5b810190808035906020019064010000000081111561013f57600080fd5b82018360208201111561015157600080fd5b8035906020019184600183028401116401000000008311171561017357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610590565b005b6101cf6107ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffff
postgres=# CREATE DATABASE discourse2;
CREATE DATABASE
postgres=# \c
You are now connected to database "postgres" as user "postgres".
postgres=# \c discourse2
You are now connected to database "discourse2" as user "postgres".
discourse2=# CREATE TABLE accounts(id integer PRIMARY KEY NOT NULL,address TEXT,reputation integer NOT NULL);
CREATE TABLE
discourse2=# SELECT * FROM accounts;
#reputation calculation
def getRep(add):
part1="https://map-api-direct.foam.space:443/user"
part3='assets'
part2='/'.join((add,part3))
url='/'.join((part1,part2))
response=requests.get(url)
tempobj=response.json()
tempstake=int(tempobj['verifiedPOIs'])
rep=0
/**
*Submitted for verification at Etherscan.io on 2019-11-12
*/
// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.2;
/**
* @title ERC20 interface
/**
*Submitted for verification at Etherscan.io on 2019-11-12
*/
// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.2;
/**
* @title ERC20 interface
C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts>truffle migrate --network matic
Compiling your contracts...
===========================
> Compiling .\contracts\ConversionRatesInterface.sol
> Compiling .\contracts\ERC20Interface.sol
> Compiling .\contracts\ExpectedRate.sol
> Compiling .\contracts\ExpectedRateInterface.sol
> Compiling .\contracts\FeeBurner.sol
> Compiling .\contracts\FeeBurnerInterface.sol