NearApi.Contract (near_api v0.1.7)
NearApi Contract struct Contains account, contract_id, and params for the contract call
Link to this section Summary
Functions
Function to call a NEAR Contract method.
account - an account strut NearApi.Account where account_id and key_pair
Link to this section Types
Specs
t() :: %NearApi.Contract{
account: NearApi.Account.t(),
contract_id: String.t(),
params: map()
}
Link to this section Functions
Link to this function
call(caller_account, contract_id, method, args)
Specs
call( caller_account :: NearApi.Account.t(), contract_id :: String.t(), method :: String.t(), params :: map() ) :: {:ok, body :: map()} | NearApi.RPC.Errors.t()
Function to call a NEAR Contract method.
account - an account strut NearApi.Account where account_id and key_pair
- `key_pair` should contain public_key contract_id - string value of the Near Contract ID, e.g. nft.mintbot.near
method - string value of the contract method, e.g. mint_nft
args - arguments for the method of the contract