OpenST / mosaic-contracts

Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
https://discuss.openst.org/c/mosaic
MIT License
114 stars 31 forks source link

Anchor should accept number as block height #660

Closed schemar closed 5 years ago

schemar commented 5 years ago

Currently, you must pass in the block height as string. If you pass in a number, you get an error. The anchor method should automatically convert number to string and accept both.

Right now you have to do:

const anchor = new Anchor(shared.auxiliary.web3, shared.auxiliary.addresses.Anchor);
const block = await shared.origin.web3.eth.getBlock('latest');

await anchor.anchorStateRoot(
  block.number.toString(),
  block.stateRoot,
  txOptions,
);
schemar commented 5 years ago

wrong repo