Skip to content

Instantly share code, notes, and snippets.

View ngyam's full-sized avatar

Adam Z. Nagy ngyam

View GitHub Profile
@ngyam
ngyam / BlockReward_flat.sol
Created February 17, 2021 16:34
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.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity 0.5.8;
/// @title BlockReward contract interface
/// @dev This interface must be implemented by a system contract that implements the
/// reward logic
interface IBlockReward {
/// @notice Produces rewards for the given benefactors,
/// with corresponding reward codes
@ngyam
ngyam / PublicResolverABI.json
Created April 1, 2020 15:03
PublicResolverABI
[{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"o
@ngyam
ngyam / Address.sol
Created November 25, 2019 16:20
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.13+commit.5b0b510c.js&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
@ngyam
ngyam / ATestnetConsumer.sol
Created November 25, 2019 15:46
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.0+commit.1d4f565a.js&optimize=false&gist=
pragma solidity ^0.4.24;
import "./ChainlinkClient.sol";
import "./Ownable.sol";
contract ATestnetConsumer is ChainlinkClient, Ownable {
uint256 constant private ORACLE_PAYMENT = 1 * LINK;
uint256 public currentPrice;
uint256 public currentEwtPrice;
@ngyam
ngyam / ChainlinkAggregation.csv
Last active November 26, 2019 12:04
LinkToken and Aggregator contracts for Chainlink
Name At Address Compiler version
LinkToken.sol 0xe76d478383327b83eE0FE6b3F0ec675315340E18 0.4.26
ExecutorPublicPriceAggregator.sol 0xfAae940028a5dce6d99D4F716A26289Ee40bc417 0.4.26
LinkTokenSale.sol 0x3f312acB7c48Eb4e2A2E2B6C89FD7a2011F45915 0.5.13
@ngyam
ngyam / ATestnetConsumer.sol
Created September 27, 2019 14:56
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.4.26+commit.4563c3fc.js&optimize=false&gist=
pragma solidity ^0.4.24;
import "./ChainlinkClient.sol";
import "./Ownable.sol";
contract ATestnetConsumer is ChainlinkClient, Ownable {
uint256 constant private ORACLE_PAYMENT = 1 * LINK;
uint256 public currentPrice;
uint256 public currentEwtPrice;
@ngyam
ngyam / MultiSigWalletWithDailyLimitFactory_volta.json
Created June 26, 2019 15:41
MultiSigWalletWithDailyLimitFactory JSON Volta
{
"contractName": "MultiSigWalletWithDailyLimitFactory",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
@ngyam
ngyam / EWC_name_registry_simple_ABI.json
Created May 7, 2019 12:44
EWF simple name registry JSON ABI
[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "entries",
@ngyam
ngyam / EWC_node_control_lookup_ABI.json
Created May 7, 2019 12:43
EWF node control lookup JSON ABI
[
{
"constant": true,
"inputs": [],
"name": "nodeControlContract",
"outputs": [
{
"name": "",
"type": "address"
}
@ngyam
ngyam / EWC_node_control_DB_ABI.json
Created May 7, 2019 12:39
EWF node control DB JSON ABI
[
{
"constant": true,
"inputs": [],
"name": "nodeControlLookUp",
"outputs": [
{
"name": "",
"type": "address"
}