Npm package for decoding Elrond smart contract queries based on ABIs.
Using npm:
npm install -E @nerds.sh/elrond-decoder
Using yarn:
yarn add -E @nerds.sh/elrond-decoder
const { decode } = require('@nerds.sh/elrond-decoder')
const input = {
abi: {
type: 'file',
value: './raffle.abi.json',
},
contract: 'erd1qqqqqqqqqqqqqpgqvul86784zrj47hkn0y0pd4pzn8qyw0z6c32q558mf5',
environment: 'devnet',
func: 'getWinners',
// optional preserveTypes flag to preserve type information
}
decode(input)
.then(console.log)
.catch(console.error)