Skip to content

Commit

Permalink
Modular payments gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaryash90 committed Jul 30, 2024
1 parent f2db1bf commit 9d863b9
Show file tree
Hide file tree
Showing 6 changed files with 855 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/modular-contracts"]
path = lib/modular-contracts
url = https://github.com/thirdweb-dev/modular-contracts
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
1 change: 1 addition & 0 deletions lib/modular-contracts
Submodule modular-contracts added at 112f9e
1 change: 1 addition & 0 deletions lib/solady
Submodule solady added at a1f9be
32 changes: 32 additions & 0 deletions src/ModularPaymentsGateway.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.22;

import { ModularCore } from "lib/modular-contracts/src/ModularCore.sol";
import { Initializable } from "lib/solady/src/utils/Initializable.sol";

contract ModularPaymentsGateway is ModularCore, Initializable {
constructor() {
_disableInitializers();
}

function initialize(
address _owner,
address[] memory _extensions,
bytes[] memory _extensionInstallData
) external payable {
_initializeOwner(_owner);

// Install and initialize extensions
require(_extensions.length == _extensionInstallData.length);
for (uint256 i = 0; i < _extensions.length; i++) {
_installExtension(_extensions[i], _extensionInstallData[i]);
}
}

function getSupportedCallbackFunctions()
public
pure
override
returns (SupportedCallbackFunction[] memory supportedCallbackFunctions)
{}
}
Loading

0 comments on commit 9d863b9

Please sign in to comment.