Skip to content
Open
Changes from all commits
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: 16 additions & 0 deletions Stellar-contract.x
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ enum SCAddressType
SC_ADDRESS_TYPE_MUXED_ACCOUNT = 2,
SC_ADDRESS_TYPE_CLAIMABLE_BALANCE = 3,
SC_ADDRESS_TYPE_LIQUIDITY_POOL = 4
#ifdef CAP_0084_MUXED_CONTRACT
,
SC_ADDRESS_TYPE_MUXED_CONTRACT = 5
#endif
};

struct MuxedEd25519Account
Expand All @@ -191,6 +195,14 @@ struct MuxedEd25519Account
uint256 ed25519;
};

#ifdef CAP_0084_MUXED_CONTRACT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the additional suffix necessary? I'm not sure if it adds much value, given that we shouldn't have more than a single guard per CAP.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was based on some feedback in the FSR channel. It just adds a little clarity so you don't need to remember what the CAP number does.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I don't have too strong opinion, we can try this as well.

struct MuxedContract
{
uint64 id;
ContractID contractId;
};
#endif

union SCAddress switch (SCAddressType type)
{
case SC_ADDRESS_TYPE_ACCOUNT:
Expand All @@ -203,6 +215,10 @@ case SC_ADDRESS_TYPE_CLAIMABLE_BALANCE:
ClaimableBalanceID claimableBalanceId;
case SC_ADDRESS_TYPE_LIQUIDITY_POOL:
PoolID liquidityPoolId;
#ifdef CAP_0084_MUXED_CONTRACT
case SC_ADDRESS_TYPE_MUXED_CONTRACT:
MuxedContract muxedContract;
#endif
};

%struct SCVal;
Expand Down
Loading