Name | Description | Required? | Validation |
| The name of your custom asset. | Yes |
|
| The amount of collateral that you which to exchange into the stable credit. | Yes |
|
package mainimport ("context""github.com/velo-protocol/DRSv2_Evrynet/libs/vclient""log")func main() {client, err := vclient.NewClient("<evrynet rpc>", "<account private key>", ContractAddress{DrsAddress: "<drs address>",HeartAddress: "<heart address>",})if err != nil {panic(err)}result, err := client.MintFromCollateralAmount(context.Background(), &MintFromCollateralAmountInput{AssetCode: "vUSD",CollateralAmount: "100",})if err != nil {panic(err)}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)}
You now have stable credit. Play around with it! When you are ready, you can redeem the collateral back.