Skip to content

Commit

Permalink
Add some help texts to arguments and some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemoldrup committed Sep 27, 2023
1 parent ab6a6df commit 69f4dd9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
18 changes: 18 additions & 0 deletions generator/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ impl MintCis2Generator {
let info = ContractDeploymentInfo {
module: MINT_CIS2_MODULE,
name: "init_cis2_nft",
// Determined by running the transaction and inspecting the energy cost with
// concordium-client.
init_energy: Energy::from(2397),
};
let contract_address = info
Expand Down Expand Up @@ -326,6 +328,8 @@ impl Generate for MintCis2Generator {
sender_address: self.args.keys.address,
nonce: self.nonce,
expiry: TransactionTime::seconds_after(self.args.expiry),
// Determined by running the transaction and inspecting the energy cost with
// concordium-client and then adding extra to account for variance.
energy: GivenEnergy::Absolute(Energy::from(3500)),
amount: Amount::zero(),
};
Expand Down Expand Up @@ -398,6 +402,8 @@ impl TransferCis2Generator {
let info = ContractDeploymentInfo {
module: TRANSFER_CIS2_MODULE,
name: "init_cis2_multi",
// Determined by running the transaction and inspecting the energy cost with
// concordium-client.
init_energy: Energy::from(2353),
};
let contract_address = info
Expand Down Expand Up @@ -428,6 +434,8 @@ impl TransferCis2Generator {
sender_address: args.keys.address,
nonce: nonce.nonce,
expiry: TransactionTime::seconds_after(args.expiry),
// Determined by running the transaction and inspecting the energy cost with
// concordium-client.
energy: GivenEnergy::Absolute(Energy::from(2740)),
amount: Amount::zero(),
};
Expand Down Expand Up @@ -474,6 +482,8 @@ impl Generate for TransferCis2Generator {
sender_address: self.args.keys.address,
nonce: self.nonce,
expiry: TransactionTime::seconds_after(self.args.expiry),
// Determined by running the transaction and inspecting the energy cost with
// concordium-client and then adding extra to account for variance.
energy: GivenEnergy::Absolute(Energy::from(3500)),
amount: Amount::zero(),
};
Expand Down Expand Up @@ -525,6 +535,8 @@ impl WccdGenerator {
let info = ContractDeploymentInfo {
module: WCCD_MODULE,
name: "init_cis2_wCCD",
// Determined by running the transaction and inspecting the energy cost with
// concordium-client.
init_energy: Energy::from(2596),
};
let params = SetMetadataUrlParams {
Expand Down Expand Up @@ -592,6 +604,8 @@ impl Generate for WccdGenerator {
sender_address: self.args.keys.address,
nonce: self.nonce,
expiry: TransactionTime::seconds_after(self.args.expiry),
// Determined by running the transaction and inspecting the energy cost with
// concordium-client and then adding extra to account for variance.
energy: GivenEnergy::Absolute(Energy::from(3500)),
amount: Amount::zero(),
};
Expand Down Expand Up @@ -698,6 +712,8 @@ impl RegisterCredentialsGenerator {
let info = ContractDeploymentInfo {
module: REGISTER_CREDENTIALS_MODULE,
name: "init_credential_registry",
// Determined by running the transaction and inspecting the energy cost with
// concordium-client.
init_energy: Energy::from(2970),
};
// The parameters don't matter, since we can still issue, so they are all dummy
Expand Down Expand Up @@ -752,6 +768,8 @@ impl Generate for RegisterCredentialsGenerator {
sender_address: self.args.keys.address,
nonce: self.nonce,
expiry: TransactionTime::seconds_after(self.args.expiry),
// Determined by running the transaction and inspecting the energy cost with
// concordium-client and then adding extra to account for variance.
energy: GivenEnergy::Absolute(Energy::from(5000)),
amount: Amount::zero(),
};
Expand Down
8 changes: 6 additions & 2 deletions generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ struct App {
default_value = "http://localhost:20000"
)]
endpoint: Endpoint,
#[clap(long = "sender")]
#[clap(long = "sender", help = "Path to file containing sender keys.")]
account: PathBuf,
#[clap(long = "tps")]
#[clap(
long = "tps",
help = "Transactions to send per second.",
default_value = "1"
)]
tps: u16,
#[clap(
long = "expiry",
Expand Down

0 comments on commit 69f4dd9

Please sign in to comment.