evm-smart-contracts-metamask-connector
Reactive icon

EVM Smart Contracts MetaMask Connector

version 0.1.1 (Compatible with OutSystems 11)
Uploaded
 on 14 December 2024
 by 
BlockChain Heroes
0.0
 (0 ratings)
evm-smart-contracts-metamask-connector

EVM Smart Contracts MetaMask Connector

Documentation
0.1.0

With this component you can invoke a method from a Smart Contract in 2 different ways:


- Read-only: Using a call operation you can invoke a method that will not change anything on the block-chain and use no gas (Has no cost)


- Non read-only: Using a send operation you can invoke a method that will change the block-chain and to do that you will need to use gas (Thus it will have a cost and you will need to provide a origin wallet)


Check the info below for more details of what is needed in each case: 


Read Only (Call Operation)

For a read-only transaction you will need the following information:

  • MetaMask Extension: To be able to sign a message you need MetaMask chrome extension installed and properly configured with your wallet account. MemaMask will handle the transactions without the need to expose your private key.

  • Web3 Information:
    • Chain ID: The BlockChain ID you want to use from the network you chose. If you are not sure which ID to use check this site: https://chainid.network/

  • Contract Information:

    • Contract ABI in JSON format: The ABI is sort like the signature of a smart contract.

    • Contract Address in Hex Format: The contract's address in the network in HEX. (E.g: something starting with 0x like 0x281379E.....)

  • Method Information:

    • Method name: The name of the method you want to call. Matching exactly what you have on your contract's ABI.

    • Method parameters: The name and value of any parameter your method may need.


Non Read-Only (Send Operation)

For a non-read-only transaction you will need everything need for the call operation plus the following information:

  • For a non-read-only transaction you will need everything need for the call operation plus the following information:
    - Method Information (Optional)
    - Value To Send:The value you want to send as part of this transaction. It can be 0 if you don't want to send anything
    - Address To Send: The Address of the wallet you want to send


    • Value To Send:The value you want to send as part of this transaction. It can be 0 if you don't want to send anything

    • Address To Send: The Address of the wallet you want to send



Metamask


You can also use this component to interact with the MetaMask Chrome extension.

You can even use MetaMask to sign messages, without any interaction with a smart contract.

This message then can even be validate in the Server Side using a component like Nethereum.