Expose which keys signed the Transaction in the SDK

This commit is contained in:
Michael Vines
2018-11-29 12:32:16 -08:00
parent 0878bd53d9
commit bad0b55ab6
13 changed files with 116 additions and 39 deletions

View File

@@ -20,6 +20,11 @@ extern bool entrypoint(const uint8_t *input) {
return false;
}
if (!ka[0].is_signer) {
sol_log("Transaction not signed by key 0");
return false;
}
int64_t tokens = *(int64_t *)data;
if (*ka[0].tokens >= tokens) {
*ka[0].tokens -= tokens;