You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have two ways to withdraw Eth from Near: call the withdraw function at aurora-engine(it redirect the function call to the engine-withdraw function in aurora-eth-connector), or call the withdraw function directly at aurora-eth-connector. I am not sure who will be the WithdrawResult producer in the first case, but in the second case it is aurora-eth-connector. I guess in the first case it is aurora-eth-connector as well, not the aurora-engine. https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L504
In that case, we broke the backward compatibility because some contracts (for example EthCustodian) can expect that the WithdrawResult is produced by aurora-engine.
The text was updated successfully, but these errors were encountered:
In Engine, we have precompiles: ExitToEthereum, ExitToNear. It's about withdraw producers.
And for Engine we have special method in aurora-eth-connector - engine_withdraw. In the future Engine precompiles will call directly aurora-eth-connector.
@mrLSD The problem is that on eth side we have just one field to store the near-side account , it is used for both withdraw and deposit actions.
The nearProofProducerAccount will be changed from aurora to a new account eg. eth-connector.aurora, so, in this case, the method depositToEVM produces a message eth-connector.aurora:ETH_ADDRESShere.
For backward compatibility, it is better to handle this case by adding a check on the eth connector near-side:
correct_receiver_id = if receiver_id == current_account_id() {
return parent of current_account_id() or EVM account id from storage (`aurora`), or hardcoded `aurora`.
}
For finalizing withdrawing Eth on Ethereum side in EthCustodian contract we check the proof producer of the WithdrawResult: https://github.com/aurora-is-near/eth-connector/blob/master/eth-custodian/contracts/ProofKeeper.sol#L74
According to that line, where we create the address for depositing Eth to Aurora, the
nearProofProducerAccount
is expected to benearSDK
~aurora-engine
(aurora
and etc): https://github.com/aurora-is-near/eth-connector/blob/master/eth-custodian/contracts/EthCustodian.sol#L68We have two ways to withdraw Eth from Near: call the withdraw function at aurora-engine(it redirect the function call to the engine-withdraw function in aurora-eth-connector), or call the withdraw function directly at aurora-eth-connector. I am not sure who will be the WithdrawResult producer in the first case, but in the second case it is
aurora-eth-connector
. I guess in the first case it isaurora-eth-connector
as well, not theaurora-engine
. https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L504In that case, we broke the backward compatibility because some contracts (for example EthCustodian) can expect that the
WithdrawResult
is produced byaurora-engine
.The text was updated successfully, but these errors were encountered: