I have deployed a very basic solidity contract (pragma solidity^0.4.0) to Rinkeby. When I call the getters on my state variables, nothing is returned and I do not understand why. To compile the contract I'm using "solc": "^0.4.25"
Using Remix to test, the call to the getter works locally without issue. However, the call doesn't work on my contract on Rinkeby.
Here is my solidity code...
pragma solidity^0.4.0;
contract Contest {
address public manager;
uint public submissionCost;
uint public votesPerSubmission;
constructor (uint _submissionCost, uint _votesPerSubmission) public {
manager = msg.sender;
submissionCost = _submissionCost;
votesPerSubmission = _votesPerSubmission;
}
modifier restricted() {
require(msg.sender == manager, "Not authorized.");
_;
}
function adjustSubmissionCost(uint newCost) public restricted {
submissionCost = newCost;
}
function adjustVotesPerSubmission(uint newVotes) public {
votesPerSubmission = newVotes;
}
function getManager() public view returns (address) {
return manager;
}
}
The address of the deployed contract on Rinkeby is
0x0f1828ED7Be0232fd153218EFb2fA78A09c09b53 https://rinkeby.etherscan.io/address/0x0f1828ED7Be0232fd153218EFb2fA78A09c09b53
When calling any of the public variables from Remix, I expect a return value, however I only receive the message call to Contest.manager in the Remix console and nothing more.
I get the same behavior in my web3 dapp, with zero return when I try...
await Contest.methods.manager().call()
When I submit a transaction on Remix this also hangs on pending... Is it a versioning issue? Can't figure it out...
Contest
in your dapp code?