Signing
ThePortal instance includes a number of helper functions to allow you to execute Provider requests without having to worry about encoding, request format, or what method to pass in your request. These helper functions allows you to easily sign and submit transactions, sign messages, and even sign typed data.
Signature approval memo
Clients can pass an optionalsignatureApprovalMemo so the user sees a short description during the approval flow. It is supported in:
portal.request()— addsignatureApprovalMemoto any signing method (eth_sendTransaction,personal_sign,sol_signAndSendTransaction, etc.).portal.sendAsset(chain, params)— includesignatureApprovalMemoin theparamsobject. See Send tokens.portal.rawSign(curve, param, options)— pass an optional third argument with the memo.
Raw Requests with the Provider
Estimating Gas
By default, Portal will estimate and populate thegas property in a transaction object if the property is undefined.
To estimate the gas value manually use the eth_estimateGas RPC call and pass in your transaction as the parameter.