omni/poa-bridge

Get the message length from the bridge contract

akolotov opened this issue · 0 comments

Currently the length of message to withdrawal is hard coded:

https://github.com/poanetwork/poa-bridge-contracts/blob/93969cd934190649d42691f054676d0d16a9777e/contracts/libraries/Message.sol#L65

and it is also hard coded in the bridge code:

https://github.com/poanetwork/poa-bridge/blob/cdb79b9ba72bc7094ab7e03b133d4e03a1b5d48a/bridge/src/message_to_mainnet.rs#L19

So, it is necessary to change the length in both places if format of the message is being changed.

As soon as the issue omni/tokenbridge-contracts#39 is addressed in the bridge contract, it is necessary to change the bridge code as so the bridge calls the new method during startup sequence and gets actual value for the message. It will reduce amount of work when new bridge contracts are being introduced.