Skip to content

Commit

Permalink
Merge pull request #26 from superform-xyz/payableRegister
Browse files Browse the repository at this point in the history
fix: add payable
  • Loading branch information
0xTimepunk authored Oct 27, 2023
2 parents 2e9afc6 + d33e220 commit d75a8da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit d75a8da

Please sign in to comment.