Hi I have an address return function that works in remix but when I try to run it in a truffle test it gives me a promise object. If I could have the truffle test return an address like it does in the solidity code that would be ideal or if I can access the promise object to give me
I have this situation in my smart contract: I’m using truffle and his test suite and then I wrote this case, that fails maybe because I’m not using the only owner method in the right way: Can someone help me? Answer Assuming that you properly set the owner in the contract, write a getter for the owner in the contract:
Call Function From Solidity With Web3
I am having trouble calling a simple function from my solidity contract. Here’s how the code is structured so far: In my web3Api.js file I have: Then in my projectApi.js file I have: Note: When I call the global variable throughout this file it successfully returns all my contract’s functions So this next part is where I’m running into trouble.
Solidity Function Modifying Value Failing
Using Truffle Development framework (web3, react, and solidity) to test a simple smart contract. I have a basic function I am testing when I press a button on the UI, but it doesn’t seem to be working the way I’d expect it. I expect the contract to increment the value and return true. Note, that the value is later being