Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Contract creation using web3 doesn't give return address #855

Closed
gavofyork opened this issue Mar 29, 2016 · 0 comments
Closed

Contract creation using web3 doesn't give return address #855

gavofyork opened this issue Mar 29, 2016 · 0 comments
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior.

Comments

@gavofyork
Copy link
Contributor

Using web3.js (e.g. through chriseth's crowser solidity), you can make a contract ok (if you doctor the data's hex to have 0x at the front), but the address given by the callback is null:

oracle = oracleContract.new(
   {
     from: "0x102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c", 
     data: '0x60606040525b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5b6102a8806100416000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063274526021461004f578063693ec85e146100ae5780637cb97b2b146101185761004d565b005b6100ac6004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919080359060200190919050506101b6565b005b6101026004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610258565b6040518082815260200191505060405180910390f35b61012e6004808035906020019091905050610130565b005b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101b25780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5b50565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102535780600160005083604051808280519060200190808383829060006004602084601f0104600f02600301f1509050019150509081526020016040518091039020600050819055505b5b5050565b6000600160005082604051808280519060200190808383829060006004602084601f0104600f02600301f15090500191505090815260200160405180910390206000505490506102a3565b91905056', 
     gas: 3000000
   }, function(e, contract){
    console.log(e, contract);
    if (typeof contract.address != 'undefined') {
         console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
    }
 })
h {_eth: r, transactionHash: null, address: undefined, abi: Array[4]}
VM645:8 null h {_eth: r, transactionHash: "0xd52327ee702375fe48fdf35e0473ada2caab28bcb734591290decf18731be428", address: undefined, abi: Array[4]}

The contract is created anyway.

@gavofyork gavofyork added the F2-bug 🐞 The client fails to follow expected behavior. label Mar 29, 2016
@debris debris self-assigned this Mar 30, 2016
@debris debris closed this as completed in 0681346 Apr 1, 2016
debris added a commit that referenced this issue Apr 1, 2016
arkpar pushed a commit that referenced this issue Apr 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior.
Projects
None yet
Development

No branches or pull requests

2 participants