Method
fevm_create
(
&mut self,
contract: Bytes,
constructor_args: Bytes,
value: TokenAmount,
gas_params: GasParams,
)
Source from the content-addressed store, hash-verified
| 66 | } |
| 67 | |
| 68 | pub fn fevm_create( |
| 69 | &mut self, |
| 70 | contract: Bytes, |
| 71 | constructor_args: Bytes, |
| 72 | value: TokenAmount, |
| 73 | gas_params: GasParams, |
| 74 | ) -> anyhow::Result<Message> { |
| 75 | let initcode = [contract.to_vec(), constructor_args.to_vec()].concat(); |
| 76 | let initcode = RawBytes::serialize(BytesSer(&initcode))?; |
| 77 | Ok(self.transaction( |
| 78 | eam::EAM_ACTOR_ADDR, |
| 79 | eam::Method::CreateExternal as u64, |
| 80 | initcode, |
| 81 | value, |
| 82 | gas_params, |
| 83 | )) |
| 84 | } |
| 85 | |
| 86 | pub fn fevm_invoke( |
| 87 | &mut self, |