Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ContractAuth addressWithNonce option with explicit union #88

Merged
merged 3 commits into from
May 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
dmkozh marked this conversation as resolved.
Show resolved Hide resolved
AuthorizedInvocation rootInvocation;
SCVec signatureArgs;
};
Expand Down