Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kirill bulgakovk

🏠
Working from home
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am bulgakovk on github.
  • I am kbulgakov (https://keybase.io/kbulgakov) on keybase.
  • I have a public key ASAZ_CvSpi30Vf0L8piHcUZtqM-MEFzIhWm1Wqm5ze4ZZAo

To claim this, I am signing this object:

@bulgakovk
bulgakovk / run.sh
Created Jun 10, 2018 — forked from mtford90/run.sh
Running Ethereum wallet in light mode on Mac OSX
View run.sh
# Install ethereum
brew tap ethereum/ethereum
brew install ethereum
# Run a light ethereum node
geth --syncmode="light"
# Open wallet in light mode (will need to install wallet from github first)
open -n /Applications/Ethereum\ Wallet.app --args -node-light
View lib.js
contract CrowdsaleDAOFactory is DAOFactoryInterface {
function createCrowdsaleDAO(string _name, string _description) public {
address dao = DAODeployer.deployCrowdsaleDAO(_name, _description);
DAODeployer.transferOwnership(dao, msg.sender);
}
}
library DAODeployer {
function deployCrowdsaleDAO(string _name, string _description)
returns(CrowdsaleDAO dao) {
View Library.sol
contract CrowdsaleDAOFactory is DAOFactoryInterface {
function createCrowdsaleDAO(string _name, string _description) public {
address dao = DAODeployer.deployCrowdsaleDAO(_name, _description);
DAODeployer.transferOwnership(dao, msg.sender);
}
}
library DAODeployer {
function deployCrowdsaleDAO(string _name, string _description)
returns(CrowdsaleDAO dao) {
View Interface.sol
interface ICallee {
function makeCall(uint val) returns(uint);
}
contract Caller {
ICallee public callee;
function call() {
callee.makeCall(42);
}
View Example.sol
contract Example {
mapping(uint => bool) public map;
function setValue(uint key, bool value) {
map[key] = value;
}
}
View Test.sol
pragma solidity ^0.4.0;
contract Test {
function get() constant returns(string) {
return "test";
}
}
//6060604052341561000f57600080fd5b61014e8061001e6000396000f3006060604052600436106100405763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636d4ce63c8114610045575b600080fd5b341561005057600080fd5b6100586100cf565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561009457808201518382015260200161007c565b50505050905090810190601f1680156100c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100d7610110565b60408051908101604052600481527f74657374000000000000000000000000000000000000000000000000000000006020820152905090565b602060405190810160405260008152905600a165627a7a72305820db2a484e3e127f7192c8495bac984b13b38db8cc91daa06c1184585b805084650029
View Bytecode
6060604052341561000f57600080fd5b61014e8061001e6000396000f3006060604052600436106100405763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636d4ce63c8114610045575b600080fd5b341561005057600080fd5b6100586100cf565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561009457808201518382015260200161007c565b50505050905090810190601f1680156100c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100d7610110565b60408051908101604052600781527f646562696c696b000000000000000000000000000000000000000000000000006020820152905090565b602060405190810160405260008152905600a165627a7a72305820c37361fa5904dba3788fda6f2ff3f2cbedb1ba3779c46def7e96f3e4282ad82f0029
View LiveFactory.sol
contract LiveFactory {
function deployCode(bytes _code) returns (address deployedAddress) {
assembly {
deployedAddress := create(0, add(_code, 0x20), mload(_code))
}
ContractDeployed(deployedAddress);
}
event ContractDeployed(address deployedAddress);
}