difftreelog
add `collectionHelperAddress` method to `ERC721` & `ERC20` interfaces.
in: master
14 files changed
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -30,6 +30,7 @@
use pallet_evm_coder_substrate::{call, dispatch_to_evm};
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
use pallet_common::{CollectionHandle, erc::CollectionCall};
+use sp_core::Get;
use crate::{
Allowance, Balance, Config, FungibleHandle, Pallet, SelfWeightOf, TotalSupply,
@@ -132,6 +133,11 @@
Ok(<Allowance<T>>::get((self.id, owner, spender)).into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
#[solidity_interface(name = ERC20Mintable)]
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -547,7 +547,7 @@
event Approval(address indexed owner, address indexed spender, uint256 value);
}
-/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+/// @dev the ERC-165 identifier for this interface is 0x8cb847c4
contract ERC20 is Dummy, ERC165, ERC20Events {
/// @dev EVM selector for this function is: 0x06fdde03,
/// or in textual repr: name()
@@ -634,6 +634,15 @@
dummy;
return 0;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -42,6 +42,7 @@
use pallet_evm::{account::CrossAccountId, PrecompileHandle};
use pallet_evm_coder_substrate::call;
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
+use sp_core::Get;
use crate::{
AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
@@ -489,6 +490,11 @@
// TODO: Not implemetable
Err("not implemented".into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
/// @title ERC721 Token that can be irreversibly burned (destroyed).
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -920,7 +920,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+/// @dev the ERC-165 identifier for this interface is 0x983a942b
contract ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all NFTs assigned to an owner
/// @dev NFTs assigned to the zero address are considered invalid, and this
@@ -1050,6 +1050,15 @@
dummy;
return 0x0000000000000000000000000000000000000000;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueNFT is
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -38,7 +38,7 @@
use pallet_evm::{account::CrossAccountId, PrecompileHandle};
use pallet_evm_coder_substrate::{call, dispatch_to_evm};
use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::H160;
+use sp_core::{H160, Get};
use sp_std::{collections::btree_map::BTreeMap, vec::Vec, vec};
use up_data_structs::{
CollectionId, CollectionPropertiesVec, mapping::TokenAddressMapping, Property, PropertyKey,
@@ -482,6 +482,11 @@
// TODO: Not implemetable
Err("not implemented".into())
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<address> {
+ Ok(T::ContractAddress::get())
+ }
}
/// Returns amount of pieces of `token` that `owner` have
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -919,7 +919,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x58800161
+/// @dev the ERC-165 identifier for this interface is 0x4016cd87
contract ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all RFTs assigned to an owner
/// @dev RFTs assigned to the zero address are considered invalid, and this
@@ -1047,6 +1047,15 @@
dummy;
return 0x0000000000000000000000000000000000000000;
}
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
}
contract UniqueRefungible is
tests/src/apiConsts.test.tsdiffbeforeafterboth--- a/tests/src/apiConsts.test.ts
+++ b/tests/src/apiConsts.test.ts
@@ -117,4 +117,4 @@
function checkConst<T>(constValue: any, expectedValue: T) {
expect(constValue.toBigInt()).equal(expectedValue);
-}
+}
\ No newline at end of file
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -201,6 +201,13 @@
},
{
"inputs": [],
+ "name": "collectionHelperAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -231,6 +231,13 @@
},
{
"inputs": [],
+ "name": "collectionHelperAddress",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 {86 "components": [87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],90 "internalType": "struct EthCrossAccount",91 "name": "newAdmin",92 "type": "tuple"93 }94 ],95 "name": "addCollectionAdminCross",96 "outputs": [],97 "stateMutability": "nonpayable",98 "type": "function"99 },100 {101 "inputs": [102 {103 "components": [104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],107 "internalType": "struct EthCrossAccount",108 "name": "user",109 "type": "tuple"110 }111 ],112 "name": "addToCollectionAllowListCross",113 "outputs": [],114 "stateMutability": "nonpayable",115 "type": "function"116 },117 {118 "inputs": [119 {120 "components": [121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],124 "internalType": "struct EthCrossAccount",125 "name": "user",126 "type": "tuple"127 }128 ],129 "name": "allowlistedCross",130 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],131 "stateMutability": "view",132 "type": "function"133 },134 {135 "inputs": [136 { "internalType": "address", "name": "approved", "type": "address" },137 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }138 ],139 "name": "approve",140 "outputs": [],141 "stateMutability": "nonpayable",142 "type": "function"143 },144 {145 "inputs": [146 { "internalType": "address", "name": "owner", "type": "address" }147 ],148 "name": "balanceOf",149 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],150 "stateMutability": "view",151 "type": "function"152 },153 {154 "inputs": [155 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }156 ],157 "name": "burn",158 "outputs": [],159 "stateMutability": "nonpayable",160 "type": "function"161 },162 {163 "inputs": [164 {165 "components": [166 { "internalType": "address", "name": "eth", "type": "address" },167 { "internalType": "uint256", "name": "sub", "type": "uint256" }168 ],169 "internalType": "struct EthCrossAccount",170 "name": "from",171 "type": "tuple"172 },173 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }174 ],175 "name": "burnFromCross",176 "outputs": [],177 "stateMutability": "nonpayable",178 "type": "function"179 },180 {181 "inputs": [182 {183 "components": [184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],187 "internalType": "struct EthCrossAccount",188 "name": "newOwner",189 "type": "tuple"190 }191 ],192 "name": "changeCollectionOwnerCross",193 "outputs": [],194 "stateMutability": "nonpayable",195 "type": "function"196 },197 {198 "inputs": [],199 "name": "collectionAdmins",200 "outputs": [201 {202 "components": [203 { "internalType": "address", "name": "eth", "type": "address" },204 { "internalType": "uint256", "name": "sub", "type": "uint256" }205 ],206 "internalType": "struct EthCrossAccount[]",207 "name": "",208 "type": "tuple[]"209 }210 ],211 "stateMutability": "view",212 "type": "function"213 },214 {215 "inputs": [],216 "name": "collectionOwner",217 "outputs": [218 {219 "components": [220 { "internalType": "address", "name": "eth", "type": "address" },221 { "internalType": "uint256", "name": "sub", "type": "uint256" }222 ],223 "internalType": "struct EthCrossAccount",224 "name": "",225 "type": "tuple"226 }227 ],228 "stateMutability": "view",229 "type": "function"230 },231 {232 "inputs": [233 { "internalType": "string[]", "name": "keys", "type": "string[]" }234 ],235 "name": "collectionProperties",236 "outputs": [237 {238 "components": [239 { "internalType": "string", "name": "key", "type": "string" },240 { "internalType": "bytes", "name": "value", "type": "bytes" }241 ],242 "internalType": "struct Property[]",243 "name": "",244 "type": "tuple[]"245 }246 ],247 "stateMutability": "view",248 "type": "function"249 },250 {251 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],252 "name": "collectionProperty",253 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],254 "stateMutability": "view",255 "type": "function"256 },257 {258 "inputs": [],259 "name": "collectionSponsor",260 "outputs": [261 {262 "components": [263 { "internalType": "address", "name": "field_0", "type": "address" },264 { "internalType": "uint256", "name": "field_1", "type": "uint256" }265 ],266 "internalType": "struct Tuple29",267 "name": "",268 "type": "tuple"269 }270 ],271 "stateMutability": "view",272 "type": "function"273 },274 {275 "inputs": [],276 "name": "confirmCollectionSponsorship",277 "outputs": [],278 "stateMutability": "nonpayable",279 "type": "function"280 },281 {282 "inputs": [],283 "name": "contractAddress",284 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],285 "stateMutability": "view",286 "type": "function"287 },288 {289 "inputs": [290 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }291 ],292 "name": "crossOwnerOf",293 "outputs": [294 {295 "components": [296 { "internalType": "address", "name": "eth", "type": "address" },297 { "internalType": "uint256", "name": "sub", "type": "uint256" }298 ],299 "internalType": "struct EthCrossAccount",300 "name": "",301 "type": "tuple"302 }303 ],304 "stateMutability": "view",305 "type": "function"306 },307 {308 "inputs": [309 { "internalType": "string[]", "name": "keys", "type": "string[]" }310 ],311 "name": "deleteCollectionProperties",312 "outputs": [],313 "stateMutability": "nonpayable",314 "type": "function"315 },316 {317 "inputs": [318 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },319 { "internalType": "string[]", "name": "keys", "type": "string[]" }320 ],321 "name": "deleteProperties",322 "outputs": [],323 "stateMutability": "nonpayable",324 "type": "function"325 },326 {327 "inputs": [],328 "name": "description",329 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],330 "stateMutability": "view",331 "type": "function"332 },333 {334 "inputs": [],335 "name": "finishMinting",336 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],337 "stateMutability": "nonpayable",338 "type": "function"339 },340 {341 "inputs": [342 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }343 ],344 "name": "getApproved",345 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],346 "stateMutability": "view",347 "type": "function"348 },349 {350 "inputs": [],351 "name": "hasCollectionPendingSponsor",352 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],353 "stateMutability": "view",354 "type": "function"355 },356 {357 "inputs": [358 { "internalType": "address", "name": "owner", "type": "address" },359 { "internalType": "address", "name": "operator", "type": "address" }360 ],361 "name": "isApprovedForAll",362 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],363 "stateMutability": "view",364 "type": "function"365 },366 {367 "inputs": [368 {369 "components": [370 { "internalType": "address", "name": "eth", "type": "address" },371 { "internalType": "uint256", "name": "sub", "type": "uint256" }372 ],373 "internalType": "struct EthCrossAccount",374 "name": "user",375 "type": "tuple"376 }377 ],378 "name": "isOwnerOrAdminCross",379 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],380 "stateMutability": "view",381 "type": "function"382 },383 {384 "inputs": [{ "internalType": "address", "name": "to", "type": "address" }],385 "name": "mint",386 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],387 "stateMutability": "nonpayable",388 "type": "function"389 },390 {391 "inputs": [392 { "internalType": "address", "name": "to", "type": "address" },393 { "internalType": "string", "name": "tokenUri", "type": "string" }394 ],395 "name": "mintWithTokenURI",396 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],397 "stateMutability": "nonpayable",398 "type": "function"399 },400 {401 "inputs": [],402 "name": "mintingFinished",403 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],404 "stateMutability": "view",405 "type": "function"406 },407 {408 "inputs": [],409 "name": "name",410 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],411 "stateMutability": "view",412 "type": "function"413 },414 {415 "inputs": [],416 "name": "nextTokenId",417 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],418 "stateMutability": "view",419 "type": "function"420 },421 {422 "inputs": [423 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }424 ],425 "name": "ownerOf",426 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],427 "stateMutability": "view",428 "type": "function"429 },430 {431 "inputs": [432 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },433 { "internalType": "string[]", "name": "keys", "type": "string[]" }434 ],435 "name": "properties",436 "outputs": [437 {438 "components": [439 { "internalType": "string", "name": "key", "type": "string" },440 { "internalType": "bytes", "name": "value", "type": "bytes" }441 ],442 "internalType": "struct Property[]",443 "name": "",444 "type": "tuple[]"445 }446 ],447 "stateMutability": "view",448 "type": "function"449 },450 {451 "inputs": [452 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },453 { "internalType": "string", "name": "key", "type": "string" }454 ],455 "name": "property",456 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],457 "stateMutability": "view",458 "type": "function"459 },460 {461 "inputs": [462 {463 "components": [464 { "internalType": "address", "name": "eth", "type": "address" },465 { "internalType": "uint256", "name": "sub", "type": "uint256" }466 ],467 "internalType": "struct EthCrossAccount",468 "name": "admin",469 "type": "tuple"470 }471 ],472 "name": "removeCollectionAdminCross",473 "outputs": [],474 "stateMutability": "nonpayable",475 "type": "function"476 },477 {478 "inputs": [],479 "name": "removeCollectionSponsor",480 "outputs": [],481 "stateMutability": "nonpayable",482 "type": "function"483 },484 {485 "inputs": [486 {487 "components": [488 { "internalType": "address", "name": "eth", "type": "address" },489 { "internalType": "uint256", "name": "sub", "type": "uint256" }490 ],491 "internalType": "struct EthCrossAccount",492 "name": "user",493 "type": "tuple"494 }495 ],496 "name": "removeFromCollectionAllowListCross",497 "outputs": [],498 "stateMutability": "nonpayable",499 "type": "function"500 },501 {502 "inputs": [503 { "internalType": "address", "name": "from", "type": "address" },504 { "internalType": "address", "name": "to", "type": "address" },505 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }506 ],507 "name": "safeTransferFrom",508 "outputs": [],509 "stateMutability": "nonpayable",510 "type": "function"511 },512 {513 "inputs": [514 { "internalType": "address", "name": "from", "type": "address" },515 { "internalType": "address", "name": "to", "type": "address" },516 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },517 { "internalType": "bytes", "name": "data", "type": "bytes" }518 ],519 "name": "safeTransferFromWithData",520 "outputs": [],521 "stateMutability": "nonpayable",522 "type": "function"523 },524 {525 "inputs": [526 { "internalType": "address", "name": "operator", "type": "address" },527 { "internalType": "bool", "name": "approved", "type": "bool" }528 ],529 "name": "setApprovalForAll",530 "outputs": [],531 "stateMutability": "nonpayable",532 "type": "function"533 },534 {535 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],536 "name": "setCollectionAccess",537 "outputs": [],538 "stateMutability": "nonpayable",539 "type": "function"540 },541 {542 "inputs": [543 { "internalType": "string", "name": "limit", "type": "string" },544 { "internalType": "uint256", "name": "value", "type": "uint256" }545 ],546 "name": "setCollectionLimit",547 "outputs": [],548 "stateMutability": "nonpayable",549 "type": "function"550 },551 {552 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],553 "name": "setCollectionMintMode",554 "outputs": [],555 "stateMutability": "nonpayable",556 "type": "function"557 },558 {559 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],560 "name": "setCollectionNesting",561 "outputs": [],562 "stateMutability": "nonpayable",563 "type": "function"564 },565 {566 "inputs": [567 { "internalType": "bool", "name": "enable", "type": "bool" },568 {569 "internalType": "address[]",570 "name": "collections",571 "type": "address[]"572 }573 ],574 "name": "setCollectionNesting",575 "outputs": [],576 "stateMutability": "nonpayable",577 "type": "function"578 },579 {580 "inputs": [581 {582 "components": [583 { "internalType": "string", "name": "key", "type": "string" },584 { "internalType": "bytes", "name": "value", "type": "bytes" }585 ],586 "internalType": "struct Property[]",587 "name": "properties",588 "type": "tuple[]"589 }590 ],591 "name": "setCollectionProperties",592 "outputs": [],593 "stateMutability": "nonpayable",594 "type": "function"595 },596 {597 "inputs": [598 {599 "components": [600 { "internalType": "address", "name": "eth", "type": "address" },601 { "internalType": "uint256", "name": "sub", "type": "uint256" }602 ],603 "internalType": "struct EthCrossAccount",604 "name": "sponsor",605 "type": "tuple"606 }607 ],608 "name": "setCollectionSponsorCross",609 "outputs": [],610 "stateMutability": "nonpayable",611 "type": "function"612 },613 {614 "inputs": [615 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },616 {617 "components": [618 { "internalType": "string", "name": "key", "type": "string" },619 { "internalType": "bytes", "name": "value", "type": "bytes" }620 ],621 "internalType": "struct Property[]",622 "name": "properties",623 "type": "tuple[]"624 }625 ],626 "name": "setProperties",627 "outputs": [],628 "stateMutability": "nonpayable",629 "type": "function"630 },631 {632 "inputs": [633 { "internalType": "string", "name": "key", "type": "string" },634 { "internalType": "bool", "name": "isMutable", "type": "bool" },635 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },636 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }637 ],638 "name": "setTokenPropertyPermission",639 "outputs": [],640 "stateMutability": "nonpayable",641 "type": "function"642 },643 {644 "inputs": [645 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }646 ],647 "name": "supportsInterface",648 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],649 "stateMutability": "view",650 "type": "function"651 },652 {653 "inputs": [],654 "name": "symbol",655 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],656 "stateMutability": "view",657 "type": "function"658 },659 {660 "inputs": [661 { "internalType": "uint256", "name": "index", "type": "uint256" }662 ],663 "name": "tokenByIndex",664 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],665 "stateMutability": "view",666 "type": "function"667 },668 {669 "inputs": [670 { "internalType": "uint256", "name": "token", "type": "uint256" }671 ],672 "name": "tokenContractAddress",673 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],674 "stateMutability": "view",675 "type": "function"676 },677 {678 "inputs": [679 { "internalType": "address", "name": "owner", "type": "address" },680 { "internalType": "uint256", "name": "index", "type": "uint256" }681 ],682 "name": "tokenOfOwnerByIndex",683 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],684 "stateMutability": "view",685 "type": "function"686 },687 {688 "inputs": [689 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }690 ],691 "name": "tokenURI",692 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],693 "stateMutability": "view",694 "type": "function"695 },696 {697 "inputs": [],698 "name": "totalSupply",699 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],700 "stateMutability": "view",701 "type": "function"702 },703 {704 "inputs": [705 { "internalType": "address", "name": "to", "type": "address" },706 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }707 ],708 "name": "transfer",709 "outputs": [],710 "stateMutability": "nonpayable",711 "type": "function"712 },713 {714 "inputs": [715 {716 "components": [717 { "internalType": "address", "name": "eth", "type": "address" },718 { "internalType": "uint256", "name": "sub", "type": "uint256" }719 ],720 "internalType": "struct EthCrossAccount",721 "name": "to",722 "type": "tuple"723 },724 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }725 ],726 "name": "transferCross",727 "outputs": [],728 "stateMutability": "nonpayable",729 "type": "function"730 },731 {732 "inputs": [733 { "internalType": "address", "name": "from", "type": "address" },734 { "internalType": "address", "name": "to", "type": "address" },735 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }736 ],737 "name": "transferFrom",738 "outputs": [],739 "stateMutability": "nonpayable",740 "type": "function"741 },742 {743 "inputs": [744 {745 "components": [746 { "internalType": "address", "name": "eth", "type": "address" },747 { "internalType": "uint256", "name": "sub", "type": "uint256" }748 ],749 "internalType": "struct EthCrossAccount",750 "name": "from",751 "type": "tuple"752 },753 {754 "components": [755 { "internalType": "address", "name": "eth", "type": "address" },756 { "internalType": "uint256", "name": "sub", "type": "uint256" }757 ],758 "internalType": "struct EthCrossAccount",759 "name": "to",760 "type": "tuple"761 },762 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }763 ],764 "name": "transferFromCross",765 "outputs": [],766 "stateMutability": "nonpayable",767 "type": "function"768 },769 {770 "inputs": [],771 "name": "uniqueCollectionType",772 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],773 "stateMutability": "view",774 "type": "function"775 }776]1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 {86 "components": [87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],90 "internalType": "struct EthCrossAccount",91 "name": "newAdmin",92 "type": "tuple"93 }94 ],95 "name": "addCollectionAdminCross",96 "outputs": [],97 "stateMutability": "nonpayable",98 "type": "function"99 },100 {101 "inputs": [102 {103 "components": [104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],107 "internalType": "struct EthCrossAccount",108 "name": "user",109 "type": "tuple"110 }111 ],112 "name": "addToCollectionAllowListCross",113 "outputs": [],114 "stateMutability": "nonpayable",115 "type": "function"116 },117 {118 "inputs": [119 {120 "components": [121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],124 "internalType": "struct EthCrossAccount",125 "name": "user",126 "type": "tuple"127 }128 ],129 "name": "allowlistedCross",130 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],131 "stateMutability": "view",132 "type": "function"133 },134 {135 "inputs": [136 { "internalType": "address", "name": "approved", "type": "address" },137 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }138 ],139 "name": "approve",140 "outputs": [],141 "stateMutability": "nonpayable",142 "type": "function"143 },144 {145 "inputs": [146 { "internalType": "address", "name": "owner", "type": "address" }147 ],148 "name": "balanceOf",149 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],150 "stateMutability": "view",151 "type": "function"152 },153 {154 "inputs": [155 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }156 ],157 "name": "burn",158 "outputs": [],159 "stateMutability": "nonpayable",160 "type": "function"161 },162 {163 "inputs": [164 {165 "components": [166 { "internalType": "address", "name": "eth", "type": "address" },167 { "internalType": "uint256", "name": "sub", "type": "uint256" }168 ],169 "internalType": "struct EthCrossAccount",170 "name": "from",171 "type": "tuple"172 },173 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }174 ],175 "name": "burnFromCross",176 "outputs": [],177 "stateMutability": "nonpayable",178 "type": "function"179 },180 {181 "inputs": [182 {183 "components": [184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],187 "internalType": "struct EthCrossAccount",188 "name": "newOwner",189 "type": "tuple"190 }191 ],192 "name": "changeCollectionOwnerCross",193 "outputs": [],194 "stateMutability": "nonpayable",195 "type": "function"196 },197 {198 "inputs": [],199 "name": "collectionAdmins",200 "outputs": [201 {202 "components": [203 { "internalType": "address", "name": "eth", "type": "address" },204 { "internalType": "uint256", "name": "sub", "type": "uint256" }205 ],206 "internalType": "struct EthCrossAccount[]",207 "name": "",208 "type": "tuple[]"209 }210 ],211 "stateMutability": "view",212 "type": "function"213 },214 {215 "inputs": [],216 "name": "collectionHelperAddress",217 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],218 "stateMutability": "view",219 "type": "function"220 },221 {222 "inputs": [],223 "name": "collectionOwner",224 "outputs": [225 {226 "components": [227 { "internalType": "address", "name": "eth", "type": "address" },228 { "internalType": "uint256", "name": "sub", "type": "uint256" }229 ],230 "internalType": "struct EthCrossAccount",231 "name": "",232 "type": "tuple"233 }234 ],235 "stateMutability": "view",236 "type": "function"237 },238 {239 "inputs": [240 { "internalType": "string[]", "name": "keys", "type": "string[]" }241 ],242 "name": "collectionProperties",243 "outputs": [244 {245 "components": [246 { "internalType": "string", "name": "key", "type": "string" },247 { "internalType": "bytes", "name": "value", "type": "bytes" }248 ],249 "internalType": "struct Property[]",250 "name": "",251 "type": "tuple[]"252 }253 ],254 "stateMutability": "view",255 "type": "function"256 },257 {258 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],259 "name": "collectionProperty",260 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],261 "stateMutability": "view",262 "type": "function"263 },264 {265 "inputs": [],266 "name": "collectionSponsor",267 "outputs": [268 {269 "components": [270 { "internalType": "address", "name": "field_0", "type": "address" },271 { "internalType": "uint256", "name": "field_1", "type": "uint256" }272 ],273 "internalType": "struct Tuple29",274 "name": "",275 "type": "tuple"276 }277 ],278 "stateMutability": "view",279 "type": "function"280 },281 {282 "inputs": [],283 "name": "confirmCollectionSponsorship",284 "outputs": [],285 "stateMutability": "nonpayable",286 "type": "function"287 },288 {289 "inputs": [],290 "name": "contractAddress",291 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],292 "stateMutability": "view",293 "type": "function"294 },295 {296 "inputs": [297 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }298 ],299 "name": "crossOwnerOf",300 "outputs": [301 {302 "components": [303 { "internalType": "address", "name": "eth", "type": "address" },304 { "internalType": "uint256", "name": "sub", "type": "uint256" }305 ],306 "internalType": "struct EthCrossAccount",307 "name": "",308 "type": "tuple"309 }310 ],311 "stateMutability": "view",312 "type": "function"313 },314 {315 "inputs": [316 { "internalType": "string[]", "name": "keys", "type": "string[]" }317 ],318 "name": "deleteCollectionProperties",319 "outputs": [],320 "stateMutability": "nonpayable",321 "type": "function"322 },323 {324 "inputs": [325 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },326 { "internalType": "string[]", "name": "keys", "type": "string[]" }327 ],328 "name": "deleteProperties",329 "outputs": [],330 "stateMutability": "nonpayable",331 "type": "function"332 },333 {334 "inputs": [],335 "name": "description",336 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],337 "stateMutability": "view",338 "type": "function"339 },340 {341 "inputs": [],342 "name": "finishMinting",343 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],344 "stateMutability": "nonpayable",345 "type": "function"346 },347 {348 "inputs": [349 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }350 ],351 "name": "getApproved",352 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],353 "stateMutability": "view",354 "type": "function"355 },356 {357 "inputs": [],358 "name": "hasCollectionPendingSponsor",359 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],360 "stateMutability": "view",361 "type": "function"362 },363 {364 "inputs": [365 { "internalType": "address", "name": "owner", "type": "address" },366 { "internalType": "address", "name": "operator", "type": "address" }367 ],368 "name": "isApprovedForAll",369 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],370 "stateMutability": "view",371 "type": "function"372 },373 {374 "inputs": [375 {376 "components": [377 { "internalType": "address", "name": "eth", "type": "address" },378 { "internalType": "uint256", "name": "sub", "type": "uint256" }379 ],380 "internalType": "struct EthCrossAccount",381 "name": "user",382 "type": "tuple"383 }384 ],385 "name": "isOwnerOrAdminCross",386 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],387 "stateMutability": "view",388 "type": "function"389 },390 {391 "inputs": [{ "internalType": "address", "name": "to", "type": "address" }],392 "name": "mint",393 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],394 "stateMutability": "nonpayable",395 "type": "function"396 },397 {398 "inputs": [399 { "internalType": "address", "name": "to", "type": "address" },400 { "internalType": "string", "name": "tokenUri", "type": "string" }401 ],402 "name": "mintWithTokenURI",403 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],404 "stateMutability": "nonpayable",405 "type": "function"406 },407 {408 "inputs": [],409 "name": "mintingFinished",410 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],411 "stateMutability": "view",412 "type": "function"413 },414 {415 "inputs": [],416 "name": "name",417 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],418 "stateMutability": "view",419 "type": "function"420 },421 {422 "inputs": [],423 "name": "nextTokenId",424 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],425 "stateMutability": "view",426 "type": "function"427 },428 {429 "inputs": [430 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }431 ],432 "name": "ownerOf",433 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],434 "stateMutability": "view",435 "type": "function"436 },437 {438 "inputs": [439 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },440 { "internalType": "string[]", "name": "keys", "type": "string[]" }441 ],442 "name": "properties",443 "outputs": [444 {445 "components": [446 { "internalType": "string", "name": "key", "type": "string" },447 { "internalType": "bytes", "name": "value", "type": "bytes" }448 ],449 "internalType": "struct Property[]",450 "name": "",451 "type": "tuple[]"452 }453 ],454 "stateMutability": "view",455 "type": "function"456 },457 {458 "inputs": [459 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },460 { "internalType": "string", "name": "key", "type": "string" }461 ],462 "name": "property",463 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],464 "stateMutability": "view",465 "type": "function"466 },467 {468 "inputs": [469 {470 "components": [471 { "internalType": "address", "name": "eth", "type": "address" },472 { "internalType": "uint256", "name": "sub", "type": "uint256" }473 ],474 "internalType": "struct EthCrossAccount",475 "name": "admin",476 "type": "tuple"477 }478 ],479 "name": "removeCollectionAdminCross",480 "outputs": [],481 "stateMutability": "nonpayable",482 "type": "function"483 },484 {485 "inputs": [],486 "name": "removeCollectionSponsor",487 "outputs": [],488 "stateMutability": "nonpayable",489 "type": "function"490 },491 {492 "inputs": [493 {494 "components": [495 { "internalType": "address", "name": "eth", "type": "address" },496 { "internalType": "uint256", "name": "sub", "type": "uint256" }497 ],498 "internalType": "struct EthCrossAccount",499 "name": "user",500 "type": "tuple"501 }502 ],503 "name": "removeFromCollectionAllowListCross",504 "outputs": [],505 "stateMutability": "nonpayable",506 "type": "function"507 },508 {509 "inputs": [510 { "internalType": "address", "name": "from", "type": "address" },511 { "internalType": "address", "name": "to", "type": "address" },512 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }513 ],514 "name": "safeTransferFrom",515 "outputs": [],516 "stateMutability": "nonpayable",517 "type": "function"518 },519 {520 "inputs": [521 { "internalType": "address", "name": "from", "type": "address" },522 { "internalType": "address", "name": "to", "type": "address" },523 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },524 { "internalType": "bytes", "name": "data", "type": "bytes" }525 ],526 "name": "safeTransferFromWithData",527 "outputs": [],528 "stateMutability": "nonpayable",529 "type": "function"530 },531 {532 "inputs": [533 { "internalType": "address", "name": "operator", "type": "address" },534 { "internalType": "bool", "name": "approved", "type": "bool" }535 ],536 "name": "setApprovalForAll",537 "outputs": [],538 "stateMutability": "nonpayable",539 "type": "function"540 },541 {542 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],543 "name": "setCollectionAccess",544 "outputs": [],545 "stateMutability": "nonpayable",546 "type": "function"547 },548 {549 "inputs": [550 { "internalType": "string", "name": "limit", "type": "string" },551 { "internalType": "uint256", "name": "value", "type": "uint256" }552 ],553 "name": "setCollectionLimit",554 "outputs": [],555 "stateMutability": "nonpayable",556 "type": "function"557 },558 {559 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],560 "name": "setCollectionMintMode",561 "outputs": [],562 "stateMutability": "nonpayable",563 "type": "function"564 },565 {566 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],567 "name": "setCollectionNesting",568 "outputs": [],569 "stateMutability": "nonpayable",570 "type": "function"571 },572 {573 "inputs": [574 { "internalType": "bool", "name": "enable", "type": "bool" },575 {576 "internalType": "address[]",577 "name": "collections",578 "type": "address[]"579 }580 ],581 "name": "setCollectionNesting",582 "outputs": [],583 "stateMutability": "nonpayable",584 "type": "function"585 },586 {587 "inputs": [588 {589 "components": [590 { "internalType": "string", "name": "key", "type": "string" },591 { "internalType": "bytes", "name": "value", "type": "bytes" }592 ],593 "internalType": "struct Property[]",594 "name": "properties",595 "type": "tuple[]"596 }597 ],598 "name": "setCollectionProperties",599 "outputs": [],600 "stateMutability": "nonpayable",601 "type": "function"602 },603 {604 "inputs": [605 {606 "components": [607 { "internalType": "address", "name": "eth", "type": "address" },608 { "internalType": "uint256", "name": "sub", "type": "uint256" }609 ],610 "internalType": "struct EthCrossAccount",611 "name": "sponsor",612 "type": "tuple"613 }614 ],615 "name": "setCollectionSponsorCross",616 "outputs": [],617 "stateMutability": "nonpayable",618 "type": "function"619 },620 {621 "inputs": [622 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },623 {624 "components": [625 { "internalType": "string", "name": "key", "type": "string" },626 { "internalType": "bytes", "name": "value", "type": "bytes" }627 ],628 "internalType": "struct Property[]",629 "name": "properties",630 "type": "tuple[]"631 }632 ],633 "name": "setProperties",634 "outputs": [],635 "stateMutability": "nonpayable",636 "type": "function"637 },638 {639 "inputs": [640 { "internalType": "string", "name": "key", "type": "string" },641 { "internalType": "bool", "name": "isMutable", "type": "bool" },642 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },643 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }644 ],645 "name": "setTokenPropertyPermission",646 "outputs": [],647 "stateMutability": "nonpayable",648 "type": "function"649 },650 {651 "inputs": [652 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }653 ],654 "name": "supportsInterface",655 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],656 "stateMutability": "view",657 "type": "function"658 },659 {660 "inputs": [],661 "name": "symbol",662 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],663 "stateMutability": "view",664 "type": "function"665 },666 {667 "inputs": [668 { "internalType": "uint256", "name": "index", "type": "uint256" }669 ],670 "name": "tokenByIndex",671 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],672 "stateMutability": "view",673 "type": "function"674 },675 {676 "inputs": [677 { "internalType": "uint256", "name": "token", "type": "uint256" }678 ],679 "name": "tokenContractAddress",680 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],681 "stateMutability": "view",682 "type": "function"683 },684 {685 "inputs": [686 { "internalType": "address", "name": "owner", "type": "address" },687 { "internalType": "uint256", "name": "index", "type": "uint256" }688 ],689 "name": "tokenOfOwnerByIndex",690 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],691 "stateMutability": "view",692 "type": "function"693 },694 {695 "inputs": [696 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }697 ],698 "name": "tokenURI",699 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],700 "stateMutability": "view",701 "type": "function"702 },703 {704 "inputs": [],705 "name": "totalSupply",706 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],707 "stateMutability": "view",708 "type": "function"709 },710 {711 "inputs": [712 { "internalType": "address", "name": "to", "type": "address" },713 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }714 ],715 "name": "transfer",716 "outputs": [],717 "stateMutability": "nonpayable",718 "type": "function"719 },720 {721 "inputs": [722 {723 "components": [724 { "internalType": "address", "name": "eth", "type": "address" },725 { "internalType": "uint256", "name": "sub", "type": "uint256" }726 ],727 "internalType": "struct EthCrossAccount",728 "name": "to",729 "type": "tuple"730 },731 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }732 ],733 "name": "transferCross",734 "outputs": [],735 "stateMutability": "nonpayable",736 "type": "function"737 },738 {739 "inputs": [740 { "internalType": "address", "name": "from", "type": "address" },741 { "internalType": "address", "name": "to", "type": "address" },742 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }743 ],744 "name": "transferFrom",745 "outputs": [],746 "stateMutability": "nonpayable",747 "type": "function"748 },749 {750 "inputs": [751 {752 "components": [753 { "internalType": "address", "name": "eth", "type": "address" },754 { "internalType": "uint256", "name": "sub", "type": "uint256" }755 ],756 "internalType": "struct EthCrossAccount",757 "name": "from",758 "type": "tuple"759 },760 {761 "components": [762 { "internalType": "address", "name": "eth", "type": "address" },763 { "internalType": "uint256", "name": "sub", "type": "uint256" }764 ],765 "internalType": "struct EthCrossAccount",766 "name": "to",767 "type": "tuple"768 },769 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }770 ],771 "name": "transferFromCross",772 "outputs": [],773 "stateMutability": "nonpayable",774 "type": "function"775 },776 {777 "inputs": [],778 "name": "uniqueCollectionType",779 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],780 "stateMutability": "view",781 "type": "function"782 }783]tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -354,7 +354,7 @@
event Approval(address indexed owner, address indexed spender, uint256 value);
}
-/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+/// @dev the ERC-165 identifier for this interface is 0x8cb847c4
interface ERC20 is Dummy, ERC165, ERC20Events {
/// @dev EVM selector for this function is: 0x06fdde03,
/// or in textual repr: name()
@@ -395,6 +395,11 @@
/// @dev EVM selector for this function is: 0xdd62ed3e,
/// or in textual repr: allowance(address,address)
function allowance(address owner, address spender) external view returns (uint256);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -605,7 +605,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+/// @dev the ERC-165 identifier for this interface is 0x983a942b
interface ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all NFTs assigned to an owner
/// @dev NFTs assigned to the zero address are considered invalid, and this
@@ -685,6 +685,11 @@
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (address);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueNFT is
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -604,7 +604,7 @@
/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-/// @dev the ERC-165 identifier for this interface is 0x58800161
+/// @dev the ERC-165 identifier for this interface is 0x4016cd87
interface ERC721 is Dummy, ERC165, ERC721Events {
/// @notice Count all RFTs assigned to an owner
/// @dev RFTs assigned to the zero address are considered invalid, and this
@@ -682,6 +682,11 @@
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (address);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
interface UniqueRefungible is
tests/src/eth/collectionHelperAddress.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/collectionHelperAddress.test.ts
@@ -0,0 +1,57 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+import {itEth, usingEthPlaygrounds, expect} from './util';
+import {IKeyringPair} from '@polkadot/types/types';
+
+const EVM_COLLECTION_HELPERS_ADDRESS = '0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f';
+
+describe('[eth]CollectionHelerpAddress test: ERC721 ', () => {
+ let donor: IKeyringPair;
+
+ before(async function() {
+ await usingEthPlaygrounds(async (helper, privateKey) => {
+ donor = await privateKey({filename: __filename});
+ });
+ });
+
+ itEth('NFT\\RFT', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionAddress: nftCollectionAddress} = await helper.eth.createNFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC');
+ const nftCollection = helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner);
+
+ const {collectionAddress: rftCollectionAddress} = await helper.eth.createRFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC');
+ const rftCollection = helper.ethNativeContract.collection(rftCollectionAddress, 'rft', owner);
+
+ expect((await nftCollection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+
+ expect((await rftCollection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+ });
+
+ itEth('FT', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Sponsor', 18, 'absolutely anything', 'ROC');
+ const collection = helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
+
+ expect((await collection.methods.collectionHelperAddress().call())
+ .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS);
+ });
+
+});