Skip to content

Commit

Permalink
fix: fix cannot notify proxy admin
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Aug 9, 2023
1 parent 46a4d1e commit 6136cde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import { IBridgeManagerCallbackRegister } from "../../interfaces/bridge/IBridgeManagerCallbackRegister.sol";
import { IBridgeManagerCallback } from "../../interfaces/bridge/IBridgeManagerCallback.sol";
import { IdentityGuard } from "../../utils/IdentityGuard.sol";
import { TransparentUpgradeableProxyV2, IdentityGuard } from "../../utils/IdentityGuard.sol";

/**
* @title BridgeManagerCallbackRegister
Expand Down Expand Up @@ -110,9 +110,13 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager
bool[] memory statuses = new bool[](length);
bytes[] memory returnDatas = new bytes[](length);
bytes memory callData = abi.encodePacked(callbackFnSig, inputs);
bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));

for (uint256 i; i < length; ) {
(statuses[i], returnDatas[i]) = registers[i].call(callData);
if (statuses[i]) {
(statuses[i], returnDatas[i]) = registers[i].call(proxyCallData);
}

unchecked {
++i;
Expand Down
8 changes: 4 additions & 4 deletions logs/contract_code_sizes.log
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
············································|···························|·················
| LibTUint256Slot · 0.044 · │
············································|···························|·················
| MainchainBridgeManager · 18.550 · │
| MainchainBridgeManager · 18.819 · │
············································|···························|·················
| MainchainGatewayV2 · 17.699 · │
············································|···························|·················
Expand All @@ -71,7 +71,7 @@
············································|···························|·················
| MockBridge · 1.232 · │
············································|···························|·················
| MockBridgeManager · 10.163 · │
| MockBridgeManager · 10.433 · │
············································|···························|·················
| MockBridgeReward · 6.368 · │
············································|···························|·················
Expand Down Expand Up @@ -103,7 +103,7 @@
············································|···························|·················
| MockPrecompile · 3.794 · │
············································|···························|·················
| MockRoninBridgeManager · 23.646 · │
| MockRoninBridgeManager · 23.915 · │
············································|···························|·················
| MockRoninGatewayV2Extended · 20.397 · │
············································|···························|·················
Expand Down Expand Up @@ -131,7 +131,7 @@
············································|···························|·················
| ProxyAdmin · 1.604 · │
············································|···························|·················
| RoninBridgeManager · 23.646 · │
| RoninBridgeManager · 23.915 · │
············································|···························|·················
| RoninGatewayV2 · 20.090 · │
············································|···························|·················
Expand Down

0 comments on commit 6136cde

Please sign in to comment.