Closed robliou closed 1 year ago
You can only get storage information if the contract uses "storage.put" function. You would need to pass the key to the function.
storage.put(b'X' + from_address.to_bytes(), amount)
storage.put(b'X' + from_address.to_bytes(), data)
neolineN3.getStorage({
scriptHash: 'hash here',
key: 'X006b26dd0d2aa076b11082847a094772450f05af', // storage.put(b'X' + from_address.to_bytes(), data)
})
Hi @hacfox ,
Thanks to your help from yesterday, I was able to use the Neoline.invoke() method to not only call the 'transfer' operation, but also to input a piece of
data
(string: 'hello') to storage, as seen below:Using dora, I verified that the
data
was properly stored to the blockchain:My follow up question is, is it possible to use a Neoline call to obtain this
data
? I tried using the Neoline.getStorage() method:But I get this error:
There was an error when broadcasting this transaction to the network.
Any idea what I could be doing wrong here, or if there is a better way to get data that has been stored?
For additional reference, this is how data is stored in the Boa smart contract:
Thanks in advance,