ERC165
ERC173
ERC721ConverterWithMCHExtension
function
draftBobTokens
nonpayable
Restricted (onlyOperator)
Inputs
Parameter | Type | Description |
---|---|---|
_bobTokenIds | uint256[] | |
_aliceTokenIds | uint256[] |
Outputs
(void)
function
draftBobToken
nonpayable
Restricted (onlyOperator)
Inputs
Parameter | Type | Description |
---|---|---|
_bobTokenId | uint256 | |
_aliceTokenId | uint256 |
Outputs
(void)
function draftBobToken(uint256 _bobTokenId, uint256 _aliceTokenId) public onlyOperator() {
require(_idMapBobToAlice[_bobTokenId] == 0, "_bobTokenId is already assignd");
require(_idMapAliceToBob[_aliceTokenId] == 0, "_aliceTokenId is already assignd");
_idMapBobToAlice[_bobTokenId] = _aliceTokenId;
_idMapAliceToBob[_aliceTokenId] = _bobTokenId;
}
function
draftAliceTokens
nonpayable
Restricted (onlyOperator)
Inputs
Parameter | Type | Description |
---|---|---|
_aliceTokenIds | uint256[] | |
_bobTokenIds | uint256[] |
Outputs
(void)
function
draftAliceToken
nonpayable
Restricted (onlyOperator)
Inputs
Parameter | Type | Description |
---|---|---|
_aliceTokenId | uint256 | |
_bobTokenId | uint256 |
Outputs
(void)
function draftAliceToken(uint256 _aliceTokenId, uint256 _bobTokenId) public onlyOperator() {
require(_idMapAliceToBob[_aliceTokenId] == 0, "_aliceTokenId is already assignd");
require(_idMapBobToAlice[_bobTokenId] == 0, "_bobTokenId is already assignd");
_idMapAliceToBob[_aliceTokenId] = _bobTokenId;
_idMapBobToAlice[_bobTokenId] = _aliceTokenId;
}
function
convertFromBobToAlice
nonpayable
Restricted (whenNotPaused)
Inputs
Parameter | Type | Description |
---|---|---|
_tokenId | uint256 |
Outputs
(void)
function convertFromBobToAlice(uint256 _tokenId) public whenNotPaused() {
Bob.safeTransferFrom(msg.sender, address(this), _tokenId);
uint256 convertTo = getAliceTokenID(_tokenId);
if (Alice.isAlreadyMinted(convertTo)) {
Alice.safeTransferFrom(address(this), msg.sender, convertTo);
} else {
Alice.mintExtensionAsset(msg.sender, convertTo);
}
}
function
convertFromAliceToBob
nonpayable
Restricted (whenNotPaused)
Inputs
Parameter | Type | Description |
---|---|---|
_tokenId | uint256 |
Outputs
(void)
function convertFromAliceToBob(uint256 _tokenId) public whenNotPaused() {
Alice.safeTransferFrom(msg.sender, address(this), _tokenId);
uint256 convertTo = getBobTokenID(_tokenId);
if (Bob.exist(convertTo)) {
Bob.safeTransferFrom(address(this), msg.sender, convertTo);
} else {
Bob.mint(msg.sender, convertTo);
}
}