Skip to content

Instantly share code, notes, and snippets.

@athlona64
athlona64 / B.sol
Created October 9, 2019 12: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.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract A {
function checkTime() public view returns (uint);
}
contract B {
function callContractA(address _contractA) view public returns (uint){
return A(_contractA).checkTime();
@athlona64
athlona64 / IERC20contract.sol
Created October 16, 2019 08: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.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / IERC20contract.sol
Created October 16, 2019 09:16
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.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / IERC20contract.sol
Created October 21, 2019 08:57
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.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / IERC20contract.sol
Created October 21, 2019 09:23
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.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / IERC20contract.sol
Created October 21, 2019 09:24
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.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / IERC20contract.sol
Created October 28, 2019 09:11
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.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.21;
/**
* @title IERC20Token - ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract IERC20Token {
string public name;
string public symbol;
@athlona64
athlona64 / OKAddress.dart
Created December 15, 2019 05:28
Flutter + Ethereum BIP39, BIP32
import 'package:bip39/bip39.dart' as bip39;
import "package:hex/hex.dart";
import 'package:web3dart/credentials.dart';
import 'package:bip32/bip32.dart' as bip32;
abstract class OKAddressETH {
String generateMnemonic();
String getPrivateKey(String mnemonic);
Future<EthereumAddress> getPublicAddress(String privateKey);
}
@athlona64
athlona64 / jenkins
Last active January 31, 2020 04:44
//index.js
//importing node framework
var express = require(‘express’);
var app = express();
//Respond with "hello world" for requests that hit our root "/"
app.get(‘/’, function (req, res) {
res.send(‘hello world’);
});
//listen to port 3000 by default
@athlona64
athlona64 / abi polkadot
Last active February 13, 2020 02:28
abi polkadot claim
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_allocations","type":"address"},{"internalType":"uint256","name":"_setUpDelay","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"original","type":"address"},{"indexed":true,"internalType":"address","name":"amendedTo","type":"address"}],"name":"Amended","type":"event","signature":"0x385f6a4b73038a5f14e3482732f99dde086b6fd0930af57604250b72726f4392"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eth","type":"address"},{"indexed":true,"internalType":"bytes32","name":"dot","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"idx","type":"uint256"}],"name":"Claimed","type":"event","signature":"0x9b01158d4bc10c112ba32b5240cda97e49e2eb86021f03f6a0f460342ac4dfda"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eth","type":"a