I'm trying to write a Node script that will transfer an ERC1155 token on the Matic network from my address to someone else's address.

Here's an example token: https://opensea.io/assets/matic/0x2953399124f0cbb46d2cbacd8a89cf0599974963/72846082262473004479256831974008120683339732829716081255357396830225176237696

I thought I could just use https://github.com/maticnetwork/matic.js, but it seems to only work for ERC20/ERC721 tokens.

I then played around with https://docs.moralis.io/moralis-server/sending-assets#transferring-erc1155-tokens-semi-fungible, but I can't figure out how to authenticate it using web3 or truffle + my wallet mnemonic. Moralis seems like it's meant for frontend authentication (ie MetaMask Chrome Extension), but I need this to work with backend code.

Does anyone know how to do this? Thanks in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.