Hi all,
I’m trying to make a transfer of CCD tokens from the backend. I do not see any example on that and would love to know if any, or an example of how to perform such from the backend.
Thank you in advance.
Doris
January 24, 2024, 7:19am
2
You can look at the following examples to transfer the native currency CCD.
//! Basic example that shows how to send a transaction, in this case a transfer
//! from the account to itself.
use anyhow::Context;
use clap::AppSettings;
use concordium_rust_sdk::{
common::types::{Amount, TransactionTime},
types::{
transactions::{send, BlockItem},
WalletAccount,
},
v2::{self},
};
use std::path::PathBuf;
use structopt::*;
#[derive(StructOpt)]
struct App {
#[structopt(
long = "node",
help = "GRPC interface of the node.",
This file has been truncated. show original
//! Send a given amount of CCD to the account listed in a provided file.
//! The file format should be one account address per line.
use anyhow::Context;
use clap::AppSettings;
use concordium_rust_sdk::{
common::types::{Amount, TransactionTime},
id::types::AccountAddress,
types::{
self,
transactions::{send, BlockItem},
WalletAccount,
},
v2::{self, BlockIdentifier},
};
use std::{io::BufRead, path::PathBuf};
use structopt::StructOpt;
#[derive(StructOpt)]
struct App {
#[structopt(
This file has been truncated. show original
1 Like
WHich SDK are you using?
Most of them have examples of how to do this
1 Like