-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: raulk <[email protected]>
- Loading branch information
Showing
19 changed files
with
1,332 additions
and
1,034 deletions.
There are no files selected for viewing
Submodule forge-std
updated
11 files
+1 −0 | .gitattributes | |
+1 −1 | package.json | |
+635 −0 | scripts/vm.py | |
+5 −1 | src/StdChains.sol | |
+1 −1 | src/StdJson.sol | |
+753 −484 | src/Vm.sol | |
+51 −33 | src/mocks/MockERC20.sol | |
+46 −32 | src/mocks/MockERC721.sol | |
+3 −1 | test/StdError.t.sol | |
+2 −2 | test/StdUtils.t.sol | |
+2 −2 | test/Vm.t.sol |
Submodule openzeppelin-contracts
updated
325 files
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity ^0.8.23; | ||
|
||
import {GatewayDiamond} from "../../src/GatewayDiamond.sol"; | ||
import {DiamondLoupeFacet} from "../../src/diamond/DiamondLoupeFacet.sol"; | ||
import {DiamondCutFacet} from "../../src/diamond/DiamondCutFacet.sol"; | ||
import {SubnetActorDiamond} from "../../src/SubnetActorDiamond.sol"; | ||
import {SubnetRegistryDiamond} from "../../src/SubnetRegistryDiamond.sol"; | ||
|
||
library DiamondFacetsHelper { | ||
function diamondLouper(address a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(a); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(address a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(a); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function diamondLouper(GatewayDiamond a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(GatewayDiamond a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function diamondLouper(SubnetActorDiamond a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(SubnetActorDiamond a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function diamondLouper(SubnetRegistryDiamond a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(SubnetRegistryDiamond a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(address(a)); | ||
return facet; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity ^0.8.23; | ||
|
||
import {GatewayGetterFacet} from "../../src/gateway/GatewayGetterFacet.sol"; | ||
import {GatewayManagerFacet} from "../../src/gateway/GatewayManagerFacet.sol"; | ||
import {GatewayMessengerFacet} from "../../src/gateway/GatewayMessengerFacet.sol"; | ||
import {TopDownFinalityFacet} from "../../src/gateway/router/TopDownFinalityFacet.sol"; | ||
import {CheckpointingFacet} from "../../src/gateway/router/CheckpointingFacet.sol"; | ||
import {XnetMessagingFacet} from "../../src/gateway/router/XnetMessagingFacet.sol"; | ||
import {GatewayDiamond} from "../../src/GatewayDiamond.sol"; | ||
import {DiamondLoupeFacet} from "../../src/diamond/DiamondLoupeFacet.sol"; | ||
import {DiamondCutFacet} from "../../src/diamond/DiamondCutFacet.sol"; | ||
|
||
library GatewayFacetsHelper { | ||
function getter(address gw) internal pure returns (GatewayGetterFacet) { | ||
GatewayGetterFacet facet = GatewayGetterFacet(gw); | ||
return facet; | ||
} | ||
|
||
function manager(address gw) internal pure returns (GatewayManagerFacet) { | ||
GatewayManagerFacet facet = GatewayManagerFacet(gw); | ||
return facet; | ||
} | ||
|
||
function messenger(address gw) internal pure returns (GatewayMessengerFacet) { | ||
GatewayMessengerFacet facet = GatewayMessengerFacet(gw); | ||
return facet; | ||
} | ||
|
||
function topDownFinalizer(address gw) internal pure returns (TopDownFinalityFacet) { | ||
TopDownFinalityFacet facet = TopDownFinalityFacet(gw); | ||
return facet; | ||
} | ||
|
||
function checkpointer(address gw) internal pure returns (CheckpointingFacet) { | ||
CheckpointingFacet facet = CheckpointingFacet(gw); | ||
return facet; | ||
} | ||
|
||
function xnetMessenger(address gw) internal pure returns (XnetMessagingFacet) { | ||
XnetMessagingFacet facet = XnetMessagingFacet(gw); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function getter(GatewayDiamond gw) internal pure returns (GatewayGetterFacet) { | ||
GatewayGetterFacet facet = GatewayGetterFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
function manager(GatewayDiamond gw) internal pure returns (GatewayManagerFacet) { | ||
GatewayManagerFacet facet = GatewayManagerFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
function messenger(GatewayDiamond gw) internal pure returns (GatewayMessengerFacet) { | ||
GatewayMessengerFacet facet = GatewayMessengerFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
function topDownFinalizer(GatewayDiamond gw) internal pure returns (TopDownFinalityFacet) { | ||
TopDownFinalityFacet facet = TopDownFinalityFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
function checkpointer(GatewayDiamond gw) internal pure returns (CheckpointingFacet) { | ||
CheckpointingFacet facet = CheckpointingFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
function xnetMessenger(GatewayDiamond gw) internal pure returns (XnetMessagingFacet) { | ||
XnetMessagingFacet facet = XnetMessagingFacet(address(gw)); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function diamondLouper(GatewayDiamond a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(GatewayDiamond a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(address(a)); | ||
return facet; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity ^0.8.23; | ||
|
||
import {SubnetRegistryDiamond} from "../../src/SubnetRegistryDiamond.sol"; | ||
import {RegisterSubnetFacet} from "../../src/subnetregistry/RegisterSubnetFacet.sol"; | ||
import {SubnetGetterFacet} from "../../src/subnetregistry/SubnetGetterFacet.sol"; | ||
|
||
library RegistryFacetsHelper { | ||
function register(address a) internal pure returns (RegisterSubnetFacet) { | ||
RegisterSubnetFacet facet = RegisterSubnetFacet(a); | ||
return facet; | ||
} | ||
|
||
function getter(address a) internal pure returns (SubnetGetterFacet) { | ||
SubnetGetterFacet facet = SubnetGetterFacet(a); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function register(SubnetRegistryDiamond a) internal pure returns (RegisterSubnetFacet) { | ||
RegisterSubnetFacet facet = RegisterSubnetFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function getter(SubnetRegistryDiamond a) internal pure returns (SubnetGetterFacet) { | ||
SubnetGetterFacet facet = SubnetGetterFacet(address(a)); | ||
return facet; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity ^0.8.23; | ||
|
||
import {SubnetActorManagerFacet} from "../../src/subnet/SubnetActorManagerFacet.sol"; | ||
import {SubnetActorPauseFacet} from "../../src/subnet/SubnetActorPauseFacet.sol"; | ||
import {SubnetActorCheckpointingFacet} from "../../src/subnet/SubnetActorCheckpointingFacet.sol"; | ||
import {SubnetActorRewardFacet} from "../../src/subnet/SubnetActorRewardFacet.sol"; | ||
import {SubnetActorGetterFacet} from "../../src/subnet/SubnetActorGetterFacet.sol"; | ||
import {SubnetActorDiamond} from "../../src/SubnetActorDiamond.sol"; | ||
import {DiamondLoupeFacet} from "../../src/diamond/DiamondLoupeFacet.sol"; | ||
import {DiamondCutFacet} from "../../src/diamond/DiamondCutFacet.sol"; | ||
|
||
library SubnetActorFacetsHelper { | ||
function manager(address sa) internal pure returns (SubnetActorManagerFacet) { | ||
SubnetActorManagerFacet facet = SubnetActorManagerFacet(sa); | ||
return facet; | ||
} | ||
|
||
function pauser(address sa) internal pure returns (SubnetActorPauseFacet) { | ||
SubnetActorPauseFacet facet = SubnetActorPauseFacet(sa); | ||
return facet; | ||
} | ||
|
||
function checkpointer(address sa) internal pure returns (SubnetActorCheckpointingFacet) { | ||
SubnetActorCheckpointingFacet facet = SubnetActorCheckpointingFacet(sa); | ||
return facet; | ||
} | ||
|
||
function rewarder(address sa) internal pure returns (SubnetActorRewardFacet) { | ||
SubnetActorRewardFacet facet = SubnetActorRewardFacet(sa); | ||
return facet; | ||
} | ||
|
||
function getter(address sa) internal pure returns (SubnetActorGetterFacet) { | ||
SubnetActorGetterFacet facet = SubnetActorGetterFacet(sa); | ||
return facet; | ||
} | ||
|
||
function diamondLouper(SubnetActorDiamond a) internal pure returns (DiamondLoupeFacet) { | ||
DiamondLoupeFacet facet = DiamondLoupeFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
function diamondCutter(SubnetActorDiamond a) internal pure returns (DiamondCutFacet) { | ||
DiamondCutFacet facet = DiamondCutFacet(address(a)); | ||
return facet; | ||
} | ||
|
||
// | ||
|
||
function manager(SubnetActorDiamond sa) internal pure returns (SubnetActorManagerFacet) { | ||
SubnetActorManagerFacet facet = SubnetActorManagerFacet(address(sa)); | ||
return facet; | ||
} | ||
|
||
function pauser(SubnetActorDiamond sa) internal pure returns (SubnetActorPauseFacet) { | ||
SubnetActorPauseFacet facet = SubnetActorPauseFacet(address(sa)); | ||
return facet; | ||
} | ||
|
||
function checkpointer(SubnetActorDiamond sa) internal pure returns (SubnetActorCheckpointingFacet) { | ||
SubnetActorCheckpointingFacet facet = SubnetActorCheckpointingFacet(address(sa)); | ||
return facet; | ||
} | ||
|
||
function rewarder(SubnetActorDiamond sa) internal pure returns (SubnetActorRewardFacet) { | ||
SubnetActorRewardFacet facet = SubnetActorRewardFacet(address(sa)); | ||
return facet; | ||
} | ||
|
||
function getter(SubnetActorDiamond sa) internal pure returns (SubnetActorGetterFacet) { | ||
SubnetActorGetterFacet facet = SubnetActorGetterFacet(address(sa)); | ||
return facet; | ||
} | ||
} |
Oops, something went wrong.