Logo
Explore Help
Sign In
gaspersic/solana
1
0
Fork 0
You've already forked solana
Code Issues Pull Requests Projects Releases Wiki Activity
solana/clap-utils/src/memo.rs

17 lines
402 B
Rust
Raw Normal View History

issue #10831: added --with-memo option to all cli commands that submit (#16291) * issue #10831: added --with-memo option to all cli commands that submit transactions. Also, improve the block command to show UTF-8 string instead of integer values for memo program data. * Fixed tests and changed some syntax according to feedback. * Use spl_memo id (all versions where applicable) instead of hardcoding id. * Update Cargo.toml in programs/bpf. * Update formatting via cargo fmt. * Update to use spl_memo version 3.0.1, which simplifies package imports
2021-04-05 13:53:50 -07:00
use crate::ArgConstant;
use clap::Arg;
pub const MEMO_ARG: ArgConstant<'static> = ArgConstant {
name: "memo",
long: "--with-memo",
help: "Specify a memo string to include in the transaction.",
};
pub fn memo_arg<'a, 'b>() -> Arg<'a, 'b> {
Arg::with_name(MEMO_ARG.name)
.long(MEMO_ARG.long)
.takes_value(true)
.value_name("MEMO")
.help(MEMO_ARG.help)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 91ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API