Skip to content
Discussion options

You must be logged in to vote

Yes, you can do this in Rust.

The main difference is that zksync-web3-rs does not give you a getPaymasterParams(...) helper like the TS side. In Rust you build the paymaster part yourself and attach it to Eip712Meta.

For a contract call, the shape is:

  • encode the contract call data for contribute()
  • build PaymasterParams
  • put that into Eip712Meta
  • build an Eip712TransactionRequest with to, value, data, and custom_data
  • use that same request for estimate_fee or zk_estimate_gas
  • send it with send_transaction_eip712

One important detail: for the General flow, paymaster_input is not just an empty Vec<u8>. It should be the ABI-encoded call to the paymaster's general(bytes) function. The official R…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vasyl-ivanchuk
Comment options

Answer selected by vasyl-ivanchuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
SDKs
Labels
sdk Questions for the SDKs
3 participants