Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Send log issue
from ethereum import tester as t
import serpent
code1 = '''\
event log_gas(gas:indexed)
def any():
log(type=log_gas, msg.gas)
send(0, msg.sender, msg.value)'''
code2 = '''\
macro c1: 0x{addr}
event log_gas2(gas2:indexed)
def any():
log(type=log_gas2, msg.gas)
def do_send(gas_amount):
send(gas_amount, c1, msg.value)'''
s = t.state()
c1 = s.abi_contract(code1)
code2 = code2.format(sig=serpent.mk_signature(code1),
c2 = s.abi_contract(code2)
c2.do_send(100000, value=100000000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.