PoC for sponsored fees

This commit is contained in:
Mayukha Vadari
2024-03-13 11:02:49 -04:00
committed by tequ
parent edb4f0342c
commit cad305ac7e
10 changed files with 95 additions and 6 deletions

View File

@@ -233,6 +233,25 @@ STTx::getSeqValue() const
return getSeqProxy().value();
}
AccountID
STTx::getFeePayer() const
{
if (isFieldPresent(sfSponsor))
{
if (getFieldObject(sfSponsor)[sfFlags] & tfSponsorFee)
{
return getFieldObject(sfSponsor)[sfAccount];
}
}
if (isFieldPresent(sfDelegate))
{
return getAccountID(sfDelegate);
}
return getAccountID(sfAccount);
}
void
STTx::sign(PublicKey const& publicKey, SecretKey const& secretKey)
{