mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
(semi-)working wasm contract
This commit is contained in:
@@ -37,9 +37,11 @@ pub struct Args {
|
||||
// Through here, you can branch out into different functions inside
|
||||
// this library.
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction(_state: &[u8], ix: &[u8]) -> ContractResult {
|
||||
fn process_instruction(/*_state: &[u8], */ ix: &[u8]) -> ContractResult {
|
||||
msg!("Hello from the VM runtime!");
|
||||
// Deserialize the payload into `Args`.
|
||||
let args: Args = deserialize(ix)?;
|
||||
msg!("deserializing payload worked");
|
||||
|
||||
if args.a < args.b {
|
||||
// Returning custom errors
|
||||
|
||||
Reference in New Issue
Block a user