[Solved] ENS function startAuctionsAndBid

Pedro Lobito Asks: ENS function startAuctionsAndBid
I’ve been working with ens via web3.js and ensutils.js but I’m stuck at startAuctionsAndBid function.

If I try :

var sbid = ethRegistrar.shaBid(web3.sha3('name'), eth.accounts[8], web3.toWei(0.01, 'ether'), web3.sha3('my secret phrase'))
ethRegistrar.startAuctionsAndBid(0x12345670159e0506114fee112628a969f587bf4b7bf4a728661705c08fa9ce82, sbid);

I’m getting:

TypeError: 'forEach' is not a function
    at web3.js:1553:13
    at web3.js:694:16
    at map (<native code>)
    at web3.js:693:20
    at web3.js:4059:46
    at web3.js:4130:19
    at apply (<native code>)
    at web3.js:4223:16
    at <anonymous>:1:1

Other functions, like startAuction, newBid, unsealBid work as expected, only startAuctionsAndBid gives me an error.
Any idea why?


The forEach error was fixed by providing an array as first argument. The function is now executed but it fails on contract execution

startAuctionsAndBid expects 2 arguments:

hashes bytes32[]
sealedBid bytes32

How can I construct the elements of the hashes array?
I tried hashes = [web3.sha3('name')], but no luck.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.