registerModel(contract, sender, currency, name, symbol, decimal?, initialSupply?)

Feature

Returns raw operation that register a new point model. Note: Handler of contract also can execute the function.

Parameters

string contract address, string sender, string currency ID, string name, string symbol, //must consist of uppercase letters. string | int (Optional) decimal, string | int (Optional) initialSupply

Return Value

object register point operation

example

const sender = "0xB8dE7113DE470Ab89304A954939126FA97a812dcfca";
const currencyID = "MCC";
const name = "CBA_POINT";
const symbol = "CBA";
const decimal = 9;
const initialSupply = 10000000;

const op = mitum.point.registerModel(contractAddress, sender, currencyID, name, symbol, decimal, initialSupply);
console.log(op );

Operation {
  id: 'mitum',
  fact: RegisterModelFact {
    hint: Hint { s: 'mitum-point-register-model-operation-fact' },
    token: Token { s: '2024-06-25 06:07:15.993 +0000 UTC' },
    _hash: <Buffer 0e 10 13 aa b2 f2 23 04 45 3a b1 23 1f 22 67 63 fb e3 d1 21 71 7a ab 4c c3 98 99 d9 cd 44 13 d9>,
    sender: Address {
      s: '0xB8dE7113DE470Ab89304A954939126FA97a812dcfca',
      type: 'mitum'
    },
    contract: Address {
      s: '0xCaD081cA8130Bf00148DfCCd96819c4a524d09a2fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' },
    symbol: CurrencyID { s: 'CBA' },
    name: LongString { s: 'CBA_POINT' },
    decimal: Big { big: 9n },
    initialSupply: Big { big: 10000000n }
  },
  hint: Hint { s: 'mitum-point-register-model-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated