Implementation
XdrContractAuth toXdr() {
XdrAddressWithNonce? addressWithNonce;
if (address != null && nonce != null) {
addressWithNonce =
XdrAddressWithNonce(address!.toXdr(), XdrUint64(nonce!));
}
// See: https://discord.com/channels/897514728459468821/1076723574884282398/1078095366890729595
List<XdrSCVal> sigArgs = List<XdrSCVal>.empty(growable: true);
if (signatureArgs.length > 0) {
XdrSCObject obj = XdrSCObject.forVec(signatureArgs);
XdrSCVal val = XdrSCVal.forObject(obj);
sigArgs.add(val);
}
return new XdrContractAuth(
addressWithNonce, rootInvocation.toXdr(), sigArgs);
}