Skip to content

Instantly share code, notes, and snippets.

pragma solidity >0.4.99 <0.6.0;
// Requires Constantinople EVM
// Use Ganache testrpc https://github.com/trufflesuite/ganache
// Run ("0x+Lazarus Bytecode", salt) in Resurrection function
// input e.g., "0xC0DE4COFFEE....FEFE", 42
contract Lazarus {
address public jesus;
event Alive(address addr, address dapp);
import ecdsa
import ecdsa.ellipticcurve as EC
curve = ecdsa.SECP256k1
x = int('11db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5c', 16)
y = int('b2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3', 16)
point = EC.Point(curve.curve, x, y)
pubkey = ecdsa.VerifyingKey.from_public_point(point, curve)
hash1 = 90774958364900180671716888080665726921328827653065727390791155349203800699667
@nepalbitcoin
nepalbitcoin / ballot.sol
Created July 4, 2018 21:31
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
Verifying my Blockstack ID is secured with the address 1Dj5D2yrXbXUYU6tmVGikFafpgdSy6xNC4 https://explorer.blockstack.org/address/1Dj5D2yrXbXUYU6tmVGikFafpgdSy6xNC4

Keybase proof

I hereby claim:

  • I am nepalbitcoin on github.
  • I am nepalbitcoin (https://keybase.io/nepalbitcoin) on keybase.
  • I have a public key ASA2eX1M3iozuU78SKNpDkjW2EPnogbBZBAvPxI62nIM4Qo

To claim this, I am signing this object:

pragma solidity ^0.4.19;
/**
The MIT License (MIT)
Copyright (c) 2015-2016 Oraclize SRL (https:/oraclize.it/)
Copyright (c) 2016 Oraclize LTD (https:/oraclize.it/)
Copyright (c) 2016 Smart Contract Solutions, Inc. (https://openzeppelin.org/)
Copyright (c) 2017 Potato Coin Foundation. (https://potatoin.foundation)
Copyright (c) 2018 Nepal Blockchain R&D. (https://github.com/nepal-blockchain)
pragma solidity ^0.4.18;
/**
The MIT License (MIT)
Copyright (c) 2015-2016 Oraclize SRL (https:/oraclize.it/)
Copyright (c) 2016 Oraclize LTD (https:/oraclize.it/)
Copyright (c) 2016 Smart Contract Solutions, Inc. (https://openzeppelin.org/)
Copyright (c) 2018 Nepal Blockchain R&D. (https://github.com/nepal-blockchain)
Permission is hereby granted, free of charge, to any person obtaining
@nepalbitcoin
nepalbitcoin / ActivityToken.sol
Last active November 16, 2017 08:38
WIP : Ethereum ERC20 Token managed by discord bot. Eroding reward, Double burn / revenge.
pragma solidity ^0.4.18;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
var confirmBlocks =13;
var counter = confirmBlocks;
function checkWork(chx) {
if(chx == 0 && counter > 0){ //countdown
counter--;
return startMiner(counter);
}else if(chx == 1 && eth.getBlock("pending").transactions.length > 0){ //TX in POOL
counter = confirmBlocks;
return startMiner(counter);
enode://ba547d19e0b4d2843f61baab2224d556b00827c68018872e4283f5cb493f7eeec7ffacebf1aa5598b86d67bb860e9acbd6f5c824f034e4c2d48153f396c4d652@192.168.1.102:30303
303