-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from davidinsuomi/develop
using soulwallet-core repo
- Loading branch information
Showing
1,039 changed files
with
151,934 additions
and
8,116 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,12 +1,31 @@ | ||
cache | ||
artifacts | ||
node_modules | ||
.env | ||
coverage | ||
# Compiler and build files | ||
cache/ | ||
artifacts/ | ||
out/ | ||
compiler_config.json | ||
|
||
# Node modules | ||
node_modules/ | ||
|
||
# Coverage files | ||
coverage/ | ||
coverage.json | ||
|
||
# Environment files | ||
.env | ||
.env* | ||
|
||
# MacOS file system | ||
.DS_Store | ||
compiler_config.json | ||
out | ||
lib | ||
.deps | ||
|
||
# Development broadcast logs | ||
broadcast/ | ||
!/broadcast | ||
/broadcast/*/31337/ | ||
/broadcast/**/dry-run/ | ||
broadcast/* | ||
|
||
# Documentation | ||
docs/ | ||
.vscode/ | ||
lcov.info |
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 |
---|---|---|
@@ -1,31 +1,27 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
branch = chore/v1.5.6 | ||
|
||
[submodule "lib/account-abstraction"] | ||
path = lib/account-abstraction | ||
url = https://github.com/SoulWallet/account-abstraction | ||
branch = v0.6.0-with-openzeppelin-v5 | ||
|
||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/Openzeppelin/openzeppelin-contracts | ||
branch = release-v5.0 | ||
|
||
[submodule "lib/openzeppelin-contracts-upgradeable"] | ||
path = lib/openzeppelin-contracts-upgradeable | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable | ||
branch = release-v5.0 | ||
|
||
[submodule "lib/solmate"] | ||
path = lib/solmate | ||
url = https://github.com/transmissions11/solmate | ||
|
||
[submodule "lib/nitro-contracts"] | ||
path = lib/nitro-contracts | ||
url = https://github.com/OffchainLabs/nitro-contracts | ||
|
||
[submodule "lib/solenv"] | ||
path = lib/solenv | ||
url = https://github.com/memester-xyz/solenv | ||
[submodule "lib/SoulWalletCore"] | ||
path = lib/SoulWalletCore | ||
url = https://github.com/SoulWallet/SoulWalletCore | ||
[submodule "lib/solady"] | ||
path = lib/solady | ||
url = https://github.com/vectorized/solady | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/Openzeppelin/openzeppelin-contracts | ||
branch = release-v5.0 | ||
[submodule "lib/account-abstraction"] | ||
path = lib/account-abstraction | ||
url = https://github.com/SoulWallet/account-abstraction | ||
branch = v0.6.0-with-openzeppelin-v5 |
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,63 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.20; | ||
|
||
import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; | ||
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; | ||
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; | ||
|
||
contract DefaultCallbackHandler is IERC721Receiver, IERC1155Receiver { | ||
bytes4 private constant _ERC721_RECEIVED = | ||
IERC721Receiver.onERC721Received.selector; | ||
bytes4 private constant _ERC1155_RECEIVED = | ||
IERC1155Receiver.onERC1155Received.selector; | ||
bytes4 private constant _ERC1155_BATCH_RECEIVED = | ||
IERC1155Receiver.onERC1155BatchReceived.selector; | ||
|
||
bytes4 private constant _INTERFACE_ID_ERC721_RECEIVER = | ||
type(IERC721Receiver).interfaceId; | ||
bytes4 private constant _INTERFACE_ID_ERC1155_RECEIVER = | ||
type(IERC1155Receiver).interfaceId; | ||
bytes4 private constant _INTERFACE_ID_ERC165 = type(IERC165).interfaceId; | ||
|
||
function onERC721Received( | ||
address, | ||
address, | ||
uint256, | ||
bytes calldata | ||
) external pure override returns (bytes4) { | ||
return _ERC721_RECEIVED; | ||
} | ||
|
||
function onERC1155Received( | ||
address, | ||
address, | ||
uint256, | ||
uint256, | ||
bytes calldata | ||
) external pure override returns (bytes4) { | ||
return _ERC1155_RECEIVED; | ||
} | ||
|
||
function onERC1155BatchReceived( | ||
address, | ||
address, | ||
uint256[] calldata, | ||
uint256[] calldata, | ||
bytes calldata | ||
) external pure override returns (bytes4) { | ||
return _ERC1155_BATCH_RECEIVED; | ||
} | ||
|
||
function supportsInterface( | ||
bytes4 interfaceId | ||
) external view virtual override returns (bool) { | ||
return | ||
interfaceId == _INTERFACE_ID_ERC721_RECEIVER || | ||
interfaceId == _INTERFACE_ID_ERC1155_RECEIVER || | ||
interfaceId == _INTERFACE_ID_ERC165; | ||
} | ||
|
||
receive() external payable {} | ||
|
||
fallback() external payable {} | ||
} |
Oops, something went wrong.