Open SamuraiT opened 2 years ago
this one is much better soulution
data = '0x8be85aa800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000007368747470733a2f2f6261666b72656966656d7637696f6834676968346b676c667363746a776f796b33363766756a657070616779766c677673656672616b79327875692e697066732e647765622e6c696e6b2f3f66696c656e616d653d696e7669746174696f6e2d7469636b65742e6a736f6e00000000000000000000000000'
let abi = ["function createBadge(tuple(bool mintable,bool transferable,uint256 amount,uint256 maxSupply,string tokenURI,uint256 maxMintPerWallet) Badge)"]
let iface = new ethers.utils.Interface(abi);
let r = iface.parseTransaction({data})
console.log(r.args[0])