You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code gives a TransactionFailed. If I change value to 0, it works, but then I can't actually have contracts use send/transfer. It also doesn't work to do a send transaction with the to being the contractAddress.
from testrpc.client import EthTesterClient
from solc import *
from solc.exceptions import SolcError
c = EthTesterClient()
ac = sorted(c.get_accounts())
contract = """
contract c {
function f() returns (int) {
return 10;
}
}
"""
bin = compile_source(contract,optimize=True).values()[0]['bin']
txnHash = c.send_transaction(_from = ac[0], data = bytes(bin), value=1000)
txnReceipt = c.get_transaction_receipt(txnHash)
contractAddress = txnReceipt['contractAddress']
print (contractAddress), c.get_balance(contractAddress)
The text was updated successfully, but these errors were encountered:
This code gives a TransactionFailed. If I change value to 0, it works, but then I can't actually have contracts use send/transfer. It also doesn't work to do a send transaction with the to being the contractAddress.
The text was updated successfully, but these errors were encountered: