ava-labs / teleporter-token-bridge

Token bridging cross-chain built on top of Teleporter
Other
10 stars 5 forks source link

M-02: Passing origin sender to sendAndCall #101

Closed minghinmatthewlam closed 1 month ago

minghinmatthewlam commented 1 month ago

Why this should be merged

Fixes #99

How this works

Adds (sourceBlockchainID, originSenderAddress) information to the send and call receiveTokens interfaces for both erc20 and native tokens.

SingleHopCallMessage needs both blockchain ID and originSenderAddress information saved. MultihopCallMessage only needs originSenderAddress, because in a multi-hop the intermediate chain gets the blockchain ID from Teleporter.

Instead of emitting TokensSent on a multi-hop intermediate chain case, which was previously emitting the relayer address as the sender, changed the event to TokensRouted and removed the sender address.

How this was tested

CI

How is this documented

Comments

openzeppelin-code[bot] commented 1 month ago

M-02: Passing origin sender to sendAndCall

Generated at commit: 7c6ca625740ca3ebd805cfea578c5b2ad4d2b22a

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
0
0
2
13
16
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector