I'm looking for some methods to know the content of storage and memory while the contract is running.Mayba some useful tools or abi ?
By the way, the abi of geth, debug_writeMemProfile and debug_memStats, confuse me a lot. Are they helpful?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI'm looking for some methods to know the content of storage and memory while the contract is running.Mayba some useful tools or abi ?
By the way, the abi of geth, debug_writeMemProfile and debug_memStats, confuse me a lot. Are they helpful?
for reading stroage from outsi you can use web3.eth.getStorageAt(contractAddress, index) for memory i don't think it's possible to read from outsid its content.
in web3js 1.0 documentation :
getStorageAt web3.eth.getStorageAt(address, position [, defaultBlock] [, callback]) Get the storage at a specific position of an address.
for example :
contractAddress = '0x123......'
for (index = 0; index < 10; index++){
console.log(`[${index}]` +
web3.eth.getStorageAt(contractAddress, index))
}