When instantiating a contract that expects String's as arguments, Pop CLI fails:
For example, instantiating the PSP22 contract:
#[ink(constructor)]
pub fn new(
supply: u128,
name: Option<String>,
symbol: Option<String>,
decimals: u8,
) -> Self {
let (data, events) = PSP22Data::new(supply, Self::env().caller()); // (2)
let contract = Self {
data,
name,
symbol,
decimals,
};
contract.emit_events(events);
contract
}
pop up contract --constructor new --args 10000000, "AWESOME", "AWE", 10
The following error is emitted:
┌ Pop CLI : Deploy a smart contract
│
■ An error occurred instantiating the contract: No variant 'AWESOME' found
For it to work, I need to wrap the strings in Some() with '' around so that zsh does not complain:
pop up contract --constructor new --args 10000000, 'Some("AWESOME")', 'Some("AWE")', 10