difftreelog
Merge pull request #598 from UniqueNetwork/fix/rename_method_to_collectionSponsor
in: master
24 files changed
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -194,7 +194,7 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- fn get_collection_sponsor(&self) -> Result<(address, uint256)> {
+ fn collection_sponsor(&self) -> Result<(address, uint256)> {
let sponsor = match self.collection.sponsorship.sponsor() {
Some(sponsor) => sponsor,
None => return Ok(Default::default()),
pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -169,7 +169,7 @@
///
/// @param contractAddress The contract for which a sponsor is requested.
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- fn get_sponsor(&self, contract_address: address) -> Result<(address, uint256)> {
+ fn sponsor(&self, contract_address: address) -> Result<(address, uint256)> {
let sponsor =
Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?;
Ok(pallet_common::eth::convert_cross_account_to_tuple::<T>(
@@ -220,7 +220,7 @@
/// Get current contract sponsoring rate limit
/// @param contractAddress Contract to get sponsoring rate limit of
/// @return uint32 Amount of blocks between two sponsored transactions
- fn get_sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {
+ fn sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {
self.recorder().consume_sload()?;
Ok(<SponsoringRateLimit<T>>::get(contract_address)
@@ -273,7 +273,7 @@
/// @param contractAddress Contract to get sponsoring fee limit of
/// @return uint256 Maximum amount of fee that could be spent by single
/// transaction
- fn get_sponsoring_fee_limit(&self, contract_address: address) -> Result<uint256> {
+ fn sponsoring_fee_limit(&self, contract_address: address) -> Result<uint256> {
self.recorder().consume_sload()?;
Ok(get_sponsoring_fee_limit::<T>(contract_address))
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -10,11 +10,7 @@
}
contract ERC165 is Dummy {
- function supportsInterface(bytes4 interfaceID)
- external
- view
- returns (bool)
- {
+ function supportsInterface(bytes4 interfaceID) external view returns (bool) {
require(false, stub_error);
interfaceID;
return true;
@@ -24,15 +20,12 @@
/// @dev inlined interface
contract ContractHelpersEvents {
event ContractSponsorSet(address indexed contractAddress, address sponsor);
- event ContractSponsorshipConfirmed(
- address indexed contractAddress,
- address sponsor
- );
+ event ContractSponsorshipConfirmed(address indexed contractAddress, address sponsor);
event ContractSponsorRemoved(address indexed contractAddress);
}
/// @title Magic contract, which allows users to reconfigure other contracts
-/// @dev the ERC-165 identifier for this interface is 0x172cb4fb
+/// @dev the ERC-165 identifier for this interface is 0x30afad04
contract ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
/// Get user, which deployed specified contract
/// @dev May return zero address in case if contract is deployed
@@ -43,11 +36,7 @@
/// @return address Owner of contract
/// @dev EVM selector for this function is: 0x5152b14c,
/// or in textual repr: contractOwner(address)
- function contractOwner(address contractAddress)
- public
- view
- returns (address)
- {
+ function contractOwner(address contractAddress) public view returns (address) {
require(false, stub_error);
contractAddress;
dummy;
@@ -105,13 +94,9 @@
///
/// @param contractAddress The contract for which a sponsor is requested.
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0x743fc745,
- /// or in textual repr: getSponsor(address)
- function getSponsor(address contractAddress)
- public
- view
- returns (Tuple0 memory)
- {
+ /// @dev EVM selector for this function is: 0x766c4f37,
+ /// or in textual repr: sponsor(address)
+ function sponsor(address contractAddress) public view returns (Tuple0 memory) {
require(false, stub_error);
contractAddress;
dummy;
@@ -137,11 +122,7 @@
/// @return **true** if contract has pending sponsor.
/// @dev EVM selector for this function is: 0x39b9b242,
/// or in textual repr: hasPendingSponsor(address)
- function hasPendingSponsor(address contractAddress)
- public
- view
- returns (bool)
- {
+ function hasPendingSponsor(address contractAddress) public view returns (bool) {
require(false, stub_error);
contractAddress;
dummy;
@@ -150,11 +131,7 @@
/// @dev EVM selector for this function is: 0x6027dc61,
/// or in textual repr: sponsoringEnabled(address)
- function sponsoringEnabled(address contractAddress)
- public
- view
- returns (bool)
- {
+ function sponsoringEnabled(address contractAddress) public view returns (bool) {
require(false, stub_error);
contractAddress;
dummy;
@@ -173,13 +150,9 @@
/// Get current contract sponsoring rate limit
/// @param contractAddress Contract to get sponsoring rate limit of
/// @return uint32 Amount of blocks between two sponsored transactions
- /// @dev EVM selector for this function is: 0x610cfabd,
- /// or in textual repr: getSponsoringRateLimit(address)
- function getSponsoringRateLimit(address contractAddress)
- public
- view
- returns (uint32)
- {
+ /// @dev EVM selector for this function is: 0xf29694d8,
+ /// or in textual repr: sponsoringRateLimit(address)
+ function sponsoringRateLimit(address contractAddress) public view returns (uint32) {
require(false, stub_error);
contractAddress;
dummy;
@@ -194,9 +167,7 @@
/// @dev Only contract owner can change this setting
/// @dev EVM selector for this function is: 0x77b6c908,
/// or in textual repr: setSponsoringRateLimit(address,uint32)
- function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
- public
- {
+ function setSponsoringRateLimit(address contractAddress, uint32 rateLimit) public {
require(false, stub_error);
contractAddress;
rateLimit;
@@ -211,9 +182,7 @@
/// @dev Only contract owner can change this setting
/// @dev EVM selector for this function is: 0x03aed665,
/// or in textual repr: setSponsoringFeeLimit(address,uint256)
- function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit)
- public
- {
+ function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit) public {
require(false, stub_error);
contractAddress;
feeLimit;
@@ -224,13 +193,9 @@
/// @param contractAddress Contract to get sponsoring fee limit of
/// @return uint256 Maximum amount of fee that could be spent by single
/// transaction
- /// @dev EVM selector for this function is: 0xc3fdc9ee,
- /// or in textual repr: getSponsoringFeeLimit(address)
- function getSponsoringFeeLimit(address contractAddress)
- public
- view
- returns (uint256)
- {
+ /// @dev EVM selector for this function is: 0x75b73606,
+ /// or in textual repr: sponsoringFeeLimit(address)
+ function sponsoringFeeLimit(address contractAddress) public view returns (uint256) {
require(false, stub_error);
contractAddress;
dummy;
@@ -244,11 +209,7 @@
/// @return bool Is specified users exists in contract allowlist
/// @dev EVM selector for this function is: 0x5c658165,
/// or in textual repr: allowed(address,address)
- function allowed(address contractAddress, address user)
- public
- view
- returns (bool)
- {
+ function allowed(address contractAddress, address user) public view returns (bool) {
require(false, stub_error);
contractAddress;
user;
@@ -284,11 +245,7 @@
/// @return bool Is specified contract has allowlist access enabled
/// @dev EVM selector for this function is: 0xc772ef6c,
/// or in textual repr: allowlistEnabled(address)
- function allowlistEnabled(address contractAddress)
- public
- view
- returns (bool)
- {
+ function allowlistEnabled(address contractAddress) public view returns (bool) {
require(false, stub_error);
contractAddress;
dummy;
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -10,11 +10,7 @@
}
contract ERC165 is Dummy {
- function supportsInterface(bytes4 interfaceID)
- external
- view
- returns (bool)
- {
+ function supportsInterface(bytes4 interfaceID) external view returns (bool) {
require(false, stub_error);
interfaceID;
return true;
@@ -22,7 +18,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x9f70d4e0
+/// @dev the ERC-165 identifier for this interface is 0x47dbc105
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -30,9 +26,7 @@
/// @param value Propery value.
/// @dev EVM selector for this function is: 0x2f073f66,
/// or in textual repr: setCollectionProperty(string,bytes)
- function setCollectionProperty(string memory key, bytes memory value)
- public
- {
+ function setCollectionProperty(string memory key, bytes memory value) public {
require(false, stub_error);
key;
value;
@@ -58,11 +52,7 @@
/// @return bytes The property corresponding to the key.
/// @dev EVM selector for this function is: 0xcf24fd6d,
/// or in textual repr: collectionProperty(string)
- function collectionProperty(string memory key)
- public
- view
- returns (bytes memory)
- {
+ function collectionProperty(string memory key) public view returns (bytes memory) {
require(false, stub_error);
key;
dummy;
@@ -95,6 +85,7 @@
dummy = 0;
}
+ /// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
function hasCollectionPendingSponsor() public view returns (bool) {
@@ -124,9 +115,9 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0xb66bbc14,
- /// or in textual repr: getCollectionSponsor()
- function getCollectionSponsor() public view returns (Tuple6 memory) {
+ /// @dev EVM selector for this function is: 0x6ec0a9f1,
+ /// or in textual repr: collectionSponsor()
+ function collectionSponsor() public view returns (Tuple6 memory) {
require(false, stub_error);
dummy;
return Tuple6(0x0000000000000000000000000000000000000000, 0);
@@ -234,9 +225,7 @@
/// @param collections Addresses of collections that will be available for nesting.
/// @dev EVM selector for this function is: 0x64872396,
/// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections)
- public
- {
+ function setCollectionNesting(bool enable, address[] memory collections) public {
require(false, stub_error);
enable;
collections;
@@ -353,9 +342,9 @@
/// @return `Fungible` or `NFT` or `ReFungible`
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
- function uniqueCollectionType() public returns (string memory) {
+ function uniqueCollectionType() public view returns (string memory) {
require(false, stub_error);
- dummy = 0;
+ dummy;
return "";
}
@@ -450,11 +439,7 @@
/// @dev inlined interface
contract ERC20Events {
event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
+ event Approval(address indexed owner, address indexed spender, uint256 value);
}
/// @dev the ERC-165 identifier for this interface is 0x942e8b22
@@ -537,11 +522,7 @@
/// @dev EVM selector for this function is: 0xdd62ed3e,
/// or in textual repr: allowance(address,address)
- function allowance(address owner, address spender)
- public
- view
- returns (uint256)
- {
+ function allowance(address owner, address spender) public view returns (uint256) {
require(false, stub_error);
owner;
spender;
@@ -550,11 +531,4 @@
}
}
-contract UniqueFungible is
- Dummy,
- ERC165,
- ERC20,
- ERC20Mintable,
- ERC20UniqueExtensions,
- Collection
-{}
+contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -10,11 +10,7 @@
}
contract ERC165 is Dummy {
- function supportsInterface(bytes4 interfaceID)
- external
- view
- returns (bool)
- {
+ function supportsInterface(bytes4 interfaceID) external view returns (bool) {
require(false, stub_error);
interfaceID;
return true;
@@ -85,11 +81,7 @@
/// @return Property value bytes
/// @dev EVM selector for this function is: 0x7228c327,
/// or in textual repr: property(uint256,string)
- function property(uint256 tokenId, string memory key)
- public
- view
- returns (bytes memory)
- {
+ function property(uint256 tokenId, string memory key) public view returns (bytes memory) {
require(false, stub_error);
tokenId;
key;
@@ -99,7 +91,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x9f70d4e0
+/// @dev the ERC-165 identifier for this interface is 0x47dbc105
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -107,9 +99,7 @@
/// @param value Propery value.
/// @dev EVM selector for this function is: 0x2f073f66,
/// or in textual repr: setCollectionProperty(string,bytes)
- function setCollectionProperty(string memory key, bytes memory value)
- public
- {
+ function setCollectionProperty(string memory key, bytes memory value) public {
require(false, stub_error);
key;
value;
@@ -135,11 +125,7 @@
/// @return bytes The property corresponding to the key.
/// @dev EVM selector for this function is: 0xcf24fd6d,
/// or in textual repr: collectionProperty(string)
- function collectionProperty(string memory key)
- public
- view
- returns (bytes memory)
- {
+ function collectionProperty(string memory key) public view returns (bytes memory) {
require(false, stub_error);
key;
dummy;
@@ -172,6 +158,7 @@
dummy = 0;
}
+ /// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
function hasCollectionPendingSponsor() public view returns (bool) {
@@ -201,9 +188,9 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0xb66bbc14,
- /// or in textual repr: getCollectionSponsor()
- function getCollectionSponsor() public view returns (Tuple17 memory) {
+ /// @dev EVM selector for this function is: 0x6ec0a9f1,
+ /// or in textual repr: collectionSponsor()
+ function collectionSponsor() public view returns (Tuple17 memory) {
require(false, stub_error);
dummy;
return Tuple17(0x0000000000000000000000000000000000000000, 0);
@@ -311,9 +298,7 @@
/// @param collections Addresses of collections that will be available for nesting.
/// @dev EVM selector for this function is: 0x64872396,
/// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections)
- public
- {
+ function setCollectionNesting(bool enable, address[] memory collections) public {
require(false, stub_error);
enable;
collections;
@@ -430,9 +415,9 @@
/// @return `Fungible` or `NFT` or `ReFungible`
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
- function uniqueCollectionType() public returns (string memory) {
+ function uniqueCollectionType() public view returns (string memory) {
require(false, stub_error);
- dummy = 0;
+ dummy;
return "";
}
@@ -605,10 +590,7 @@
/// @param tokenIds IDs of the minted NFTs
/// @dev EVM selector for this function is: 0x44a9945e,
/// or in textual repr: mintBulk(address,uint256[])
- function mintBulk(address to, uint256[] memory tokenIds)
- public
- returns (bool)
- {
+ function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {
require(false, stub_error);
to;
tokenIds;
@@ -623,10 +605,7 @@
/// @param tokens array of pairs of token ID and token URI for minted tokens
/// @dev EVM selector for this function is: 0x36543006,
/// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
- function mintBulkWithTokenURI(address to, Tuple8[] memory tokens)
- public
- returns (bool)
- {
+ function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {
require(false, stub_error);
to;
tokens;
@@ -661,11 +640,7 @@
/// @dev Not implemented
/// @dev EVM selector for this function is: 0x2f745c59,
/// or in textual repr: tokenOfOwnerByIndex(address,uint256)
- function tokenOfOwnerByIndex(address owner, uint256 index)
- public
- view
- returns (uint256)
- {
+ function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
require(false, stub_error);
owner;
index;
@@ -728,21 +703,9 @@
/// @dev inlined interface
contract ERC721Events {
- event Transfer(
- address indexed from,
- address indexed to,
- uint256 indexed tokenId
- );
- event Approval(
- address indexed owner,
- address indexed approved,
- uint256 indexed tokenId
- );
- event ApprovalForAll(
- address indexed owner,
- address indexed operator,
- bool approved
- );
+ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
+ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
+ event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
}
/// @title ERC-721 Non-Fungible Token Standard
@@ -870,11 +833,7 @@
/// @dev Not implemented
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
- function isApprovedForAll(address owner, address operator)
- public
- view
- returns (address)
- {
+ function isApprovedForAll(address owner, address operator) public view returns (address) {
require(false, stub_error);
owner;
operator;
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth99}91}10092101/// @title A contract that allows you to work with collections.93/// @title A contract that allows you to work with collections.102/// @dev the ERC-165 identifier for this interface is 0x9f70d4e094/// @dev the ERC-165 identifier for this interface is 0x47dbc105103contract Collection is Dummy, ERC165 {95contract Collection is Dummy, ERC165 {104 /// Set collection property.96 /// Set collection property.105 ///97 ///172 dummy = 0;158 dummy = 0;173 }159 }174160161 /// Whether there is a pending sponsor.175 /// @dev EVM selector for this function is: 0x058ac185,162 /// @dev EVM selector for this function is: 0x058ac185,176 /// or in textual repr: hasCollectionPendingSponsor()163 /// or in textual repr: hasCollectionPendingSponsor()177 function hasCollectionPendingSponsor() public view returns (bool) {164 function hasCollectionPendingSponsor() public view returns (bool) {201 /// Get current sponsor.188 /// Get current sponsor.202 ///189 ///203 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.190 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.204 /// @dev EVM selector for this function is: 0xb66bbc14,191 /// @dev EVM selector for this function is: 0x6ec0a9f1,205 /// or in textual repr: getCollectionSponsor()192 /// or in textual repr: collectionSponsor()206 function getCollectionSponsor() public view returns (Tuple17 memory) {193 function collectionSponsor() public view returns (Tuple17 memory) {207 require(false, stub_error);194 require(false, stub_error);208 dummy;195 dummy;209 return Tuple17(0x0000000000000000000000000000000000000000, 0);196 return Tuple17(0x0000000000000000000000000000000000000000, 0);430 /// @return `Fungible` or `NFT` or `ReFungible`415 /// @return `Fungible` or `NFT` or `ReFungible`431 /// @dev EVM selector for this function is: 0xd34b55b8,416 /// @dev EVM selector for this function is: 0xd34b55b8,432 /// or in textual repr: uniqueCollectionType()417 /// or in textual repr: uniqueCollectionType()433 function uniqueCollectionType() public returns (string memory) {418 function uniqueCollectionType() public view returns (string memory) {434 require(false, stub_error);419 require(false, stub_error);435 dummy = 0;420 dummy;436 return "";421 return "";437 }422 }438423pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
@@ -10,11 +10,7 @@
}
contract ERC165 is Dummy {
- function supportsInterface(bytes4 interfaceID)
- external
- view
- returns (bool)
- {
+ function supportsInterface(bytes4 interfaceID) external view returns (bool) {
require(false, stub_error);
interfaceID;
return true;
@@ -72,11 +68,7 @@
/// @dev inlined interface
contract ERC20Events {
event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
+ event Approval(address indexed owner, address indexed spender, uint256 value);
}
/// @title Standard ERC20 token
@@ -188,11 +180,7 @@
/// @return A uint256 specifying the amount of tokens still available for the spender.
/// @dev EVM selector for this function is: 0xdd62ed3e,
/// or in textual repr: allowance(address,address)
- function allowance(address owner, address spender)
- public
- view
- returns (uint256)
- {
+ function allowance(address owner, address spender) public view returns (uint256) {
require(false, stub_error);
owner;
spender;
@@ -201,10 +189,4 @@
}
}
-contract UniqueRefungibleToken is
- Dummy,
- ERC165,
- ERC20,
- ERC20UniqueExtensions,
- ERC1633
-{}
+contract UniqueRefungibleToken is Dummy, ERC165, ERC20, ERC20UniqueExtensions, ERC1633 {}
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/api/ContractHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -15,15 +15,12 @@
/// @dev inlined interface
interface ContractHelpersEvents {
event ContractSponsorSet(address indexed contractAddress, address sponsor);
- event ContractSponsorshipConfirmed(
- address indexed contractAddress,
- address sponsor
- );
+ event ContractSponsorshipConfirmed(address indexed contractAddress, address sponsor);
event ContractSponsorRemoved(address indexed contractAddress);
}
/// @title Magic contract, which allows users to reconfigure other contracts
-/// @dev the ERC-165 identifier for this interface is 0x172cb4fb
+/// @dev the ERC-165 identifier for this interface is 0x30afad04
interface ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
/// Get user, which deployed specified contract
/// @dev May return zero address in case if contract is deployed
@@ -34,10 +31,7 @@
/// @return address Owner of contract
/// @dev EVM selector for this function is: 0x5152b14c,
/// or in textual repr: contractOwner(address)
- function contractOwner(address contractAddress)
- external
- view
- returns (address);
+ function contractOwner(address contractAddress) external view returns (address);
/// Set sponsor.
/// @param contractAddress Contract for which a sponsor is being established.
@@ -73,12 +67,9 @@
///
/// @param contractAddress The contract for which a sponsor is requested.
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0x743fc745,
- /// or in textual repr: getSponsor(address)
- function getSponsor(address contractAddress)
- external
- view
- returns (Tuple0 memory);
+ /// @dev EVM selector for this function is: 0x766c4f37,
+ /// or in textual repr: sponsor(address)
+ function sponsor(address contractAddress) external view returns (Tuple0 memory);
/// Check tat contract has confirmed sponsor.
///
@@ -94,17 +85,11 @@
/// @return **true** if contract has pending sponsor.
/// @dev EVM selector for this function is: 0x39b9b242,
/// or in textual repr: hasPendingSponsor(address)
- function hasPendingSponsor(address contractAddress)
- external
- view
- returns (bool);
+ function hasPendingSponsor(address contractAddress) external view returns (bool);
/// @dev EVM selector for this function is: 0x6027dc61,
/// or in textual repr: sponsoringEnabled(address)
- function sponsoringEnabled(address contractAddress)
- external
- view
- returns (bool);
+ function sponsoringEnabled(address contractAddress) external view returns (bool);
/// @dev EVM selector for this function is: 0xfde8a560,
/// or in textual repr: setSponsoringMode(address,uint8)
@@ -113,12 +98,9 @@
/// Get current contract sponsoring rate limit
/// @param contractAddress Contract to get sponsoring rate limit of
/// @return uint32 Amount of blocks between two sponsored transactions
- /// @dev EVM selector for this function is: 0x610cfabd,
- /// or in textual repr: getSponsoringRateLimit(address)
- function getSponsoringRateLimit(address contractAddress)
- external
- view
- returns (uint32);
+ /// @dev EVM selector for this function is: 0xf29694d8,
+ /// or in textual repr: sponsoringRateLimit(address)
+ function sponsoringRateLimit(address contractAddress) external view returns (uint32);
/// Set contract sponsoring rate limit
/// @dev Sponsoring rate limit - is a minimum amount of blocks that should
@@ -128,8 +110,7 @@
/// @dev Only contract owner can change this setting
/// @dev EVM selector for this function is: 0x77b6c908,
/// or in textual repr: setSponsoringRateLimit(address,uint32)
- function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
- external;
+ function setSponsoringRateLimit(address contractAddress, uint32 rateLimit) external;
/// Set contract sponsoring fee limit
/// @dev Sponsoring fee limit - is maximum fee that could be spent by
@@ -139,19 +120,15 @@
/// @dev Only contract owner can change this setting
/// @dev EVM selector for this function is: 0x03aed665,
/// or in textual repr: setSponsoringFeeLimit(address,uint256)
- function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit)
- external;
+ function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit) external;
/// Get current contract sponsoring fee limit
/// @param contractAddress Contract to get sponsoring fee limit of
/// @return uint256 Maximum amount of fee that could be spent by single
/// transaction
- /// @dev EVM selector for this function is: 0xc3fdc9ee,
- /// or in textual repr: getSponsoringFeeLimit(address)
- function getSponsoringFeeLimit(address contractAddress)
- external
- view
- returns (uint256);
+ /// @dev EVM selector for this function is: 0x75b73606,
+ /// or in textual repr: sponsoringFeeLimit(address)
+ function sponsoringFeeLimit(address contractAddress) external view returns (uint256);
/// Is specified user present in contract allow list
/// @dev Contract owner always implicitly included
@@ -160,10 +137,7 @@
/// @return bool Is specified users exists in contract allowlist
/// @dev EVM selector for this function is: 0x5c658165,
/// or in textual repr: allowed(address,address)
- function allowed(address contractAddress, address user)
- external
- view
- returns (bool);
+ function allowed(address contractAddress, address user) external view returns (bool);
/// Toggle user presence in contract allowlist
/// @param contractAddress Contract to change allowlist of
@@ -187,10 +161,7 @@
/// @return bool Is specified contract has allowlist access enabled
/// @dev EVM selector for this function is: 0xc772ef6c,
/// or in textual repr: allowlistEnabled(address)
- function allowlistEnabled(address contractAddress)
- external
- view
- returns (bool);
+ function allowlistEnabled(address contractAddress) external view returns (bool);
/// Toggle contract allowlist access
/// @param contractAddress Contract to change allowlist access of
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x9f70d4e0
+/// @dev the ERC-165 identifier for this interface is 0x47dbc105
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -21,8 +21,7 @@
/// @param value Propery value.
/// @dev EVM selector for this function is: 0x2f073f66,
/// or in textual repr: setCollectionProperty(string,bytes)
- function setCollectionProperty(string memory key, bytes memory value)
- external;
+ function setCollectionProperty(string memory key, bytes memory value) external;
/// Delete collection property.
///
@@ -39,10 +38,7 @@
/// @return bytes The property corresponding to the key.
/// @dev EVM selector for this function is: 0xcf24fd6d,
/// or in textual repr: collectionProperty(string)
- function collectionProperty(string memory key)
- external
- view
- returns (bytes memory);
+ function collectionProperty(string memory key) external view returns (bytes memory);
/// Set the sponsor of the collection.
///
@@ -62,6 +58,7 @@
/// or in textual repr: setCollectionSponsorSubstrate(uint256)
function setCollectionSponsorSubstrate(uint256 sponsor) external;
+ /// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
function hasCollectionPendingSponsor() external view returns (bool);
@@ -81,9 +78,9 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0xb66bbc14,
- /// or in textual repr: getCollectionSponsor()
- function getCollectionSponsor() external view returns (Tuple6 memory);
+ /// @dev EVM selector for this function is: 0x6ec0a9f1,
+ /// or in textual repr: collectionSponsor()
+ function collectionSponsor() external view returns (Tuple6 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -153,8 +150,7 @@
/// @param collections Addresses of collections that will be available for nesting.
/// @dev EVM selector for this function is: 0x64872396,
/// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections)
- external;
+ function setCollectionNesting(bool enable, address[] memory collections) external;
/// Set the collection access method.
/// @param mode Access mode
@@ -227,7 +223,7 @@
/// @return `Fungible` or `NFT` or `ReFungible`
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
- function uniqueCollectionType() external returns (string memory);
+ function uniqueCollectionType() external view returns (string memory);
/// Get collection owner.
///
@@ -291,11 +287,7 @@
/// @dev inlined interface
interface ERC20Events {
event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
+ event Approval(address indexed owner, address indexed spender, uint256 value);
}
/// @dev the ERC-165 identifier for this interface is 0x942e8b22
@@ -338,17 +330,7 @@
/// @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);
+ function allowance(address owner, address spender) external view returns (uint256);
}
-interface UniqueFungible is
- Dummy,
- ERC165,
- ERC20,
- ERC20Mintable,
- ERC20UniqueExtensions,
- Collection
-{}
+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
@@ -58,14 +58,11 @@
/// @return Property value bytes
/// @dev EVM selector for this function is: 0x7228c327,
/// or in textual repr: property(uint256,string)
- function property(uint256 tokenId, string memory key)
- external
- view
- returns (bytes memory);
+ function property(uint256 tokenId, string memory key) external view returns (bytes memory);
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x9f70d4e0
+/// @dev the ERC-165 identifier for this interface is 0x47dbc105
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -73,8 +70,7 @@
/// @param value Propery value.
/// @dev EVM selector for this function is: 0x2f073f66,
/// or in textual repr: setCollectionProperty(string,bytes)
- function setCollectionProperty(string memory key, bytes memory value)
- external;
+ function setCollectionProperty(string memory key, bytes memory value) external;
/// Delete collection property.
///
@@ -91,10 +87,7 @@
/// @return bytes The property corresponding to the key.
/// @dev EVM selector for this function is: 0xcf24fd6d,
/// or in textual repr: collectionProperty(string)
- function collectionProperty(string memory key)
- external
- view
- returns (bytes memory);
+ function collectionProperty(string memory key) external view returns (bytes memory);
/// Set the sponsor of the collection.
///
@@ -114,6 +107,7 @@
/// or in textual repr: setCollectionSponsorSubstrate(uint256)
function setCollectionSponsorSubstrate(uint256 sponsor) external;
+ /// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
function hasCollectionPendingSponsor() external view returns (bool);
@@ -133,9 +127,9 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0xb66bbc14,
- /// or in textual repr: getCollectionSponsor()
- function getCollectionSponsor() external view returns (Tuple17 memory);
+ /// @dev EVM selector for this function is: 0x6ec0a9f1,
+ /// or in textual repr: collectionSponsor()
+ function collectionSponsor() external view returns (Tuple17 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -205,8 +199,7 @@
/// @param collections Addresses of collections that will be available for nesting.
/// @dev EVM selector for this function is: 0x64872396,
/// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections)
- external;
+ function setCollectionNesting(bool enable, address[] memory collections) external;
/// Set the collection access method.
/// @param mode Access mode
@@ -279,7 +272,7 @@
/// @return `Fungible` or `NFT` or `ReFungible`
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
- function uniqueCollectionType() external returns (string memory);
+ function uniqueCollectionType() external view returns (string memory);
/// Get collection owner.
///
@@ -399,9 +392,7 @@
/// @param tokenIds IDs of the minted NFTs
/// @dev EVM selector for this function is: 0x44a9945e,
/// or in textual repr: mintBulk(address,uint256[])
- function mintBulk(address to, uint256[] memory tokenIds)
- external
- returns (bool);
+ function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
/// @notice Function to mint multiple tokens with the given tokenUris.
/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
@@ -410,9 +401,7 @@
/// @param tokens array of pairs of token ID and token URI for minted tokens
/// @dev EVM selector for this function is: 0x36543006,
/// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
- function mintBulkWithTokenURI(address to, Tuple8[] memory tokens)
- external
- returns (bool);
+ function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) external returns (bool);
}
/// @dev anonymous struct
@@ -436,10 +425,7 @@
/// @dev Not implemented
/// @dev EVM selector for this function is: 0x2f745c59,
/// or in textual repr: tokenOfOwnerByIndex(address,uint256)
- function tokenOfOwnerByIndex(address owner, uint256 index)
- external
- view
- returns (uint256);
+ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/// @notice Count NFTs tracked by this contract
/// @return A count of valid NFTs tracked by this contract, where each one of
@@ -479,21 +465,9 @@
/// @dev inlined interface
interface ERC721Events {
- event Transfer(
- address indexed from,
- address indexed to,
- uint256 indexed tokenId
- );
- event Approval(
- address indexed owner,
- address indexed approved,
- uint256 indexed tokenId
- );
- event ApprovalForAll(
- address indexed owner,
- address indexed operator,
- bool approved
- );
+ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
+ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
+ event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
}
/// @title ERC-721 Non-Fungible Token Standard
@@ -577,10 +551,7 @@
/// @dev Not implemented
/// @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);
+ function isApprovedForAll(address owner, address operator) 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
@@ -58,14 +58,11 @@
/// @return Property value bytes
/// @dev EVM selector for this function is: 0x7228c327,
/// or in textual repr: property(uint256,string)
- function property(uint256 tokenId, string memory key)
- external
- view
- returns (bytes memory);
+ function property(uint256 tokenId, string memory key) external view returns (bytes memory);
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x9f70d4e0
+/// @dev the ERC-165 identifier for this interface is 0x47dbc105
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -73,8 +70,7 @@
/// @param value Propery value.
/// @dev EVM selector for this function is: 0x2f073f66,
/// or in textual repr: setCollectionProperty(string,bytes)
- function setCollectionProperty(string memory key, bytes memory value)
- external;
+ function setCollectionProperty(string memory key, bytes memory value) external;
/// Delete collection property.
///
@@ -91,10 +87,7 @@
/// @return bytes The property corresponding to the key.
/// @dev EVM selector for this function is: 0xcf24fd6d,
/// or in textual repr: collectionProperty(string)
- function collectionProperty(string memory key)
- external
- view
- returns (bytes memory);
+ function collectionProperty(string memory key) external view returns (bytes memory);
/// Set the sponsor of the collection.
///
@@ -114,6 +107,7 @@
/// or in textual repr: setCollectionSponsorSubstrate(uint256)
function setCollectionSponsorSubstrate(uint256 sponsor) external;
+ /// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
function hasCollectionPendingSponsor() external view returns (bool);
@@ -133,9 +127,9 @@
/// Get current sponsor.
///
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
- /// @dev EVM selector for this function is: 0xb66bbc14,
- /// or in textual repr: getCollectionSponsor()
- function getCollectionSponsor() external view returns (Tuple17 memory);
+ /// @dev EVM selector for this function is: 0x6ec0a9f1,
+ /// or in textual repr: collectionSponsor()
+ function collectionSponsor() external view returns (Tuple17 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -205,8 +199,7 @@
/// @param collections Addresses of collections that will be available for nesting.
/// @dev EVM selector for this function is: 0x64872396,
/// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections)
- external;
+ function setCollectionNesting(bool enable, address[] memory collections) external;
/// Set the collection access method.
/// @param mode Access mode
@@ -279,7 +272,7 @@
/// @return `Fungible` or `NFT` or `ReFungible`
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
- function uniqueCollectionType() external returns (string memory);
+ function uniqueCollectionType() external view returns (string memory);
/// Get collection owner.
///
@@ -401,9 +394,7 @@
/// @param tokenIds IDs of the minted RFTs
/// @dev EVM selector for this function is: 0x44a9945e,
/// or in textual repr: mintBulk(address,uint256[])
- function mintBulk(address to, uint256[] memory tokenIds)
- external
- returns (bool);
+ function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
/// @notice Function to mint multiple tokens with the given tokenUris.
/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
@@ -412,19 +403,14 @@
/// @param tokens array of pairs of token ID and token URI for minted tokens
/// @dev EVM selector for this function is: 0x36543006,
/// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
- function mintBulkWithTokenURI(address to, Tuple8[] memory tokens)
- external
- returns (bool);
+ function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) external returns (bool);
/// Returns EVM address for refungible token
///
/// @param token ID of the token
/// @dev EVM selector for this function is: 0xab76fac6,
/// or in textual repr: tokenContractAddress(uint256)
- function tokenContractAddress(uint256 token)
- external
- view
- returns (address);
+ function tokenContractAddress(uint256 token) external view returns (address);
}
/// @dev anonymous struct
@@ -448,10 +434,7 @@
/// Not implemented
/// @dev EVM selector for this function is: 0x2f745c59,
/// or in textual repr: tokenOfOwnerByIndex(address,uint256)
- function tokenOfOwnerByIndex(address owner, uint256 index)
- external
- view
- returns (uint256);
+ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/// @notice Count RFTs tracked by this contract
/// @return A count of valid RFTs tracked by this contract, where each one of
@@ -489,21 +472,9 @@
/// @dev inlined interface
interface ERC721Events {
- event Transfer(
- address indexed from,
- address indexed to,
- uint256 indexed tokenId
- );
- event Approval(
- address indexed owner,
- address indexed approved,
- uint256 indexed tokenId
- );
- event ApprovalForAll(
- address indexed owner,
- address indexed operator,
- bool approved
- );
+ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
+ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
+ event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
}
/// @title ERC-721 Non-Fungible Token Standard
@@ -585,10 +556,7 @@
/// @dev Not implemented
/// @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);
+ function isApprovedForAll(address owner, address operator) external view returns (address);
}
interface UniqueRefungible is
tests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungibleToken.sol
+++ b/tests/src/eth/api/UniqueRefungibleToken.sol
@@ -44,11 +44,7 @@
/// @dev inlined interface
interface ERC20Events {
event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
+ event Approval(address indexed owner, address indexed spender, uint256 value);
}
/// @title Standard ERC20 token
@@ -120,16 +116,7 @@
/// @return A uint256 specifying the amount of tokens still available for the spender.
/// @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);
+ function allowance(address owner, address spender) external view returns (uint256);
}
-interface UniqueRefungibleToken is
- Dummy,
- ERC165,
- ERC20,
- ERC20UniqueExtensions,
- ERC1633
-{}
+interface UniqueRefungibleToken is Dummy, ERC165, ERC20, ERC20UniqueExtensions, ERC1633 {}
tests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -56,7 +56,7 @@
await submitTransactionAsync(sponsor, confirmTx);
expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
- const sponsorTuple = await collectionEvm.methods.getCollectionSponsor().call({from: owner});
+ const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
});
@@ -77,7 +77,7 @@
await collectionEvm.methods.removeCollectionSponsor().send({from: owner});
- const sponsorTuple = await collectionEvm.methods.getCollectionSponsor().call({from: owner});
+ const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
expect(sponsorTuple.field_0).to.be.eq('0x0000000000000000000000000000000000000000');
});
tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -223,7 +223,7 @@
const helpers = contractHelpers(web3, owner);
await helpers.methods.selfSponsoredEnable(flipper.options.address).send();
- const result = await helpers.methods.getSponsor(flipper.options.address).call();
+ const result = await helpers.methods.sponsor(flipper.options.address).call();
expect(result[0]).to.be.eq(flipper.options.address);
expect(result[1]).to.be.eq('0');
@@ -237,7 +237,7 @@
await helpers.methods.setSponsor(flipper.options.address, sponsor).send();
await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor});
- const result = await helpers.methods.getSponsor(flipper.options.address).call();
+ const result = await helpers.methods.sponsor(flipper.options.address).call();
expect(result[0]).to.be.eq(sponsor);
expect(result[1]).to.be.eq('0');
@@ -482,7 +482,7 @@
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const flipper = await deployFlipper(web3, owner);
const helpers = contractHelpers(web3, owner);
- expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
+ expect(await helpers.methods.sponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
});
});
@@ -551,7 +551,7 @@
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const flipper = await deployFlipper(web3, owner);
const helpers = contractHelpers(web3, owner);
- expect(await helpers.methods.getSponsoringFeeLimit(flipper.options.address).call()).to.be.equals('115792089237316195423570985008687907853269984665640564039457584007913129639935');
+ expect(await helpers.methods.sponsoringFeeLimit(flipper.options.address).call()).to.be.equals('115792089237316195423570985008687907853269984665640564039457584007913129639935');
});
itWeb3('Set fee limit', async ({api, web3, privateKeyWrapper}) => {
@@ -559,7 +559,7 @@
const flipper = await deployFlipper(web3, owner);
const helpers = contractHelpers(web3, owner);
await helpers.methods.setSponsoringFeeLimit(flipper.options.address, 100).send();
- expect(await helpers.methods.getSponsoringFeeLimit(flipper.options.address).call()).to.be.equals('100');
+ expect(await helpers.methods.sponsoringFeeLimit(flipper.options.address).call()).to.be.equals('100');
});
itWeb3('Negative test - set fee limit by non-owner', async ({api, web3, privateKeyWrapper}) => {
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -159,6 +159,23 @@
},
{
"inputs": [],
+ "name": "collectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple6",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "confirmCollectionSponsorship",
"outputs": [],
"stateMutability": "nonpayable",
@@ -183,23 +200,6 @@
"name": "deleteCollectionProperty",
"outputs": [],
"stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "getCollectionSponsor",
- "outputs": [
- {
- "components": [
- { "internalType": "address", "name": "field_0", "type": "address" },
- { "internalType": "uint256", "name": "field_1", "type": "uint256" }
- ],
- "internalType": "struct Tuple6",
- "name": "",
- "type": "tuple"
- }
- ],
- "stateMutability": "view",
"type": "function"
},
{
@@ -453,7 +453,7 @@
"inputs": [],
"name": "uniqueCollectionType",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
- "stateMutability": "nonpayable",
+ "stateMutability": "view",
"type": "function"
}
]
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -189,6 +189,23 @@
},
{
"inputs": [],
+ "name": "collectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple17",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "confirmCollectionSponsorship",
"outputs": [],
"stateMutability": "nonpayable",
@@ -231,23 +248,6 @@
],
"name": "getApproved",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "getCollectionSponsor",
- "outputs": [
- {
- "components": [
- { "internalType": "address", "name": "field_0", "type": "address" },
- { "internalType": "uint256", "name": "field_1", "type": "uint256" }
- ],
- "internalType": "struct Tuple17",
- "name": "",
- "type": "tuple"
- }
- ],
"stateMutability": "view",
"type": "function"
},
@@ -651,7 +651,7 @@
"inputs": [],
"name": "uniqueCollectionType",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
- "stateMutability": "nonpayable",
+ "stateMutability": "view",
"type": "function"
}
]
tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -189,6 +189,23 @@
},
{
"inputs": [],
+ "name": "collectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple17",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "confirmCollectionSponsorship",
"outputs": [],
"stateMutability": "nonpayable",
@@ -231,23 +248,6 @@
],
"name": "getApproved",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "getCollectionSponsor",
- "outputs": [
- {
- "components": [
- { "internalType": "address", "name": "field_0", "type": "address" },
- { "internalType": "uint256", "name": "field_1", "type": "uint256" }
- ],
- "internalType": "struct Tuple17",
- "name": "",
- "type": "tuple"
- }
- ],
"stateMutability": "view",
"type": "function"
},
@@ -660,7 +660,7 @@
"inputs": [],
"name": "uniqueCollectionType",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
- "stateMutability": "nonpayable",
+ "stateMutability": "view",
"type": "function"
}
]
tests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -111,18 +111,8 @@
"type": "address"
}
],
- "name": "getSponsor",
- "outputs": [
- {
- "components": [
- { "internalType": "address", "name": "field_0", "type": "address" },
- { "internalType": "uint256", "name": "field_1", "type": "uint256" }
- ],
- "internalType": "struct Tuple0",
- "name": "",
- "type": "tuple"
- }
- ],
+ "name": "hasPendingSponsor",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
@@ -134,8 +124,8 @@
"type": "address"
}
],
- "name": "getSponsoringFeeLimit",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
+ "name": "hasSponsor",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
@@ -147,9 +137,9 @@
"type": "address"
}
],
- "name": "getSponsoringRateLimit",
- "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
- "stateMutability": "view",
+ "name": "removeSponsor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -160,9 +150,9 @@
"type": "address"
}
],
- "name": "hasPendingSponsor",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
- "stateMutability": "view",
+ "name": "selfSponsoredEnable",
+ "outputs": [],
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -171,11 +161,12 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- }
+ },
+ { "internalType": "address", "name": "sponsor", "type": "address" }
],
- "name": "hasSponsor",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
- "stateMutability": "view",
+ "name": "setSponsor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -184,9 +175,10 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- }
+ },
+ { "internalType": "uint256", "name": "feeLimit", "type": "uint256" }
],
- "name": "removeSponsor",
+ "name": "setSponsoringFeeLimit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -197,9 +189,10 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- }
+ },
+ { "internalType": "uint8", "name": "mode", "type": "uint8" }
],
- "name": "selfSponsoredEnable",
+ "name": "setSponsoringMode",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -211,9 +204,9 @@
"name": "contractAddress",
"type": "address"
},
- { "internalType": "address", "name": "sponsor", "type": "address" }
+ { "internalType": "uint32", "name": "rateLimit", "type": "uint32" }
],
- "name": "setSponsor",
+ "name": "setSponsoringRateLimit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -224,12 +217,21 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- },
- { "internalType": "uint256", "name": "feeLimit", "type": "uint256" }
+ }
+ ],
+ "name": "sponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple0",
+ "name": "",
+ "type": "tuple"
+ }
],
- "name": "setSponsoringFeeLimit",
- "outputs": [],
- "stateMutability": "nonpayable",
+ "stateMutability": "view",
"type": "function"
},
{
@@ -238,12 +240,11 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- },
- { "internalType": "uint8", "name": "mode", "type": "uint8" }
+ }
],
- "name": "setSponsoringMode",
- "outputs": [],
- "stateMutability": "nonpayable",
+ "name": "sponsoringEnabled",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "view",
"type": "function"
},
{
@@ -252,12 +253,11 @@
"internalType": "address",
"name": "contractAddress",
"type": "address"
- },
- { "internalType": "uint32", "name": "rateLimit", "type": "uint32" }
+ }
],
- "name": "setSponsoringRateLimit",
- "outputs": [],
- "stateMutability": "nonpayable",
+ "name": "sponsoringFeeLimit",
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
+ "stateMutability": "view",
"type": "function"
},
{
@@ -268,8 +268,8 @@
"type": "address"
}
],
- "name": "sponsoringEnabled",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "name": "sponsoringRateLimit",
+ "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
"stateMutability": "view",
"type": "function"
},