Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manual bridging guide to include withdrawal flow #103

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

ermyas
Copy link
Collaborator

@ermyas ermyas commented Jul 5, 2024

The current guide for manual bridging does not include documentation about withdrawal processes. This PR aims to address this gap.

@platform-sa
Copy link

platform-sa commented Jul 5, 2024

📃CI Report

Compiling 156 files with Solc 0.8.19
Solc 0.8.19 finished in 15.05s
Compiler run successful with warnings:
Warning (9302): Return value of low-level calls not used.
|
361 | user.call{value: amount}("");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (9302): Return value of low-level calls not used.
|
174 | user.call{value: amount}("");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Analysing contracts...
Running tests...

[PASS] testUnWithdrawalQueueActivated() (gas: 7925)
[PASS] testUninitFlowRateBuckets() (gas: 18193)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 666.82µs (300.39µs CPU time)

[PASS] testInitWithdrawalQueue() (gas: 36361)
[PASS] testSetWithdrawalDelay() (gas: 38256)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 728.37µs (457.52µs CPU time)

[PASS] test_grantRoles() (gas: 115752)
[PASS] test_revokeRoles() (gas: 102142)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 7.65ms (1.77ms CPU time)

[PASS] test_RevertsIf_WithdrawWIMXCalledWithInsufficientAllowance() (gas: 61325)
[PASS] test_RevertsIf_WithdrawWIMXCalledWithInsufficientFund() (gas: 60459)
[PASS] test_RevertsIf_WithdrawWIMXCalledWithZeroAmount() (gas: 25211)
[PASS] test_RevertsIf_WithdrawWIMXWhenPaused() (gas: 53463)
[PASS] test_RevertsIf_withdrawWIMXCalledWithZeroFee() (gas: 18421)
[PASS] test_WithdrawWIMXResumesFunctionalityAfterUnpausing() (gas: 137348)
[PASS] test_WithdrawWIMX_CallsBridgeAdaptor() (gas: 95626)
[PASS] test_WithdrawWIMX_EmitsWrappedIMXWithdrawEvent() (gas: 93489)
[PASS] test_WithdrawWIMX_PaysFee() (gas: 89306)
[PASS] test_WithdrawWIMX_ReducesBalance() (gas: 91950)
Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 13.14ms (9.41ms CPU time)

[PASS] testAlreadyProcessed() (gas: 109910)
[PASS] testEnqueueProcessMultiple() (gas: 510305)
[PASS] testEnqueueTwoWithdrawals() (gas: 239594)
[PASS] testEnqueueWithdrawal() (gas: 130210)
[PASS] testEnqueueZeroToken() (gas: 11431)
[PASS] testFindPendingWithdrawals() (gas: 568822)
[PASS] testGetPendingWithdrawals() (gas: 263776)
[PASS] testProcessOneEntry() (gas: 109238)
[PASS] testProcessOutOfOrder() (gas: 281784)
[PASS] testProcessOutside() (gas: 131558)
[PASS] testProcessTooEarly() (gas: 135037)
[PASS] testProcessTwoEntries() (gas: 195511)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 20.48ms (19.92ms CPU time)

[PASS] testEmptyFindPendingWithdrawals() (gas: 26476)
[PASS] testEmptyGetPendingWithdrawals1() (gas: 10018)
[PASS] testEmptyGetPendingWithdrawals2() (gas: 13686)
[PASS] testEmptyPendingWithdrawalsLength() (gas: 8544)
[PASS] testEmptyProcessWithdrawal() (gas: 13869)
[PASS] testUninitWithdrawalQueue() (gas: 7988)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 1.93ms (1.61ms CPU time)

[PASS] test_grantRoles() (gas: 116081)
[PASS] test_pause() (gas: 132670)
[PASS] test_pause_reverts() (gas: 246974)
[PASS] test_revokeRoles() (gas: 102352)
[PASS] test_unpause() (gas: 116406)
[PASS] test_unpause_reverts() (gas: 247149)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 18.73ms (17.55ms CPU time)

