nethereum
Service icon

Nethereum

version 0.1.0 (Compatible with OutSystems 11)
Uploaded
 on 29 November 2024
 by 
BlockChain Heroes
0.0
 (0 ratings)
nethereum

Nethereum

Documentation
0.1.0

Invoke Smart Contract Methods

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:
  • Web3 Information:
    • Chain Address: An url which will be used as the default RPC client. (E.g: https://rpc.ankr.com/avalanche_fuji)
  • 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:

  • Account Information:
    • Wallet Private Key: The wallet private key to be used to sign the transactions. (Don't share this private key with anyone and store it securely)

    • 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/

  • Method Information
    • 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

    • GasMaxValue: The max amount of gas you will pay. You can use the action Contract_SendMethod_EstimateGas to get the estimated gas before sending the transaction.



Deploy Smart Contracts


With this component you can also programatically deploy a smart contract to the block chain.

In order to do that you will need the following information:

  • Account Information:

    • Wallet Private Key: The wallet private key to be used to sign the transactions. (Don't share this private key with anyone and store it securely)

    • 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/

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

    • Contract Bytecode in hex format: The ByteCode of the smart contract. In the hex format. E.g: "0x608060405234801561001057....". This info can be found when you build your smart contract for instance.

  • Constructor Method Information:
    • Method parameters: The name and value of any parameter the constructor method of your smart contract may need.