Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
71a7083
chore: improve some help text in cast
onbjerg Apr 11, 2022
ecda276
fix: re-rename arg
onbjerg Apr 11, 2022
3a0c34f
chore: `cast calldata`
onbjerg Apr 11, 2022
568d2ac
chore: more cast commands
onbjerg Apr 11, 2022
d20ce06
chore: the rest of cast conversion commands
onbjerg Apr 11, 2022
91d4322
chore: all cast util commands
onbjerg Apr 11, 2022
2bffc57
fix: `cast --to-unit`
onbjerg Apr 11, 2022
0f1be9b
chore: `cast wallet`
onbjerg Apr 11, 2022
9b30039
chore: minor changes to help text
onbjerg Apr 11, 2022
f4def8a
style: add long option for etherscan key
onbjerg Apr 12, 2022
acf53f8
style: clearer arg names for `cast index`
onbjerg Apr 12, 2022
366545e
style: minor adjustments
onbjerg Apr 12, 2022
5bd7b0a
style: wording in `forge --help`
onbjerg Apr 12, 2022
7e6e2db
style: adjustments to `forge init`
onbjerg Apr 12, 2022
d72e4b6
style: `forge clean` adjustments
onbjerg Apr 12, 2022
3e7136e
style: adjustments to `forge install`
onbjerg Apr 12, 2022
187794a
style: improvements to `forge remappings`
onbjerg Apr 13, 2022
b0b20b2
style: improvements to `forge flatten`
onbjerg Apr 13, 2022
301d696
refactor: extract `ProjectPathsArgs`
onbjerg Apr 13, 2022
e032b3c
style: various adjustments
onbjerg Apr 13, 2022
1bb36d2
chore: add link to book at end of `--help`
onbjerg Apr 13, 2022
4ba9584
style: more verify improvements
onbjerg Apr 13, 2022
94f3c98
style: minor adjustments to `forge bind`
onbjerg Apr 13, 2022
6f76cb6
refactor: split `BuildArgs` into smaller pieces
onbjerg Apr 14, 2022
bb27e7d
style: minor adjustments to `forge build`
onbjerg Apr 14, 2022
26bf3ff
style: `forge inspect` improvements
onbjerg Apr 14, 2022
3b7a3ec
style: various improvements
onbjerg Apr 14, 2022
82aeb4c
style: various adjustments
onbjerg Apr 14, 2022
5b87e90
style: remaining help text
onbjerg Apr 14, 2022
a639286
fix: missing import after rebase
onbjerg Apr 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions cli/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async fn main() -> eyre::Result<()> {
}
Subcommands::ToUnit { value, unit } => {
let val = unwrap_or_stdin(value)?;
println!("{}", SimpleCast::to_unit(val, unit.unwrap_or_else(|| String::from("wei")))?);
println!("{}", SimpleCast::to_unit(val, unit)?);
}
Subcommands::ToWei { value, unit } => {
let val = unwrap_or_stdin(value)?;
Expand All @@ -159,7 +159,7 @@ async fn main() -> eyre::Result<()> {
let provider = Provider::try_from(eth.rpc_url()?)?;
let mut builder = TxBuilder::new(
&provider,
eth.from.unwrap_or(Address::zero()),
eth.wallet.from.unwrap_or(Address::zero()),
address,
eth.chain,
false,
Expand Down Expand Up @@ -322,7 +322,7 @@ async fn main() -> eyre::Result<()> {
.await?;
}
}
} else if let Some(from) = eth.from {
} else if let Some(from) = eth.wallet.from {
if resend {
nonce = Some(provider.get_transaction_count(from, None).await?);
}
Expand Down Expand Up @@ -391,8 +391,8 @@ async fn main() -> eyre::Result<()> {
Subcommands::AbiEncode { sig, args } => {
println!("{}", SimpleCast::abi_encode(&sig, &args)?);
}
Subcommands::Index { from_type, to_type, from_value, slot_number } => {
let encoded = SimpleCast::index(&from_type, &to_type, &from_value, &slot_number)?;
Subcommands::Index { key_type, value_type, key, slot_number } => {
let encoded = SimpleCast::index(&key_type, &value_type, &key, &slot_number)?;
println!("{}", encoded);
}
Subcommands::FourByte { selector } => {
Expand Down Expand Up @@ -669,7 +669,6 @@ async fn main() -> eyre::Result<()> {
// TODO: Figure out better way to get wallet only.
let wallet = EthereumOpts {
wallet,
from: None,
rpc_url: Some("http://localhost:8545".to_string()),
flashbots: false,
chain: Chain::Mainnet,
Expand All @@ -690,7 +689,6 @@ async fn main() -> eyre::Result<()> {
// TODO: Figure out better way to get wallet only.
let wallet = EthereumOpts {
wallet,
from: None,
rpc_url: Some("http://localhost:8545".to_string()),
flashbots: false,
chain: Chain::Mainnet,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cmd/cast/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl figment::Provider for CallArgs {
dict.insert("eth_rpc_url".to_string(), Value::from(rpc_url.to_string()));
}

if let Some(from) = self.eth.from {
if let Some(from) = self.eth.wallet.from {
dict.insert("sender".to_string(), Value::from(format!("{:?}", from)));
}

Expand Down
6 changes: 3 additions & 3 deletions cli/src/cmd/forge/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ pub struct BindArgs {

#[clap(
long = "crate-name",
help = "The name of the rust crate to generate. This should be a valid crates.io crate name. However, it is not currently validated by this command.",
help = "The name of the Rust crate to generate. This should be a valid crates.io crate name. However, it is not currently validated by this command.",
default_value = DEFAULT_CRATE_NAME,
)]
#[serde(skip)]
crate_name: String,

#[clap(
long = "crate-version",
help = "The version of the rust crate to generate. This should be a standard semver version string. However, it is not currently validated by this command.",
help = "The version of the Rust crate to generate. This should be a standard semver version string. However, it is not currently validated by this command.",
default_value = DEFAULT_CRATE_VERSION,
)]
#[serde(skip)]
Expand All @@ -59,7 +59,7 @@ pub struct BindArgs {

#[clap(
long = "overwrite",
help = "Overwrite existing generated bindings. If set to false, the command will check that the bindings are correct, and then exit. If set to true, it will instead delete and overwrite the bindings."
help = "Overwrite existing generated bindings. By default, the command will check that the bindings are correct, and then exit. If --overwrite is passed, it will instead delete and overwrite the bindings."
)]
#[serde(skip)]
overwrite: bool,
Expand Down
Loading