Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add payable #26

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ERC1155A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ abstract contract ERC1155A is IERC1155A, IERC1155Errors {
//////////////////////////////////////////////////////////////*/

/// @inheritdoc IERC1155A
function registerSERC20(uint256 id) external virtual override returns (address) {
function registerSERC20(uint256 id) external payable virtual override returns (address) {
if (_totalSupply[id] == 0) revert ID_NOT_MINTED_YET();
if (synthethicTokenId[id] != address(0)) revert SYNTHETIC_ERC20_ALREADY_REGISTERED();

Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/IERC1155A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ interface IERC1155A is IERC1155 {
//////////////////////////////////////////////////////////////*/

/// @dev Function set to virtual so that implementing protocols may introduce RBAC here or perform other changes
/// @notice payable to allow any implementing cross-chain protocol to be paid for fees for relaying this action to
/// various chain
/// @param id of the ERC1155 to create a synthetic ERC20 for
function registerSERC20(uint256 id) external returns (address);
function registerSERC20(uint256 id) external payable returns (address);

/// @notice Use transmuteBatchToERC20 to transmute multiple ERC1155 ids into separate ERC20
/// Easier to transmute to 1155A than to transmute back to erc20 because of ERC1155 beauty!
Expand Down