updateSetting(contract, sender, transfer_limit, start_time, end_time, duration, currency)
Feature
Generate update-account-setting operation to update transfer setting. end_time > start_time && duration <= (end_time - start_time) Note: Any accounts can execute the operation.
Parameters
string contract address,
string sender,
string | number transfer_limit, // The maximum amount that can be sent.
string | number start_time, //The start time when a transfer becomes possible. (timestamp)
string | number end_time, //The end time after which a transfer is no longer allowed. (timestamp)
string | number duration, // The cooldown period (in seconds) after the last transfer, during which further transfers are blocked.
string currency ID
Return Value
object update-account-setting operation
example
const contract = "0x675b7c22dd188Af248985C64278081cC64Dc9bD2fca";
const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const currencyID = "MCC";
const transfer_limit = 1000;
const startTime = 0;
const endTime = 1738895873;
const duration = 100;
const op = mitum.payment.updateSetting(contract, sender, transfer_limit, startTime, endTime, duration, currencyID);
console.log(op);
// output
Operation {
id: 'mitum',
fact: UpdateFact {
hint: Hint { s: 'mitum-payment-update-account-setting-operation-fact' },
token: Token { s: '2025-02-07 02:21:13.747 +0000 UTC' },
_hash: <Buffer b4 40 83 76 13 5c 78 d0 23 bb 9c 3b 58 2e 07 53 cf 6d 04 1b 37 6e 2b 01 ee 03 fe d5 9c ed 67 be>,
sender: Address {
s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
type: 'mitum'
},
contract: Address {
s: '0x0edc2c8f1b2766715D06f89de9a3c2c9fa4f081Ffca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
transfer_limit: Big { big: 1000n },
start_time: Big { big: 0n },
end_time: Big { big: 1738895873n },
duration: Big { big: 100n }
},
hint: Hint { s: 'mitum-payment-update-account-setting-operation' },
_factSigns: [],
_hash: <Buffer >
}Previousdeposit(contract, sender, amount, transfer_limit, start_time, end_time, duration, currency)Nexttransfer(contract, sender, receiver, amount, currency)
Last updated