Created
February 2, 2022 02:57
-
-
Save 1Firsts/8cb91feeee74d67670be35da8e6571b3 to your computer and use it in GitHub Desktop.
Defining The Instruction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (instruction_byte, all_other_bytes) = data.split_first().unwrap(); | |
if *i nstruction_byte == 0{ | |
// create campaign | |
} | |
else if *instruction_byte == 1{ | |
// fund a campaign | |
} | |
else if *instruction_byte == 2{ | |
// get how much funds are left to reach the requested amount | |
} | |
else if *instruction_byte == 3{ | |
// withdraw all collected funds and close campaign | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment