0

Where can I find some valid documentation to understand what kind of parameters and call should I do in my javascript file in the html pages of a client to interact with deployed smart contracts through metamask?

For example I am trying to call a function of a smart contract with window.ethereum.request(data) but I don't understand how to structure "data"

1 Answer 1

0

You can go to the official metamask docs to initialize for getting started: https://docs.metamask.io/wallet/category/get-started/

For sending transactions, you can do it directly with metamssk building the transaction, or better. I would suggest you use a library like ethers.js that allows you to instantiate the contract and interact with it.

You can see some code snippets in this answer: https://stackoverflow.com/questions/60785630/how-to-connect-ethers-js-with-metamask/67836760#67836760

Hope it helps, and welcome to web3!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.