Skip to content

Override cast send input data #3534

Answered by CreamyMilk
CreamyMilk asked this question in Q&A
Discussion options

You must be logged in to vote

Sort of figured this out similar to seth send [<options>] <to> [<data>] you have to encode you data in hex and prefix it with 0x

# example
cast send 0x00000000CF0D6a036022a78D694aF77456b32394  0x466f756e64727920697320736f20636f6f6c203b29

let mut data = hex::decode(code.strip_prefix("0x").unwrap_or(&code))?;
if let Some((sig, args)) = params {
let (mut sigdata, _) = builder.create_args(sig, args).await?;
data.append(&mut sigdata);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CreamyMilk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant