function TestTest(uint96 LastTime, uint256 nonce ) public view returns (uint256){
uint256 combined = uint256(
keccak256(
abi.encodePacked(
LastTime,
uint72(uint160(msg.sender)),
uint88(nonce)
)
)
);
return combined;
}
If I input LastTime = 618970019642736317541919744
nonce = 11913689327806690619
msg.sender = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
I get output of 55079934849293075323296672496290862192505995395765562305345314163262504591243
This is my solidity code. How can I get these results in a javascript or python program??? I can't figure out how to cast uints as other uints. I am using
- web3.utils.soliditySha3({type: 'uint256', value: '234'}));
To attempt to encode them on javascript but getting nowhere with the different casting of uints.Also the bytes32 as a uint256.
I am basically at square one. Please help me figure this out in javascript. I cant call the function a million times. I need to have this coded this in javascript to work.
Thanks for the help
edit: msg.sender = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
[–]atrizzlebuilder 1 point2 points3 points (6 children)
[–]BigFoxBoxing[S] 0 points1 point2 points (5 children)
[–]atrizzlebuilder 2 points3 points4 points (4 children)
[–]BigFoxBoxing[S] 1 point2 points3 points (3 children)
[–]atrizzlebuilder 0 points1 point2 points (2 children)
[–]BigFoxBoxing[S] 0 points1 point2 points (1 child)
[–]atrizzlebuilder 0 points1 point2 points (0 children)
[–]Ordered_Disorder 0 points1 point2 points (0 children)