Skip to content

Commit

Permalink
Continue playground with TIP4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBSoft committed Mar 8, 2022
1 parent 46f4739 commit 18d7961
Show file tree
Hide file tree
Showing 6 changed files with 7,565 additions and 7,686 deletions.
Binary file added tnft-explorer/.nvmrc
Binary file not shown.
2 changes: 1 addition & 1 deletion tnft-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tnft-explorer",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
Expand Down
15,186 changes: 7,505 additions & 7,681 deletions tnft-explorer/yarn.lock

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions true-nft/components/tip4.1/Collection.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
pragma ton-solidity >=0.43.0;
pragma ton-solidity >=0.55.0;

interface TIP4NftCollection {
function name() public view responsible returns (string);
function totalSupply() public view responsible returns (uint128);
function maxSupply() public view responsible returns (uint128);
function nftCode() public view responsible returns (TvmCell);
}
}

event nftCreated(
uint256 id, // nft token id
address addrNft, // nft token address
address addrOwner, // nft token owner
address addrCreator // initiator of creating the nft token
);
40 changes: 38 additions & 2 deletions true-nft/components/tip4.1/NFT.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
pragma ton-solidity >=0.43.0;
pragma ton-solidity >=0.55.0;

interface TIP4Nft {
function getNftInfo() external responsible returns(uint128 id, address addrOwner, address addrManager, address addrCollection);
function transferOwnership(address addrTo, address addrSendGasTo, mapping(address => CallbackParams) callbacks);
function setManager(address addrManager, address addrSendGasTo, mapping(address => CallbackParams) callbacks);
function getNftJsonContent() external responsible returns(string json);
}
}

struct CallbackParams {
uint256 value; // ever value will send to address
TvmCell payload;
}

interface ITokenTransferCallback {
function tokenTransferCallback(
uint256 id,
address addrOldOwner,
address addrOldManager,
address addrNewOwner,
address addrCollection,
address addrSendGasTo,
TvmCell payload
) external;
}

interface ISetManagerCallback {
function setManagerCallback(
uint256 id,
address addrOwner,
address addrOldManager,
address addrNewManager,
address addrCollection,
address addrSendGasTo,
TvmCell payload
) external;
}

event TokenWasMinted(address owner);
event OwnershipTransferred(address oldOwner, address newOwner);
event ManagerChanged(address oldManager, address newManager);



12 changes: 12 additions & 0 deletions true-nft/components/tip4.1/TIP6.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pragma ton-solidity >=0.55.0;

// Standard Interface Detection Interface (TIP-6.1)

interface TIP6 {
/// @notice Query if a contract implements an interface
/// @param interfaceID The interface identifier, as specified in TIP6.1
/// @dev Interface identification is specified in TIP6.1.
/// @return `true` if the contract implements `interfaceID` and
/// `interfaceID` is not 0xffffffff, `false` otherwise
function supportsInterface(bytes4 interfaceID) external view responsible returns (bool);
}

0 comments on commit 18d7961

Please sign in to comment.