This PR implements the chain agnostic bridging check endpoint according to the research draft doc.
The endpoint processing the transaction object and making the following checks to return is the bridging required for the transaction:
Checking the native token balance of the address and compare it to the transaction value. If the native token value >= transaction amount, then return false for the bridging.
Checking the transaction data by decoding it to the ERC20 contract ABI and check is the function call is transfer. If it's not, return false for the bridging.
Checking the address balances for each of the supported bridging assets and if the balance is more or equal then transaction value returns true for the bridging.
Returning false if no bridging assets was found.
What's not included:
Partners ABIs are out of scope in this PR and should be a follow-up.
Description
This PR implements the chain agnostic bridging check endpoint according to the research draft doc.
The endpoint processing the transaction object and making the following checks to return is the bridging required for the transaction:
false
for the bridging.data
by decoding it to the ERC20 contract ABI and check is the function call istransfer
. If it's not, returnfalse
for the bridging.true
for the bridging.false
if no bridging assets was found.What's not included:
How Has This Been Tested?
Due Diligence