Developer Center

Developer Center

  • Getting Started
  • Built-in Features
  • REST API Endpoints
  • Guides
  • Cheat Sheet

Modify Mosaic Levy

Create or modify levy of a mosaic.

Background

Golang
// an exist mosaicId. For example created ne one
mosaicId, err := sdk.NewMosaicIdFromNonceAndOwner(nonce, creator.PublicAccount.PublicKey)
if err != nil {
panic(err)
}
// Add levy
levyTx, err := Client.NewMosaicModifyLevyTransaction(
sdk.NewDeadline(Deadline),
mosaicId,
&sdk.MosaicLevy{
Type: sdk.LevyAbsoluteFee,
Recipient: levyRecipient.Address,
Fee: levy,
MosaicId: mosaicId,
},
)
if err != nil {
panic(err)
}

// ** Anounnce levyTx and wait **

info, err = Client.Mosaic.GetMosaicLevy(context.TODO(), mosaicId)
if err != nil {
panic(err)
}

println(info.String())
  • Background
  • Follow our profile
  • Ask development questions
  • Join our Discord channel
  • Explore our Youtube channel
  • Explore Github
Protocol
BlockConsensus AlgorithmsCryptographyInflationNodeReceiptTransactionValidating
Built-in Features
AccountAggregate TransactionCross-Chain SwapsExchange MarketDecentralized Exchange MarketMetadataMosaicMultisig AccountNamespaceTransfer TransactionStorageLiquidity Provider
References
REST APISDKsCheat Sheet
Includes Documentation Forked from NEM
Copyright © 2025 Sirius Chain