mint(contract, sender, currency, receiver, amount)
Feature
Returns raw operation to mint given amount of point to receiver. Note: Operator of contract also can execute the function.point
Parameters
string
contract address,
string
sender,
string
currency ID,
string
receiver,
string
| int
amount
Return Value
object
mint point operation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const currencyID = "MCC"
const receiver = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const amount = 100000;
const mintOperation = mitum.point.mint(contractAddress, sender, currencyID, receiver, amount);
console.log(mintOperation);
// output
Operation {
id: 'mitum',
fact: MintFact {
hint: Hint { s: 'mitum-point-mint-operation-fact' },
token: Token { s: '2023-10-19 09:03:28.993 +0000 UTC' },
_hash: <Buffer be fb c1 73 95 0f 13 1d 53 eb 6c 7a 99 3e 63 e9 c6 82 4a cc c1 60 cd 60 03 ed 5a 56 9a 12 74 7d>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
contract: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
receiver: Address {
s: '0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca',
type: 'mitum'
},
amount: Big { big: 100000n }
},
hint: Hint { s: 'mitum-point-mint-operation' },
_factSigns: [],
_hash: <Buffer >
}
Last updated