Skip to content

Releases: web3/web3.js

Release 0.9.2

27 Jul 09:08
Compare
Choose a tag to compare
  • fixed web3.toHex in go js environment. Method isFinite behaves differently there.
  • fixed Content-Type

unicode killer

21 Jul 09:38
Compare
Choose a tag to compare

fixed utf8 encoding/decoding

Release 0.9.0

20 Jul 14:55
Compare
Choose a tag to compare

This release fixes a minor issue, where the callback of contract.new() was fired multiple times, due to a race condition. Also fixes: #268, #265

It also introduces the IPC provider, which is used for Mist and any other native dapp to communicate with geth over IPC.

Additionally we introduced a change in the callback for contract.new(). It will now fire twice, once the transaction hash of the contract deploy transaction is available and once the contract is deployed.

Check for the contract.address to differ between the two calls:

MyContract.new(param1, param2, {
   data: myContractCode,
   gas: 300000,
   from: mySenderAddress}, function(err, myContract){
    if(!err) {
       // NOTE: The callback will fire twice!
       // Once the contract has the transactionHash property set and once its deployed on an address.

       // e.g. check tx hash on the first call (transaction send)
       if(!myContract.address) {
           console.log(myContract.transactionHash) // The hash of the transaction, which deploys the contract

       // check address on the second call (contract deployed)
       } else {
           console.log(myContract.address) // the contract address
       }
    }
  });

Release 0.8.1

08 Jul 12:07
Compare
Choose a tag to compare

This release fixes a bug in the new contract.new() behaviour, where contract methods and events didn't received the proper contract address.

Release 0.8.0

07 Jul 10:11
Compare
Choose a tag to compare
var MyContract = web3.eth.contract(abiArray);

// Create the contract async
var myContract = MyContract.new(param1, param2, {
   data: myContractCode,
   gas: 300000,
   from: mySenderAddress}, function(err, contract){
    if(!err) {
       // The callback will fire after the contract is mined
       // Note that the returned "myContract" === "myContractInstance"
       console.log(myContractInstance.address) // "0xc4abd0339eb8d57087278718986382264244252f"
       console.log(myContractInstance.transactionHash) // The hash of the transaction, which created the contract
   }
});

// Create contract sync: Then the address will be added as soon as the contract is mined.
// Additionally you can watch the transaction by using the "transactionHash" property
var myContractInstance = MyContract.new(param1, param2, {data: myContractCode, gas: 300000, from: mySenderAddress});
myContractInstance.transactionHash // The hash of the transaction, which created the contract
myContractInstance.address // undefined at start, but will be auto-filled later

See contracts for more: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethcontract

Release 0.7.1

30 Jun 11:11
Compare
Choose a tag to compare
  • fixed batch requests for contract calls #248
  • fixed bytes returning only first 32 bytes #249

Release 0.7.0

26 Jun 11:06
Compare
Choose a tag to compare

this realease contains breaking changes

  • breaking encoding/decoding of solidity type string (behaves exactly the same as bytes before)
  • breaking bytes/bytesXX are no longer being decoding/encoding automatically
  • non ascii strings, strings that are not properly terminated && strings having internal /x00 are now properly encoded/decoded.
  • support for eth_sendRawTransaction
  • simplified internal implementation of events
  • events do not require to explicitly call watch any more to start watching for changes. Instead a callback can be used when filter is being created.
  • filtering allEvents from given contract is available by calling myContract.allEvents
  • cleanup: removed unused karma tests and dependencies

Release 0.6.0

11 Jun 03:08
Compare
Choose a tag to compare
  • contenty-type 'application/json'
  • all methods are internally async
  • updated dependencies
  • updated icap example

Release 0.5.0

30 May 06:03
Compare
Choose a tag to compare

changes:

  • crypto-js is used to calculate sha3
  • default namereg contract is available at web3.eth.namreg
  • iban transactions web3.eth.sendIBANTransaction

migration:

  • usage of web3.sha3

    var str = 'hello world';
    
    // old
    var result = web3.sha3(web3.fromAscii(str));
    console.log(result); // 0xffffff....
    
    // new
    var result= web3.sha3(str);
    console.log(result); // ffff....

Release 0.4.3

21 May 09:41
Compare
Choose a tag to compare

Fixed encoding && decoding of empty solidity arrays. #210 #211