-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract a clearer IERC1155Factory interface
Split the concept of a "pool factory" (which encompasses a single method and a single event) away from all of the other opinionated spellings in the IERC1155MixedFungible interface. The parameters of the TokenPoolCreation event have also been altered, but both the old and new parameters will be parsed by the listener. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
- Loading branch information
Showing
16 changed files
with
1,025 additions
and
369 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
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,23 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; | ||
|
||
/** | ||
* ERC1155 interface that supports creating partitions of fungible and non-fungible tokens. | ||
* The implementation may decide how to allocate these "pools" of value, and should emit the | ||
* TokenPoolCreation event to advertise each newly created partition (with start_id and end_id | ||
* being the inclusive start and end indexes of the ERC1155 id space). | ||
*/ | ||
interface IERC1155Factory is IERC165 { | ||
event TokenPoolCreation( | ||
address indexed operator, | ||
bool indexed is_fungible, | ||
uint256 start_id, | ||
uint256 end_id, | ||
bytes data | ||
); | ||
|
||
function create(bool is_fungible, bytes calldata data) external; | ||
} |
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,6 @@ | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
|
||
ABIS=$(ls artifacts/contracts/*/*.json | grep -v ".dbg.json") | ||
cp ${ABIS} ../../src/abi |
Oops, something went wrong.