Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nxqbao committed Apr 16, 2024
1 parent 0c61572 commit 73ad9e6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract Migration__20240409_Helper is Migration {
function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal {
for (uint i; i < _voters.length - 1; ++i) {
vm.broadcast(_voters[i]);
address(_currRoninBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000 }(
address(_currRoninBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }(
abi.encodeWithSignature(
"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,23 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H
// );
// }

// ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0)

LegacyProposalDetail memory proposal;
proposal.nonce = 45;
proposal.chainId = 2021;
proposal.expiryTimestamp = 1714451658;
proposal.targets = targets;
proposal.values = values;
proposal.calldatas = calldatas;
proposal.gasAmounts = gasAmounts;

vm.broadcast(gaVoters[2]);
address(roninGA).call{gas: 10_000_000}(
abi.encodeWithSignature(
"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For
)
);
// ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0)

LegacyProposalDetail memory proposal;
proposal.nonce = 45;
proposal.chainId = 2021;
proposal.expiryTimestamp = 1714451658;
proposal.targets = targets;
proposal.values = values;
proposal.calldatas = calldatas;
proposal.gasAmounts = gasAmounts;

vm.broadcast(gaVoters[2]);
address(roninGA).call{ gas: 10_000_000 }(
abi.encodeWithSignature(
"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For
)
);
}

function _upgradeBridgeRoninchain() private {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__
SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For);

vm.broadcast(_governor);
address(_currMainchainBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000}(
address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }(
abi.encodeWithSignature(
"relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures
)
Expand Down
2 changes: 1 addition & 1 deletion script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchai
function run() public override(Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain) {
TNetwork currentNetwork = network();
TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork);
Migration__20240409_P2_UpgradeBridgeRoninchain.run();
// Migration__20240409_P2_UpgradeBridgeRoninchain.run();

CONFIG.createFork(companionNetwork);
CONFIG.switchTo(companionNetwork);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck {
calldatas: abi.encodeCall(
TransparentUpgradeableProxyV2.functionDelegateCall,
(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)))
).toSingletonArray(),
).toSingletonArray(),
gasAmounts: uint256(1_000_000).toSingletonArray(),
nonce: manager.round(0) + 1
});
Expand Down
3 changes: 2 additions & 1 deletion src/mainchain/MainchainGatewayV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ contract MainchainGatewayV3 is
}

function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {
return interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);
return
interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);
}
}

0 comments on commit 73ad9e6

Please sign in to comment.