I have deployed a contract to ethereum with web3.js that just simple changes a number on the frontend when the contract call finishes.
Im trying to create a simple tool to benchmark harmony txs vs eth txs for users to experience the speed of the harmony chain.
You can try it on Ethereum at https://s-server.nl however fees and time is at the order on this side im working on implementing this page on both chains but im having no luck on harmony i managed to deploy the contract trough remix.
This is what it looks like! (on both sides)
pragma solidity ^0.6.6;
contract CoolNumberContract {
uint public coolNumber = 10;
function setCoolNumber(uint _coolNumber) public {
coolNumber = _coolNumber;
}
}
And here it is in the explorer:
i couldnt find it in the documentation how this snippet would work on the harmony side.
should work exactly the same. tried loading harmony network in metamask, however giving error:
web3.min.js:1 Uncaught (in promise) Error: Couldn't decode uint256 from ABI: 0x
at o.formatOutputUInt [as _outputFormatter] (web3.min.js:1)
at o.decode (web3.min.js:1)
at web3.min.js:1
at Array.forEach (<anonymous>)
at b.decodeParameters (web3.min.js:1)
at M.d._decodeMethodReturn (web3.min.js:1)
at f.outputFormatter (web3.min.js:1)
at f.formatOutput (web3.min.js:1)
at o (web3.min.js:1)
at web3.min.js:1
can you try remix.ethereum.org instead of harmony remix and see if you get a different ABI? ethereum remix works without any additional steps, just needs adding harmony network to metamask.
There seems a bit off difference on how the JSON is formatted and some values appear to be missing? Mabey this helps to fix later on harmony remix for the fellow developers!
awesome. thanks for updating the status. would you mind creating an issue here: Issues · harmony-one/remixide · GitHub with details of this problem so that it is tracked and fixed? thanks.