We should be able to retrieve the sierra programs given a class hash from a 0.5.0 RPC full node. That will enable us to use the RPC State Reader to fetch the Sierra needed for compiling to a binary using Cairo Native.
Example call to an RPC endpoint to get the Sierra program:
When that RPC method get called for a Cairo 1 contract, it returns the sierra program by default (with the corresponding casm code, ABI, etc). But when it is called for a Cairo 0 contract it just returns the deprecated contract class.
So we should pay attention to error handling when implementing this ticket.
We should be able to retrieve the sierra programs given a class hash from a 0.5.0 RPC full node. That will enable us to use the RPC State Reader to fetch the Sierra needed for compiling to a binary using Cairo Native.
Example call to an RPC endpoint to get the Sierra program:
Important
When that RPC method get called for a Cairo 1 contract, it returns the sierra program by default (with the corresponding casm code, ABI, etc). But when it is called for a Cairo 0 contract it just returns the deprecated contract class. So we should pay attention to error handling when implementing this ticket.