Skip to main content

encode_constructor

Function encode_constructor 

Source
pub fn encode_constructor(
    bytecode: &[u8],
    constructor_args: &[AbiValue],
) -> Vec<u8> โ“˜
Expand description

Build contract deployment calldata: bytecode || abi.encode(constructor_args).

ยงArguments

  • bytecode โ€” The compiled contract bytecode
  • constructor_args โ€” Constructor arguments (empty if none)

Use this as the data field in a transaction with to: None.