Mint stable credit

Mint the stable credit you set up


package main

import (

func main() {

	client, err := vclient.NewClient("<evrynet rpc>", "<account private key>", ContractAddress{
		DrsAddress:   "<drs address>",  
		HeartAddress: "<heart address>", 

	if err != nil {

	result, err := client.MintFromCollateralAmount(context.Background(), &MintFromCollateralAmountInput{
		AssetCode:        "vUSD",
		CollateralAmount: "100",
	if err != nil {

	log.Println("Mint From Collateral Amount Transaction Hash: ", result.Tx.Hash().String())
	log.Println("Asset Address: ", result.Event.AssetAddress)
	log.Println("Asset Code: ", result.Event.AssetCode)
	log.Println("Collateral Amount: ", result.Event.CollateralAmount)
	log.Println("Collateral Asset Code: ", result.Event.CollateralAssetCode)
	log.Println("Stable Credit Amount: ", result.Event.StableCreditAmount)

What's next?

You now have stable credit. Play around with it! When you are ready, you can redeem the collateral back.

Last updated