Skip to content

Commit

Permalink
Replace ContractAuth addressWithNonce option with explicit union (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored May 23, 2023
1 parent 076061a commit a9feddf
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,23 @@ struct AddressWithNonce
uint64 nonce;
};

enum AuthorizerType
{
AUTHORIZER_SOURCE_ACCOUNT = 0,
AUTHORIZER_ADDRESS = 1,
};

union Authorizer switch (AuthorizerType type)
{
case AUTHORIZER_SOURCE_ACCOUNT:
void;
case AUTHORIZER_ADDRESS:
AddressWithNonce address;
};

struct ContractAuth
{
AddressWithNonce* addressWithNonce; // not present for invoker
Authorizer authorizer;
AuthorizedInvocation rootInvocation;
SCVec signatureArgs;
};
Expand Down

0 comments on commit a9feddf

Please sign in to comment.