[FAIL. Reason: setup failed: Could not instantiate forked environment with fork url: http://127.0.0.1:8500] setUp() (gas: 0)
Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 2.16ms (0.00ns CPU time)

[PASS] test_RevertsIf_WithdrawWIMXToCalledWithInsufficientAllowance() (gas: 61742)
[PASS] test_RevertsIf_WithdrawWIMXToCalledWithInsufficientFund() (gas: 60898)
[PASS] test_RevertsIf_WithdrawWIMXToCalledWithZeroAmount() (gas: 25650)
[PASS] test_RevertsIf_WithdrawWIMXToCalledWithZeroFee() (gas: 18792)
[PASS] test_RevertsIf_WithdrawWIMXToCalledWithZeroReceiver() (gas: 25408)
[PASS] test_RevertsIf_WithdrawWIMXToWhenPaused() (gas: 53765)
[PASS] test_WithdrawWIMXToResumesFunctionalityAfterUnpausing() (gas: 137976)
[PASS] test_WithdrawWIMXToWithDifferentAccount_CallsBridgeAdaptor() (gas: 95933)
[PASS] test_WithdrawWIMXToWithDifferentAccount_EmitsWrappedIMXWithdrawEvent() (gas: 93748)
[PASS] test_WithdrawWIMXTo_CallsBridgeAdaptor() (gas: 95887)
[PASS] test_WithdrawWIMXTo_EmitsWrappedIMXWithdrawEvent() (gas: 93753)
[PASS] test_WithdrawWIMXTo_PaysFee() (gas: 89570)
[PASS] test_WithdrawWIMXTo_ReducesBalance() (gas: 92248)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 15.30ms (11.77ms CPU time)

[PASS] testActivateWithdrawalQueue() (gas: 30078)
[PASS] testDeactivateWithdrawalQueue() (gas: 21512)
[PASS] testSetFlowRateThreshold() (gas: 85109)
[PASS] testSetFlowRateThresholdBadCapacity() (gas: 14315)
[PASS] testSetFlowRateThresholdBadFillRate() (gas: 14339)
[PASS] testSetFlowRateThresholdBadToken() (gas: 14149)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 1.16ms (899.12µs CPU time)

[PASS] test_ChildTokenMap() (gas: 401572)
[PASS] test_RevertIf_EmptyData() (gas: 50896)
[PASS] test_RevertIf_InvalidSourceChain() (gas: 33056)
[PASS] test_RevertIf_MapTwice() (gas: 405730)
[PASS] test_RevertIf_depositWithEmptyContract() (gas: 63443)
[PASS] test_RevertIf_depositWithReceiverZeroAddress() (gas: 58320)
[PASS] test_RevertIf_depositWithRootTokenNotMapped() (gas: 61501)
[PASS] test_RevertIf_depositWithRootTokenZeroAddress() (gas: 58385)
[PASS] test_RevertIf_payloadDataNotValid() (gas: 52645)
[PASS] test_RevertIf_rootTokenAddressIsZero() (gas: 59506)
[PASS] test_deposit_EmitsChildChainERC20Deposit() (gas: 448066)
[PASS] test_deposit_EmitsIMXDeposit() (gas: 99361)
[PASS] test_deposit_EmitsNativeDeposit() (gas: 126033)
[PASS] test_deposit_IncreasesTotalSupply() (gas: 447263)
[PASS] test_deposit_TransfersTokenToReceiver() (gas: 448437)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 30.45ms (25.64ms CPU time)

[PASS] testFuzz_RateLimit(address,uint256,uint256) (runs: 256, μ: 118944, ~: 118944)
[PASS] testFuzz_SetFlowRateThreshold(address,uint256,uint256) (runs: 256, μ: 78119, ~: 78119)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 497.50ms (497.29ms CPU time)

[PASS] testUpdateFlowRateBucketAfterEmpty() (gas: 81196)
[PASS] testUpdateFlowRateBucketEmpty() (gas: 71453)
[PASS] testUpdateFlowRateBucketJustEmpty() (gas: 71286)
[PASS] testUpdateFlowRateBucketMultiple() (gas: 66753)
[PASS] testUpdateFlowRateBucketOverflow() (gas: 56641)
[PASS] testUpdateFlowRateBucketSingle() (gas: 55501)
[PASS] testUpdateFlowRateBucketUnconfigured() (gas: 15938)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 3.95ms (3.54ms CPU time)

[PASS] test_WithdrawWIMX_CallsAxelarGateway() (gas: 132226)
[PASS] test_WithdrawWIMX_CallsBridgeAdaptor() (gas: 124808)
[PASS] test_WithdrawWIMX_CallsGasService() (gas: 132600)
[PASS] test_WithdrawWIMX_EmitsAxelarMessageSentEvent() (gas: 130612)
[PASS] test_WithdrawWIMX_ReducesBalance() (gas: 123603)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 20.97ms (12.92ms CPU time)

[PASS] test_WithdrawWIMXToWithDifferentAccount_CallsAxelarGateway() (gas: 132535)
[PASS] test_WithdrawWIMXToWithDifferentAccount_CallsBridgeAdaptor() (gas: 125063)
[PASS] test_WithdrawWIMXToWithDifferentAccount_CallsGasService() (gas: 132944)
[PASS] test_WithdrawWIMXToWithDifferentAccount_EmitsAxelarMessageSentEvent() (gas: 130941)
[PASS] test_WithdrawWIMXTo_CallsAxelarGateway() (gas: 132605)
[PASS] test_WithdrawWIMXTo_CallsBridgeAdaptor() (gas: 125116)
[PASS] test_WithdrawWIMXTo_CallsGasService() (gas: 132962)
[PASS] test_WithdrawWIMXTo_EmitsAxelarMessageSentEvent() (gas: 130977)
[PASS] test_WithdrawWIMXTo_ReducesBalance() (gas: 123919)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 31.47ms (23.51ms CPU time)

[PASS] testFuzz_Execute(bytes32,bytes) (runs: 256, μ: 53093, ~: 52676)
[PASS] testFuzz_SendMessage(uint256,bytes,address) (runs: 256, μ: 83022, ~: 82879)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 637.78ms (636.12ms CPU time)

[PASS] testFuzz_Execute(bytes32,bytes) (runs: 256, μ: 53049, ~: 52632)
[PASS] testFuzz_SendMessage(uint256,bytes,address) (runs: 256, μ: 83108, ~: 82965)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 634.06ms (632.40ms CPU time)

[PASS] test_RevertsIf_MessageWithEmptyData() (gas: 45591)
[PASS] test_RevertsIf_MessageWithInvalidSignature() (gas: 51542)
[PASS] test_RevertsIf_WithdrawWithInvalidSourceAddress() (gas: 43899)
[PASS] test_RevertsIf_WithdrawWithInvalidSourceChain() (gas: 31866)
[PASS] test_withdrawETH_EmitsRootChainETHWithdrawEvent() (gas: 106293)
[PASS] test_withdrawETH_EmitsRootChainETHWithdrawEvent_DifferentReceiver() (gas: 133730)
[PASS] test_withdrawETH_TransfersETH() (gas: 100535)
[PASS] test_withdrawETH_TransfersETH_DifferentReceiver() (gas: 128225)
[PASS] test_withdrawIMX_EmitsRootChainERC20WithdrawEvent() (gas: 115944)
[PASS] test_withdrawIMX_EmitsRootChainERC20WithdrawEvent_DifferentReceiver() (gas: 133082)
[PASS] test_withdrawIMX_TransfersIMX() (gas: 120069)
[PASS] test_withdrawIMX_TransfersIMX_DifferentReceiver() (gas: 137163)
[PASS] test_withdraw_EmitsRootChainERC20WithdrawEvent() (gas: 122450)
[PASS] test_withdraw_EmitsRootChainERC20WithdrawEvent_DifferentReceiver() (gas: 139584)
[PASS] test_withdraw_TransfersTokens() (gas: 122470)
[PASS] test_withdraw_TransfersTokens_DifferentReceiver() (gas: 139587)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 54.98ms (42.19ms CPU time)

[PASS] test_RevertsIf_OnMessageReceiveWithInvalidSignature() (gas: 21321)
[PASS] test_RevertsIf_OnMessageReceiveWithUnmappedToken() (gas: 23821)
[PASS] test_RevertsIf_OnMessageReceiveWithZeroDataLength() (gas: 17576)
[PASS] test_RevertsIf_WithdrawWithInvalidSender() (gas: 17092)
[PASS] test_onMessageReceive_EmitsRootChainERC20WithdrawEvent() (gas: 138796)
[PASS] test_onMessageReceive_EmitsRootChainERC20WithdrawEventForIMX() (gas: 72303)
[PASS] test_onMessageReceive_EmitsRootChainERC20WithdrawEventForIMX_DifferentReceiver() (gas: 89351)
[PASS] test_onMessageReceive_EmitsRootChainERC20WithdrawEvent_DifferentReceiver() (gas: 155931)
[PASS] test_onMessageReceive_EmitsRootChainETHWithdrawEventForETH() (gas: 36199)
[PASS] test_onMessageReceive_EmitsRootChainETHWithdrawEventForETH_DifferentReceiver() (gas: 63638)
[PASS] test_onMessageReceive_TransfersETH() (gas: 32880)
[PASS] test_onMessageReceive_TransfersETH_DifferentReceiver() (gas: 60614)
[PASS] test_onMessageReceive_TransfersIMXTokens() (gas: 76778)
[PASS] test_onMessageReceive_TransfersIMXTokens_DifferentReceiver() (gas: 93915)
[PASS] test_onMessageReceive_TransfersTokens() (gas: 141314)
[PASS] test_onMessageReceive_TransfersTokens_DifferentReceiver() (gas: 158452)
Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 32.11ms (20.85ms CPU time)

[PASS] testFuzz_sendMessage_PaysGasToGasService(uint256) (runs: 256, μ: 63853, ~: 63853)
[PASS] test_Execute_CallsBridge() (gas: 47270)
[PASS] test_Execute_EmitsAdaptorExecuteEvent() (gas: 48883)
[PASS] test_Initialize() (gas: 65432)
[PASS] test_RevertIf_InitializeGivenAnEmptyBridgeAdaptorString() (gas: 3050705)
[PASS] test_RevertIf_InitializeGivenEmptyRootChain() (gas: 3057091)
[PASS] test_RevertIf_InitializeGivenZeroAddress() (gas: 3055067)
[PASS] test_RevertIf_InitializeGivenZeroGasService() (gas: 3055136)
[PASS] test_RevertIf_InitializeWithUnauthorizedInitializer() (gas: 3057687)
[PASS] test_RevertIf_InitializeWithZeroAdmin() (gas: 3055598)
[PASS] test_RevertIf_InitializeWithZeroBridgeManager() (gas: 3055586)
[PASS] test_RevertIf_InitializeWithZeroGasServiceManager() (gas: 3055640)
[PASS] test_RevertIf_InitializeWithZeroTargetManager() (gas: 3055671)
[PASS] test_RevertIf_ZeroInitializerIsGiven() (gas: 41993)
[PASS] test_RevertIf_executeCalledWithInvalidSourceAddress() (gas: 26992)
[PASS] test_RevertIf_executeCalledWithInvalidSourceChain() (gas: 26085)
[PASS] test_RevertIf_executeWithTokenCalled() (gas: 25127)
[PASS] test_RevertIf_sendMessageCalledByNonRootBridge() (gas: 57075)
[PASS] test_RevertIf_sendMessageCalledWithNoValue() (gas: 15670)
[PASS] test_RevertIf_updateChildBridgeCalledByNonBridgeManager() (gas: 85585)
[PASS] test_RevertIf_updateChildBridgeCalledWithZeroAddress() (gas: 14585)
[PASS] test_RevertIf_updateGasServiceCalledByNonGasServiceManager() (gas: 85487)
[PASS] test_RevertIf_updateGasServiceCalledWithZeroAddress() (gas: 14519)
[PASS] test_RevertIf_updateRootBridgeAdaptorCalledByNotTargetManager() (gas: 86542)
[PASS] test_RevertIf_updateRootBridgeAdaptorCalledWithEmptyString() (gas: 14677)
[PASS] test_RevertIf_updateRootChainCalledByNonTargetManager() (gas: 85967)
[PASS] test_RevertIf_updateRootChainCalledWithEmptyRootChain() (gas: 14974)
[PASS] test_sendMessage_CallsGasService() (gas: 69021)
[PASS] test_sendMessage_CallsGateway() (gas: 68374)
[PASS] test_sendMessage_EmitsAxelarMessageSentEvent() (gas: 66211)
[PASS] test_sendMessage_GivesCorrectRefundRecipient() (gas: 69066)
[PASS] test_updateChildBridge_EmitsChildBridgeUpdatedEvent() (gas: 25581)
[PASS] test_updateChildBridge_UpdatesChildBridge() (gas: 22353)
[PASS] test_updateGasService_EmitsGasServiceUpdatedEvent() (gas: 25583)
[PASS] test_updateGasService_UpdatesGasService() (gas: 22396)
[PASS] test_updateRootBridgeAdaptor_EmitsEvent() (gas: 33905)
[PASS] test_updateRootBridgeAdaptor_UpdatesRootBridgeAdaptor() (gas: 41306)
[PASS] test_updateRootChain_EmitsRootChainUpdatedEvent() (gas: 26526)
[PASS] test_updateRootChain_UpdatesRootChain() (gas: 26780)
Suite result: ok. 39 passed; 0 failed; 0 skipped; finished in 313.43ms (310.22ms CPU time)

[PASS] testFuzz_Burn(address,uint256,uint256) (runs: 256, μ: 77295, ~: 77295)
[PASS] testFuzz_Mint(address,uint256) (runs: 256, μ: 68453, ~: 68609)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 426.79ms (426.01ms CPU time)

[PASS] test_RevertIf_WithdrawWithNoGas() (gas: 22956)
[PASS] test_withdraw_BurnsFundsAndTransfersGas() (gas: 115336)
[PASS] test_withdraw_CallsBridgeAdaptor() (gas: 117035)
[PASS] test_withdraw_Calls_AxelarGateway() (gas: 126375)
[PASS] test_withdraw_Calls_GasService() (gas: 126841)
[PASS] test_withdraw_emits_AxelarMessageSentEvent() (gas: 124381)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 22.16ms (14.46ms CPU time)

[PASS] test_WithdrawETH_CallsAxelarGateway() (gas: 114075)
[PASS] test_WithdrawETH_CallsBridgeAdaptor() (gas: 104712)
[PASS] test_WithdrawETH_CallsGasService() (gas: 114541)
[PASS] test_WithdrawETH_EmitsAxelarMessageSentEvent() (gas: 112056)
[PASS] test_WithdrawETH_ReducesBalance() (gas: 105653)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 20.08ms (12.34ms CPU time)

[PASS] test_WithdrawETHToWithDifferentAccount_CallsAxelarGateway() (gas: 114550)
[PASS] test_WithdrawETHToWithDifferentAccount_CallsBridgeAdaptor() (gas: 105211)
[PASS] test_WithdrawETHToWithDifferentAccount_EmitsAxelarMessageSentEvent() (gas: 112513)
[PASS] test_WithdrawETHTo_CallsAxelarGateway() (gas: 114470)
[PASS] test_WithdrawETHTo_CallsBridgeAdaptor() (gas: 105196)
[PASS] test_WithdrawETHTo_EmitsAxelarMessageSentEvent() (gas: 112455)
[PASS] test_WithdrawETHTo_ReducesBalance() (gas: 106136)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 26.43ms (18.68ms CPU time)

[PASS] test_WithdrawIMX_CallsAxelarGateway() (gas: 90568)
[PASS] test_WithdrawIMX_CallsBridgeAdaptor() (gas: 81228)
[PASS] test_WithdrawIMX_CallsGasService() (gas: 90992)
[PASS] test_WithdrawIMX_EmitsAxelarMessageSentEvent() (gas: 88528)
[PASS] test_WithdrawIMX_ReducesBalance() (gas: 76374)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 17.83ms (10.18ms CPU time)

[PASS] test_RevertIf_WithdrawToCalledWithNoGas() (gas: 25486)
[PASS] test_withdrawTo_BurnsFundsAndTransfersGas() (gas: 117908)
[PASS] test_withdrawTo_CallsAxelarGateway() (gas: 129039)
[PASS] test_withdrawTo_CallsBridgeAdaptor() (gas: 119678)
[PASS] test_withdrawTo_CallsGasService() (gas: 129528)
[PASS] test_withdrawTo_EmitsAxelarMessageSentEvent() (gas: 127004)
Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 21.91ms (14.33ms CPU time)

[PASS] test_withdrawIMXToWithDifferentAccount_CallsAxelarGateway() (gas: 91020)
[PASS] test_withdrawIMXToWithDifferentAccount_CallsBridgeAdaptor() (gas: 81613)
[PASS] test_withdrawIMXToWithDifferentAccount_CallsGasService() (gas: 91399)
[PASS] test_withdrawIMXToWithDifferentAccount_EmitsAxelarMessageSentEvent() (gas: 88961)
[PASS] test_withdrawIMXTo_CallsAxelarGateway() (gas: 90918)
[PASS] test_withdrawIMXTo_CallsBridgeAdaptor() (gas: 81622)
[PASS] test_withdrawIMXTo_CallsGasService() (gas: 91451)
[PASS] test_withdrawIMXTo_EmitsAxelarMessageSentEvent() (gas: 88969)
[PASS] test_withdrawIMXTo_ReducesBalance() (gas: 76725)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 27.11ms (19.47ms CPU time)

[PASS] test_RevertsIf_WithdrawCalledWithAChildTokenThatHasWrongBridge() (gas: 40679)
[PASS] test_RevertsIf_WithdrawCalledWithAChildTokenWithUnsetRootToken() (gas: 34090)
[PASS] test_RevertsIf_WithdrawCalledWithEmptyChildToken() (gas: 30795)
[PASS] test_RevertsIf_WithdrawCalledWithUnmappedToken() (gas: 2965213)
[PASS] test_RevertsIf_WithdrawCalledWithZeroFee() (gas: 16942)
[PASS] test_RevertsIf_WithdrawWhenBurnFails() (gas: 179424)
[PASS] test_RevertsIf_WithdrawWhenPaused() (gas: 54028)
[PASS] test_WithdrawResumesFunctionalityAfterUnpausing() (gas: 111598)
[PASS] test_withdraw_CallsBridgeAdaptor() (gas: 80669)
[PASS] test_withdraw_EmitsERC20WithdrawEvent() (gas: 78543)
[PASS] test_withdraw_PaysFee() (gas: 73457)
[PASS] test_withdraw_ReducesBalance() (gas: 74451)
[PASS] test_withdraw_ReducesTotalSupply() (gas: 73297)
Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 27.54ms (22.60ms CPU time)

[PASS] test_RevertsIf_WithdrawETHCalledWithZeroFee() (gas: 18397)
[PASS] test_RevertsIf_WithdrawETHWhenPaused() (gas: 53374)
[PASS] test_RevertsIf_WithdrawEthCalledWithInsufficientFund() (gas: 38905)
[PASS] test_RevertsIf_ZeroAmountIsProvided() (gas: 25185)
[PASS] test_WithdrawETHResumesFunctionalityAfterUnpausing() (gas: 97373)
[PASS] test_WithdrawETH_CallsBridgeAdaptor() (gas: 68234)
[PASS] test_WithdrawETH_EmitsChildChainEthWithdrawEvent() (gas: 65115)
[PASS] test_WithdrawETH_PaysFee() (gas: 60314)
[PASS] test_WithdrawETH_ReducesBalance() (gas: 66087)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 11.32ms (8.19ms CPU time)

[PASS] test_RevertsIf_WithdrawETHToCalledWithZeroFee() (gas: 18859)
[PASS] test_RevertsIf_WithdrawETHToWhenPaused() (gas: 53876)
[PASS] test_RevertsIf_WithdrawEthToCalledWithInsufficientFund() (gas: 39323)
[PASS] test_RevertsIf_ZeroAmountIsProvided() (gas: 25647)
[PASS] test_WithdrawETHToResumesFunctionalityAfterUnpausing() (gas: 101451)
[PASS] test_WithdrawETHToWithDifferentAccount_CallsBridgeAdaptor() (gas: 68689)
[PASS] test_WithdrawETHToWithDifferentAccount_EmitsChildChainEthWithdrawEvent() (gas: 65682)
[PASS] test_WithdrawETHTo_CallsBridgeAdaptor() (gas: 68718)
[PASS] test_WithdrawETHTo_EmitsChildChainEthWithdrawEvent() (gas: 65578)
[PASS] test_WithdrawETHTo_PaysFee() (gas: 60844)
[PASS] test_WithdrawETHTo_ReducesBalance() (gas: 66635)
Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 21.78ms (16.55ms CPU time)

[PASS] test_RevertIf_WithdrawIMXCalledWithZeroFee() (gas: 16262)
[PASS] test_RevertIf_WithdrawIMXWhenPaused() (gas: 51260)
[PASS] test_RevertIf_ZeroAmountIsProvided() (gas: 23096)
[PASS] test_RevertsIf_WithdrawIMXCalledWithInsufficientFund() (gas: 23282)
[PASS] test_WithdrawIMXResumesFunctionalityAfterUnpausing() (gas: 74910)
[PASS] test_WithdrawIMX_CallsBridgeAdaptor() (gas: 44684)
[PASS] test_WithdrawIMX_EmitsNativeIMXWithdrawEvent() (gas: 42012)
[PASS] test_WithdrawIMX_PaysFee() (gas: 39331)
[PASS] test_WithdrawIMX_ReducesBalance() (gas: 37017)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 8.71ms (5.54ms CPU time)

[PASS] test_RevertIf_withdrawIMXToZeroAmountIsProvided() (gas: 23557)
[PASS] test_RevertsIf_WithdrawIMXToWhenPaused() (gas: 51762)
[PASS] test_RevertsIf_withdrawIMXToCalledWithInsufficientFund() (gas: 23742)
[PASS] test_RevertsIf_withdrawIMXToCalledWithZeroFee() (gas: 16722)
[PASS] test_RevertsIf_withdrawIMXToCalledWithZeroReceiver() (gas: 23361)
[PASS] test_WithdrawIMXToResumesFunctionalityAfterUnpausing() (gas: 75674)
[PASS] test_WithdrawIMXTo_PaysFee() (gas: 39751)
[PASS] test_WithdrawIMXTo_ReducesBalance() (gas: 37481)
[PASS] test_withdrawIMXToWithDifferentAccount_CallsBridgeAdaptor() (gas: 45157)
[PASS] test_withdrawIMXToWithDifferentAccount_EmitsNativeIMXWithdrawEvent() (gas: 42492)
[PASS] test_withdrawIMXTo_CallsBridgeAdaptor() (gas: 45188)
[PASS] test_withdrawIMXTo_EmitsNativeIMXWithdrawEvent() (gas: 42431)
Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 11.02ms (7.80ms CPU time)

[PASS] test_RevertsIf_WithdrawToCalledWithAChildTokenThatHasWrongBridge() (gas: 41136)
[PASS] test_RevertsIf_WithdrawToCalledWithAChildTokenWithUnsetRootToken() (gas: 34479)
[PASS] test_RevertsIf_WithdrawToCalledWithEmptyChildToken() (gas: 31121)
[PASS] test_RevertsIf_WithdrawToCalledWithUnmappedToken() (gas: 2965580)
[PASS] test_RevertsIf_WithdrawToCalledWithZeroFee() (gas: 17356)
[PASS] test_RevertsIf_WithdrawToCalledWithZeroReceiver() (gas: 23951)
[PASS] test_RevertsIf_WithdrawToWhenBurnFails() (gas: 179744)
[PASS] test_RevertsIf_WithdrawToWhenPaused() (gas: 54484)
[PASS] test_WithdrawToResumesFunctionalityAfterUnpausing() (gas: 112312)
[PASS] test_withdrawTo_CallsBridgeAdaptor() (gas: 81126)
[PASS] test_withdrawTo_EmitsERC20WithdrawEvent() (gas: 78914)
[PASS] test_withdrawTo_PaysFee() (gas: 73777)
[PASS] test_withdrawTo_ReducesBalance() (gas: 74837)
[PASS] test_withdrawTo_ReducesTotalSupply() (gas: 73706)
[PASS] test_withdrawTo_ToDifferentReceiverCallsMockAdaptor() (gas: 81073)
Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 30.65ms (25.71ms CPU time)

[FAIL. Reason: environment variable "DEPLOYMENTS" not found] setUp() (gas: 0)
Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 949.58µs (0.00ns CPU time)

[PASS] test_depositETHCallsAxelarServices() (gas: 119662)
[PASS] test_depositETHEmitsEvents() (gas: 112619)
[PASS] test_depositETHTransfersValue() (gas: 92077)
[PASS] test_depositIMXTokenCallsAxelarServices() (gas: 175696)
[PASS] test_depositIMXTokenEmitsEvents() (gas: 167077)
[PASS] test_depositIMXTokenTransfersValue() (gas: 154332)
[PASS] test_depositToCallsAxelarServices() (gas: 255934)
[PASS] test_depositToEmitsEvents() (gas: 247823)
[PASS] test_depositToTransfersValue() (gas: 232681)
[PASS] test_depositTokenCallsAxelarServices() (gas: 255592)
[PASS] test_depositTokenEmitsEvents() (gas: 247393)
[PASS] test_depositTokenTransfersValue() (gas: 232250)
[PASS] test_depositWETHCallsAxelarServices() (gas: 175603)
[PASS] test_depositWETHEmitsEvents() (gas: 169966)
[PASS] test_depositWETHTransfersValue() (gas: 156032)
[PASS] test_mapTokenCallsAxelarServices() (gas: 173698)
[PASS] test_mapTokenEmitsEvents() (gas: 151300)
[PASS] test_mapTokenTransfersValue() (gas: 122396)
Suite result: ok. 18 passed; 0 failed; 0 skipped; finished in 68.39ms (56.40ms CPU time)

[PASS] testActivateWithdrawalQueue() (gas: 37812)
[PASS] testActivateWithdrawalQueueBadAuth() (gas: 86771)
[PASS] testDeactivateWithdrawalQueue() (gas: 29028)
[PASS] testDeactivateWithdrawalQueueBadAuth() (gas: 116400)
[PASS] testFinaliseQueuedWithdrawalAggregatedWhenPaused() (gas: 465356)
[PASS] testFinaliseQueuedWithdrawalAlreadyProcessed() (gas: 495472)
[PASS] testFinaliseQueuedWithdrawalERC20() (gas: 487360)
[PASS] testFinaliseQueuedWithdrawalERC20TooEarly() (gas: 515049)
[PASS] testFinaliseQueuedWithdrawalEther() (gas: 389293)
[PASS] testFinaliseQueuedWithdrawalOutOfBounds() (gas: 511490)
[PASS] testFinaliseQueuedWithdrawalReentrancy() (gas: 3480579)
[PASS] testFinaliseQueuedWithdrawalWhenPaused() (gas: 463528)
[PASS] testFinaliseQueuedWithdrawalsAggregatedAlreadyProcessed() (gas: 1159792)
[PASS] testFinaliseQueuedWithdrawalsAggregatedERC20() (gas: 1325789)
[PASS] testFinaliseQueuedWithdrawalsAggregatedEther() (gas: 1246628)
[PASS] testFinaliseQueuedWithdrawalsAggregatedMismatch() (gas: 1497137)
[PASS] testFinaliseQueuedWithdrawalsAggregatedNoIndices() (gas: 1507877)
[PASS] testFinaliseQueuedWithdrawalsAggregatedOutOfBounds() (gas: 1159211)
[PASS] testFinaliseQueuedWithdrawalsAggregatedReentrancy() (gas: 3486406)
[PASS] testFinaliseQueuedWithdrawalsAggregatedTooEarly() (gas: 1411588)
[PASS] testGrantRole() (gas: 45314)
[PASS] testGrantRoleBadAuth() (gas: 89902)
[PASS] testHighFlowRate() (gas: 749726)
[PASS] testPause() (gas: 38049)
[PASS] testPauseBadAuth() (gas: 86772)
[PASS] testSetRateControlThreshold() (gas: 121189)
[PASS] testSetRateControlThresholdBadAuth() (gas: 90188)
[PASS] testSetWithdrawalDelay() (gas: 21378)
[PASS] testSetWithdrawalDelayBadAuth() (gas: 87175)
[PASS] testUnpause() (gas: 32343)
[PASS] testUnpauseBadAuth() (gas: 120822)
[PASS] testWithdrawalLargeWithdrawal() (gas: 492677)
[PASS] testWithdrawalUnconfiguredToken() (gas: 277279)
[PASS] testWithdrawalWhenPaused() (gas: 350747)
[PASS] test_InitializeBridgeFlowRate() (gas: 27867)
[PASS] test_RevertIfInitializedTwice() (gas: 25102)
[PASS] test_RevertIfRootBridgeInitializedDirectly() (gas: 17520)
[PASS] test_RevertIf_InitializeWithAZeroAddressRateAdmin() (gas: 6505078)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 141.47ms (128.49ms CPU time)

[PASS] test_Initialize() (gas: 52462)
[PASS] test_NativeTransferFromWIMX() (gas: 51173)
[PASS] test_NativeTransferResumesFunctionalityAfterUnpausing() (gas: 79861)
[PASS] test_OnMessageReceiveResumesFunctionalityAfterUnpausing() (gas: 107508)
[PASS] test_RevertIfInitializeTwice() (gas: 31320)
[PASS] test_RevertIf_InitializeWithAZeroAddressAdapter() (gas: 4397561)
[PASS] test_RevertIf_InitializeWithAZeroAddressAll() (gas: 4390721)
[PASS] test_RevertIf_InitializeWithAZeroAddressChildTemplate() (gas: 4399358)
[PASS] test_RevertIf_InitializeWithAZeroAddressDefaultAdmin() (gas: 4397708)
[PASS] test_RevertIf_InitializeWithAZeroAddressIMXToken() (gas: 4399379)
[PASS] test_RevertIf_InitializeWithAZeroAddressPauser() (gas: 4397670)
[PASS] test_RevertIf_InitializeWithAZeroAddressTreasuryManager() (gas: 4397834)
[PASS] test_RevertIf_InitializeWithAZeroAddressUnpauser() (gas: 4397703)
[PASS] test_RevertIf_InitializeWithUnauthorizedInitializer() (gas: 4399676)
[PASS] test_RevertIf_NativeTransferIsFromNonWIMX() (gas: 21188)
[PASS] test_RevertIf_NativeTransferWhenPaused() (gas: 47402)
[PASS] test_RevertIf_WithdrawReentered() (gas: 3091795)
[PASS] test_RevertIf_ZeroInitializerIsGiven() (gas: 41141)
[PASS] test_RevertIf_mapTokenCalledWithETHAddress() (gas: 21139)
[PASS] test_RevertIf_mapTokenCalledWithIMXAddress() (gas: 21124)
[PASS] test_RevertIf_onMessageReceiveCalledTwice() (gas: 367416)
[PASS] test_RevertIf_onMessageReceiveCalledWithDataInvalid() (gas: 35003)
[PASS] test_RevertIf_onMessageReceiveCalledWithDataLengthZero() (gas: 14878)
[PASS] test_RevertIf_onMessageReceiveCalledWithMsgSenderNotBridgeAdaptor() (gas: 34723)
[PASS] test_RevertIf_onMessageReceiveCalledWithZeroAddress() (gas: 36584)
[PASS] test_RevertIf_onMessageReceive_DepositIMX_InsufficientBalance() (gas: 20270)
[PASS] test_RevertIf_onMessageReceive_DepositWithEmptyContract() (gas: 21577)
[PASS] test_RevertIf_onMessageReceive_Deposit_NotMapped() (gas: 24124)
[PASS] test_RevertIf_onMessageReceive_Deposit_ReceiverZeroAddress() (gas: 19678)
[PASS] test_RevertIf_onMessageReceive_Deposit_RootZeroAddress() (gas: 17548)
[PASS] test_RevertIf_updateChildBridgeAdaptorCalledByNotAdaptorManager() (gas: 86019)
[PASS] test_RevertIf_updateChildBridgeAdaptorCalledWithZeroAddress() (gas: 11528)
[PASS] test_RevertsIf_OnMessageReceiveWhenPaused() (gas: 42088)
[PASS] test_RevertsIf_privilegedDepositCalledFromNonTreasuryManager() (gas: 91745)
[PASS] test_RevertsIf_privilegedDepositWithZeroValue() (gas: 14066)
[PASS] test_onMessageReceive_DeploysERC20() (gas: 368820)
[PASS] test_onMessageReceive_DepositETH_EmitsETHDepositEvent() (gas: 86512)
[PASS] test_onMessageReceive_DepositETH_IncreasesTotalSupply() (gas: 83296)
[PASS] test_onMessageReceive_DepositETH_TransfersTokensToReceiver() (gas: 84430)
[PASS] test_onMessageReceive_DepositIMX_BalancesChanged() (gas: 57618)
[PASS] test_onMessageReceive_DepositIMX_EmitsIMXDepositEvent() (gas: 59876)
[PASS] test_onMessageReceive_Deposit_EmitsChildChainERC20DepositEvent() (gas: 424476)
[PASS] test_onMessageReceive_Deposit_IncreasesTotalSupply() (gas: 421123)
[PASS] test_onMessageReceive_Deposit_TransfersTokensToReceiver() (gas: 426264)
[PASS] test_onMessageReceive_EmitsTokenMappedEvent() (gas: 367537)
[PASS] test_onMessageReceive_SetsTokenMapping() (gas: 364391)
[PASS] test_privilegedDepositEmitsEvent() (gas: 25631)
[PASS] test_treasuryDepostIncreasesBalance() (gas: 23453)
[PASS] test_updateChildBridgeAdaptor_UpdatesChildBridgeAdaptor() (gas: 18655)
[PASS] test_updateChildBridgeAdpator_EmitsEvent() (gas: 22085)
Suite result: ok. 50 passed; 0 failed; 0 skipped; finished in 56.24ms (51.74ms CPU time)

[PASS] test_BurnSuccess() (gas: 65365)
[PASS] test_FailInitialisationBadAddress() (gas: 2711056)
[PASS] test_FailInitialisationBadName() (gas: 2710703)
[PASS] test_FailInitialisationBadSymbol() (gas: 2710769)
[PASS] test_InitialState() (gas: 23177)
[PASS] test_MintSuccess() (gas: 60404)
[PASS] test_RevertIf_BurnTokensByNotDeployer() (gas: 12710)
[PASS] test_RevertIf_InitializeTwice() (gas: 13662)
[PASS] test_RevertIf_MintTokensByNotDeployer() (gas: 12534)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 5.54ms (4.72ms CPU time)

[PASS] test_InitialState() (gas: 17612)
[PASS] test_RevertIf_DepositWithInsufficientBalance() (gas: 22150)
[PASS] test_RevertIf_OverWithdraw() (gas: 44310)
[PASS] test_RevertIf_TransferAmountExceedingBalance() (gas: 43853)
[PASS] test_RevertIf_TransferFromWithInsufficientAllowance() (gas: 74447)
[PASS] test_RevertIf_TransferFromWithInsufficientBalance() (gas: 74165)
[PASS] test_RevertIf_TransferFromWithNoAllowance() (gas: 47657)
[PASS] test_RevertIf_TransferWithInsufficientBalance() (gas: 23971)
[PASS] test_SucceedIf_DepositWithSufficientBalance() (gas: 46207)
[PASS] test_SucceedIf_TransferAmountWithinBalance() (gas: 80858)
[PASS] test_SucceedIf_TransferFromWithinAllowanceAndBalance() (gas: 79584)
[PASS] test_SucceedIf_TransferWithSufficientBalance() (gas: 46220)
[PASS] test_SucceedIf_WithdrawWithinLimit() (gas: 55537)
[PASS] test_SupplyUpdated_OnDepositAndWithdraw() (gas: 81688)
Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 6.08ms (5.56ms CPU time)

[PASS] testFuzz_Approve(address,address,uint256) (runs: 256, μ: 39340, ~: 39807)
[PASS] testFuzz_Deposit(uint256) (runs: 256, μ: 56178, ~: 56654)
[PASS] testFuzz_Transfer(address,address,uint256,uint256) (runs: 256, μ: 80151, ~: 80493)
[PASS] testFuzz_TransferFrom(address,address,address,uint256,uint256) (runs: 256, μ: 117527, ~: 117527)
[PASS] testFuzz_Withdraw(uint256,uint256) (runs: 256, μ: 84995, ~: 85996)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 1.09s (1.09s CPU time)

[PASS] testFuzz_sendMessage_PaysGasToGasService(uint256) (runs: 256, μ: 77852, ~: 77852)
[PASS] test_Execute_CallsBridge() (gas: 47314)
[PASS] test_Execute_EmitsAdaptorExecuteEvent() (gas: 48927)
[PASS] test_Initialize() (gas: 70890)
[PASS] test_RevertIf_InitializeGivenEmptyChildAdapter() (gas: 3048525)
[PASS] test_RevertIf_InitializeGivenEmptyChildChainName() (gas: 3055019)
[PASS] test_RevertIf_InitializeGivenZeroAddress() (gas: 3055089)
[PASS] test_RevertIf_InitializeWithUnauthorizedInitializer() (gas: 3055528)
[PASS] test_RevertIf_InitializeWithZeroAdmin() (gas: 3053461)
[PASS] test_RevertIf_InitializeWithZeroBridgeManager() (gas: 3053472)
[PASS] test_RevertIf_InitializeWithZeroGasServiceManager() (gas: 3053481)
[PASS] test_RevertIf_InitializeWithZeroTargetManager() (gas: 3053556)
[PASS] test_RevertIf_ZeroInitializerIsGiven() (gas: 41994)
[PASS] test_RevertIf_executeCalledWithInvalidSourceAddress() (gas: 26948)
[PASS] test_RevertIf_executeCalledWithInvalidSourceChain() (gas: 26108)
[PASS] test_RevertIf_executeWithTokenCalled() (gas: 25104)
[PASS] test_RevertIf_mapTokenCalledByNonRootBridge() (gas: 70978)
[PASS] test_RevertIf_mapTokenCalledWithNoValue() (gas: 29617)
[PASS] test_RevertsIf_updateChildBridgeAdaptorCalledByNonTargetManager() (gas: 100442)
[PASS] test_RevertsIf_updateChildBridgeAdaptorCalledWithEmptyString() (gas: 14659)
[PASS] test_RevertsIf_updateChildChainCalledByNonTargetManager() (gas: 86011)
[PASS] test_RevertsIf_updateChildChainCalledWithEmptyString() (gas: 14681)
[PASS] test_RevertsIf_updateGasServiceCalledByNonGasServiceManager() (gas: 85398)
[PASS] test_RevertsIf_updateGasServiceCalledWithZeroAddress() (gas: 14114)
[PASS] test_RevertsIf_updateRootBridgeCalledByNonBridgeManager() (gas: 85461)
[PASS] test_RevertsIf_updateRootBridgeCalledWithZeroAddress() (gas: 14134)
[PASS] test_sendMessage_CallsGasService() (gas: 86109)
[PASS] test_sendMessage_CallsGateway() (gas: 85462)
[PASS] test_sendMessage_EmitsAxelarMessageSentEvent() (gas: 83828)
[PASS] test_sendMessage_GivesCorrectRefundRecipient() (gas: 86154)
[PASS] test_updateChildBridgeAdaptor_EmitsEvent() (gas: 50904)
[PASS] test_updateChildBridgeAdaptor_UpdatesChildBridgeAdaptor() (gas: 58449)
[PASS] test_updateChildChain_EmitsEvent() (gas: 26525)
[PASS] test_updateChildChain_UpdatesChildChain() (gas: 26780)
[PASS] test_updateGasService_EmitsEvent() (gas: 25517)
[PASS] test_updateGasService_UpdatesGasService() (gas: 22372)
[PASS] test_updateRootBridge_EmitsEvent() (gas: 25514)
[PASS] test_updateRootBridge_UpdatesRootBridge() (gas: 22349)
Suite result: ok. 38 passed; 0 failed; 0 skipped; finished in 405.71ms (402.43ms CPU time)

[PASS] testFuzz_mapToken_UpdatesEthBalance(uint256) (runs: 256, μ: 86923, ~: 86923)
[PASS] test_DepositETHResumesFunctionalityAfterUnpausing() (gas: 87096)
[PASS] test_DepositToETHResumesFunctionalityAfterUnpausing() (gas: 88029)
[PASS] test_DepositToResumesFunctionalityAfterUnpausing() (gas: 230051)
[PASS] test_DepositTokenResumesFunctionalityAfterUnpausing() (gas: 228983)
[PASS] test_InitializeBridge() (gas: 37635)
[PASS] test_MapTokenResumesFunctionalityAfterUnpausing() (gas: 105809)
[PASS] test_OnMessageReceiveResumesFunctionalityAfterUnpausing() (gas: 41748)
[PASS] test_RevertI_fNativeTransferIsFromNonWETH() (gas: 19063)
[PASS] test_RevertIf_InitializeTwice() (gas: 20499)
[PASS] test_RevertIf_InitializeWithAZeroAddressAdaptorManager() (gas: 4813142)
[PASS] test_RevertIf_InitializeWithAZeroAddressAll() (gas: 4812969)
[PASS] test_RevertIf_InitializeWithAZeroAddressChildBridge() (gas: 4812957)
[PASS] test_RevertIf_InitializeWithAZeroAddressDefaultAdmin() (gas: 4813082)
[PASS] test_RevertIf_InitializeWithAZeroAddressIMXToken() (gas: 4812957)
[PASS] test_RevertIf_InitializeWithAZeroAddressPauser() (gas: 4813045)
[PASS] test_RevertIf_InitializeWithAZeroAddressRootAdapter() (gas: 4812932)
[PASS] test_RevertIf_InitializeWithAZeroAddressTokenTemplate() (gas: 4812936)
[PASS] test_RevertIf_InitializeWithAZeroAddressUnpauser() (gas: 4813121)
[PASS] test_RevertIf_InitializeWithAZeroAddressVariableManager() (gas: 4813133)
[PASS] test_RevertIf_InitializeWithAZeroAddressWETHToken() (gas: 4813056)
[PASS] test_RevertIf_InitializeWithUnauthorizedInitializer() (gas: 4813283)
[PASS] test_RevertIf_ZeroInitializerIsGiven() (gas: 41724)
[PASS] test_RevertIf_depositAmountIsZero() (gas: 41443)
[PASS] test_RevertIf_depositCalledWhenTokenApprovalNotProvided() (gas: 200476)
[PASS] test_RevertIf_depositCalledWithUnmappedToken() (gas: 3049020)
[PASS] test_RevertIf_depositCalledWithZeroAddress() (gas: 174708)
[PASS] test_RevertIf_depositETHAmountIsZero() (gas: 30841)
[PASS] test_RevertIf_depositETHInsufficientValue() (gas: 18941)
[PASS] test_RevertIf_depositToAmountIsZero() (gas: 41803)
[PASS] test_RevertIf_depositToCalledWhenTokenApprovalNotProvided() (gas: 200862)
[PASS] test_RevertIf_depositToCalledWithUnmappedToken() (gas: 3049383)
[PASS] test_RevertIf_depositToCalledWithZeroAddress() (gas: 175096)
[PASS] test_RevertIf_depositToETHAmountIsZero() (gas: 31311)
[PASS] test_RevertIf_depositToETHInsufficientValue() (gas: 19394)
[PASS] test_RevertIf_mapTokenCalledTwice() (gas: 91934)
[PASS] test_RevertIf_mapTokenCalledWithETHAddress() (gas: 20655)
[PASS] test_RevertIf_mapTokenCalledWithIMXAddress() (gas: 20641)
[PASS] test_RevertIf_mapTokenCalledWithZeroAddress() (gas: 18426)
[PASS] test_RevertIf_mapTokenWithoutDecimals() (gas: 66193)
[PASS] test_RevertIf_mapTokenWithoutName() (gas: 56807)
[PASS] test_RevertIf_mapTokenWithoutSymbol() (gas: 61495)
[PASS] test_RevertIf_updateImxCumulativeDepositLimitCalledByNonOwner() (gas: 48320)
[PASS] test_RevertIf_updateRootBridgeAdaptorCalledByNonOwner() (gas: 86039)
[PASS] test_RevertIf_updateRootBridgeAdaptorCalledWithZeroAddress() (gas: 11503)
[PASS] test_RevertsIf_DepositETHWhenPaused() (gas: 51740)
[PASS] test_RevertsIf_DepositReentered() (gas: 3096392)
[PASS] test_RevertsIf_DepositToETHWhenPaused() (gas: 52196)
[PASS] test_RevertsIf_DepositToWhenPaused() (gas: 62919)
[PASS] test_RevertsIf_DepositTokenWhenPaused() (gas: 60237)
[PASS] test_RevertsIf_DepositTokenWithZeroFee() (gas: 29692)
[PASS] test_RevertsIf_IMXDepositLimitExceeded() (gas: 270695)
[PASS] test_RevertsIf_IMXDepositLimitTooLow() (gas: 184350)
[PASS] test_RevertsIf_MapTokenCalledWithZeroFee() (gas: 13867)
[PASS] test_RevertsIf_MapTokenWhenPaused() (gas: 42058)
[PASS] test_RevertsIf_OnMessageReceivedWhenPaused() (gas: 43353)
[PASS] test_SucceedIf_mapTokenWithSupportedMethods() (gas: 79429)
[PASS] test_depositCallsSendMessage() (gas: 189802)
[PASS] test_depositETHCallsSendMessage() (gas: 56391)
[PASS] test_depositETHEmitsNativeEthDepositEvent() (gas: 55879)
[PASS] test_depositEmitsChildChainERC20DepositEvent() (gas: 188070)
[PASS] test_depositIMXEmitsIMXDepositEvent() (gas: 131712)
[PASS] test_depositToCallsSendMessage() (gas: 190212)
[PASS] test_depositToETHCallsSendMessage() (gas: 56912)
[PASS] test_depositToETHEmitsNativeEthDepositEvent() (gas: 56339)
[PASS] test_depositToEmitsChildChainERC20DepositEvent() (gas: 188503)
[PASS] test_depositToIMXEmitsIMXDepositEvent() (gas: 132007)
[PASS] test_depositToTransfersNativeAsset() (gas: 185885)
[PASS] test_depositToTransfersTokens() (gas: 190562)
[PASS] test_depositToWETHEmitsWETHDepositEvent() (gas: 124904)
[PASS] test_depositToWETHTransfersTokens() (gas: 124693)
[PASS] test_depositTransfersNativeAsset() (gas: 185479)
[PASS] test_depositTransfersTokens() (gas: 190133)
[PASS] test_depositWETHCallsSendMessage() (gas: 124884)
[PASS] test_depositWETHEmitsNativeDepositEvent() (gas: 124540)
[PASS] test_depositWETHTransfersTokens() (gas: 124351)
[PASS] test_deposit_whenSettingImxDepositLimitToUnlimited() (gas: 312428)
[PASS] test_mapToken_CallsAdaptor() (gas: 96890)
[PASS] test_mapToken_EmitsTokenMappedEvent() (gas: 85941)
[PASS] test_mapToken_SetsTokenMapping() (gas: 82758)
[PASS] test_updateRootBridgeAdaptor_EmitsRootBridgeAdaptorUpdatedEvent() (gas: 21271)
[PASS] test_updateRootBridgeAdaptor_UpdatesRootBridgeAdaptor() (gas: 20637)
Suite result: ok. 82 passed; 0 failed; 0 skipped; finished in 393.26ms (382.21ms CPU time)

[PASS] testFuzz_DepositERC20(address,address,address,uint256) (runs: 256, μ: 464454, ~: 464454)
[PASS] testFuzz_DepositETH(address,address,uint256) (runs: 256, μ: 136380, ~: 136380)
[PASS] testFuzz_DepositIMX(address,address,uint256) (runs: 256, μ: 116423, ~: 116423)
[PASS] testFuzz_MapToken(address,string,string,uint8) (runs: 256, μ: 404570, ~: 403779)
[PASS] testFuzz_WithdrawERC20(address,address,uint256,uint256,uint256) (runs: 256, μ: 503464, ~: 503464)
[PASS] testFuzz_WithdrawETH(address,uint256,uint256,uint256) (runs: 256, μ: 164516, ~: 164516)
[PASS] testFuzz_WithdrawIMX(address,uint256,uint256,uint256) (runs: 256, μ: 94777, ~: 94777)
[PASS] testFuzz_WithdrawWIMX(address,uint256,uint256,uint256) (runs: 256, μ: 196041, ~: 196041)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 4.88s (5.96s CPU time)

[PASS] testFuzz_DepositERC20(address,address,uint256,uint256,uint256) (runs: 256, μ: 3275452, ~: 3275490)
[PASS] testFuzz_DepositETH(address,address,uint256,uint256,uint256) (runs: 256, μ: 123108, ~: 123108)
[PASS] testFuzz_DepositIMX(address,address,uint256,uint256,uint256) (runs: 256, μ: 306821, ~: 317663)
[PASS] testFuzz_DepositWETH(address,address,uint256,uint256,uint256) (runs: 256, μ: 213653, ~: 213653)
[PASS] testFuzz_MapToken(address,uint256,string,string,uint8) (runs: 256, μ: 3102123, ~: 3097691)
[PASS] testFuzz_WithdrawERC20(address,address,uint256) (runs: 256, μ: 3137538, ~: 3137538)
[PASS] testFuzz_WithdrawETH(address,address,uint256) (runs: 256, μ: 114055, ~: 114055)
[PASS] testFuzz_WithdrawIMX(address,address,uint256) (runs: 256, μ: 142505, ~: 142505)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 8.86s (15.10s CPU time)

Ran 44 test suites in 8.86s (18.91s CPU time): 551 tests passed, 2 failed, 0 skipped (553 total tests)

Failing tests:
[FAIL. Reason: environment variable "DEPLOYMENTS" not found] setUp() (gas: 0)

[FAIL. Reason: setup failed: Could not instantiate forked environment with fork url: http://127.0.0.1:8500] setUp() (gas: 0)

Encountered a total of 2 failing tests, 551 tests succeeded

For a full HTML report run: forge coverage --report lcov && genhtml --ignore-errors category --branch-coverage --output-dir coverage lcov.info

docs/manual-bridging.md Outdated Show resolved Hide resolved
docs/manual-bridging.md Outdated Show resolved Hide resolved
docs/manual-bridging.md Show resolved Hide resolved
docs/manual-bridging.md Outdated Show resolved Hide resolved
docs/manual-bridging.md Outdated Show resolved Hide resolved
docs/manual-bridging.md Outdated Show resolved Hide resolved
docs/manual-bridging.md Outdated Show resolved Hide resolved
@ermyas ermyas merged commit 7ec8341 into main Jul 9, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants