MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / fevm_invoke

Function fevm_invoke

fendermint/app/src/cmd/rpc.rs:208–229  ·  view source on GitHub ↗

Invoke an EVM contract through RPC and print the response to STDOUT as JSON.

(
    client: FendermintClient,
    args: TransArgs,
    contract: Address,
    method: Bytes,
    method_args: Bytes,
)

Source from the content-addressed store, hash-verified

206
207/// Invoke an EVM contract through RPC and print the response to STDOUT as JSON.
208async fn fevm_invoke(
209 client: FendermintClient,
210 args: TransArgs,
211 contract: Address,
212 method: Bytes,
213 method_args: Bytes,
214) -> anyhow::Result<()> {
215 let calldata = Bytes::from([method, method_args].concat());
216 broadcast_and_print(
217 client,
218 args,
219 |mut client, value, gas_params| {
220 Box::pin(async move {
221 client
222 .fevm_invoke(contract, calldata, value, gas_params)
223 .await
224 })
225 },
226 |data| serde_json::Value::String(hex::encode(data)),
227 )
228 .await
229}
230
231/// Call an EVM contract through RPC and print the response to STDOUT as JSON.
232async fn fevm_call(

Callers

nothing calls this directly

Calls 2

broadcast_and_printFunction · 0.85
fevm_invokeMethod · 0.45

Tested by

no test coverage detected