### Description
- Implements SVM IGP quoting. Unfortunately the warp routes themselves
don't have direct getters for this, so we first need to get the expected
destination gas amount, and then do a call to the IGP
- An unfortunate consequence is that performing a "view call" on
Sealevel (i.e. a simulateTransaction call) requires you to specify a
payer that is capable of paying for the tx as if it were real (i.e. must
have funds, must be an EOA). I couldn't find any workaround other than
just requiring the payer to be passed in :(
### Drive-by changes
- Some further support for non-overhead IGP usage / some minor renaming
to more closely match the program jargon
### Related issues
<!--
- Fixes #[issue number here]
-->
### Backward compatibility
<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?
Yes/No
-->
### Testing
I tested this with an infra script that was calling the functions
against live warp routes. Not sure what the unit test practices we have
here are though, seems like we don't have any
// Should match Instruction in https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/8f8853bcd7105a6dd7af3a45c413b137ded6e888/rust/sealevel/programs/hyperlane-sealevel-igp/src/instruction.rs#L19-L42
thrownewError(`Unsupported IGP type ${igpConfig.type}`);
}
constigpAdapter=this.getIgpAdapter(tokenData);
returnigpAdapter?.getPaymentKeys();
}
// Should match https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/sealevel/libraries/hyperlane-sealevel-token/src/processor.rs#L257-L274
@ -457,33 +461,26 @@ export abstract class SealevelHypTokenAdapter
isWritable: true,
},
];
if(igp.igpAccount&&igp.innerIgpAccount){
if(igp.overheadIgpAccount){
keys=[
...keys,
// 12. [] OPTIONAL - The Overhead IGP account, if the configured IGP is an Overhead IGP
{
pubkey: igp.igpAccount,
pubkey: igp.overheadIgpAccount,
isSigner: false,
isWritable: false,
},
// 13. [writeable] The Overhead's inner IGP account
{
pubkey: igp.innerIgpAccount,
isSigner: false,
isWritable: true,
},
];
}else{
keys=[
...keys,
// 12. [writeable] The IGP account.
{
pubkey: igp.programId,
isSigner: false,
isWritable: true,
},
];
}
keys=[
...keys,
// 13. [writeable] The Overhead's inner IGP account (or the normal IGP account if there's no Overhead IGP).
{
pubkey: igp.igpAccount,
isSigner: false,
isWritable: true,
},
];
}
returnkeys;
}
@ -565,6 +562,36 @@ export abstract class SealevelHypTokenAdapter