I'm not getting any return data from a simple function, when deployed on Sopolia testnet, it works as expected in the VM.
compiler : 0.8.7;
rpc: https://rpc-sepolia.rockx.com
function gerReferalCode() external returns ( uint256 ) {
uint256 h;
do {
h = _hash(1);
} while ( referalIsUsed[ h ] );
referalIsUsed[ h ] = true;
referalCode[ msg.sender ] = h;
Data storage d = signings[ h ];
d.owner = msg.sender;
return h;
}
Using the same contract in remix:
remix VM (London)
input 0x8df...8c783
decoded input {}
decoded output {
"0": "uint256: 3544079616"
}
logs []
Injected Provider ( Sepolia ) :
input 0x8df...8c783
decoded output -
val 0 wei
Web3 code response:
blockHash
:
"0x29810da2e36a8ec29db6e3cc50557c0ac3146283acf9231527a295dec6b0b9aa"
blockNumber
:
2312093
contractAddress
:
null
cumulativeGasUsed
:
75924
effectiveGasPrice
:
2500000007
events
:
{}
from
:
"0xbb4896575291881a7bbc0f945ec3bcd402a44794"
gasUsed
:
75924
logsBloom
:
"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
status
:
true
to
:
"0xbc2bacef89a144acf941d2b24bfe674ede6d832e"
transactionHash
:
"0x126f380273d8911611d2190bc67c53097d6ee012ed32f349a49786d323f7063b"
transactionIndex
:
0
type
:
"0x2"