Skip to content

Commit

Permalink
Updates Fast init facet for forwardable data.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesduncombe committed Mar 5, 2024
1 parent a88e0de commit e766cf8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 13 additions & 1 deletion contracts/fast/FastAccessFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity 0.8.10;

import "../lib/LibAddressSet.sol";
import "../lib/LibPaginate.sol";
import "../common/AHasContext.sol";
import "../common/AHasMembers.sol";
import "../common/AHasGovernors.sol";
import "../marketplace/MarketplaceAccessFacet.sol";
Expand All @@ -19,7 +20,7 @@ import "./FastAutomatonsFacet.sol";
* @notice The FAST Access facet is the source of truth when it comes to
* permissioning and ACLs within a given FAST.
*/
contract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers {
contract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers, AHasContext {
using LibAddressSet for LibAddressSet.Data;
/// Structs.

Expand All @@ -35,6 +36,17 @@ contract FastAccessFacet is AFastFacet, AHasGovernors, AHasMembers {
bool isMember;
}

/// AHasContext implementation.

function _isTrustedForwarder(address forwarder) internal view override(AHasContext) returns (bool) {
return AHasForwarder(address(this)).isTrustedForwarder(forwarder);
}

// Override base classes to use the AHasContext implementation.
function _msgSender() internal view override(AHasMembers, AHasGovernors, AHasContext) returns (address) {
return AHasContext._msgSender();
}

/// AHasGovernors implementation.

function isGovernorsManager(address who) internal view override(AHasGovernors) returns (bool) {
Expand Down
8 changes: 8 additions & 0 deletions contracts/fast/FastInitFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity 0.8.10;
import "../common/lib/LibHasGovernors.sol";
import "../common/lib/LibHasMembers.sol";
import "../common/lib/LibHasAutomatons.sol";
import "../common/lib/LibHasForwarder.sol";
import "../common/AHasGovernors.sol";
import "../common/AHasMembers.sol";
import "../common/AHasAutomatons.sol";
Expand Down Expand Up @@ -113,5 +114,12 @@ contract FastInitFacet is AFastFacet {

// Initialize automatons storage.
LibHasAutomatons.data().version = LibHasAutomatons.STORAGE_VERSION;

// ------------------------------------- //

// Initialize forwarder storage.
LibMarketplace.Data storage forwarderData = LibHasForwarder.data();
forwarderData.version = LibHasForwarder.STORAGE_VERSION;
forwarderData.forwarderAddress = address(0);
}
}

0 comments on commit e766cf8

Please sign in to comment.