getStorage
Input Arguments
Parameter
Description
Success Response
Parameter
Description
Error Response
Parameter
Description
Example
Request
neoline.getStorage({
scriptHash: '03febccf81ac85e3d795bc5cbd4e84e907812aa3',
key: 'Peter',
network: 'TestNet'
})
.then(result => {
const value = result;
console.log('Storage value: ' + value.result);
})
.catch((error) => {
const {type, description, data} = error;
switch(type) {
case 'NO_PROVIDER':
console.log('No provider available.');
break;
case 'CONNECTION_REFUSED':
console.log('Connection dApp not connected. Please call the "connect" function.');
break;
case 'RPC_ERROR':
console.log('There was an error when broadcasting this transaction to the network.');
break;
default:
// Not an expected error object. Just write the error to the console.
console.error(error);
break;
}
});Response
最后更新于