Skip to content

how to use pallet_revive to execute solidity #254

Closed Locked Answered by xermicus
Subway2023 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Subway2023, the data field is indeed what gets passed to the contract as input ("call data" in Solidity terms). The function being called is implied by the first 4 bytes in the call data (so called function selector). For call data encoding I suggest using the alloy crate, it has even some convenience macros.

Edit for completeness: Instantiate will always run the constructor code.

Replies: 3 comments 18 replies

Comment options

You must be logged in to vote
4 replies
@xermicus
Comment options

Answer selected by xermicus
@Subway2023
Comment options

@athei
Comment options

athei Jan 21, 2025
Collaborator

@Subway2023
Comment options

Comment options

You must be logged in to vote
9 replies
@xermicus
Comment options

@xermicus
Comment options

@Subway2023
Comment options

@xermicus
Comment options

@Subway2023
Comment options

Comment options

You must be logged in to vote
5 replies
@xermicus
Comment options

@Subway2023
Comment options

@Subway2023
Comment options

@xermicus
Comment options

@Subway2023
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants