difftreelog
Merge pull request #584 from UniqueNetwork/feature/RFT_rename
in: master
16 files changed
.maintain/scripts/generate_sol.shdiffbeforeafterboth--- a/.maintain/scripts/generate_sol.sh
+++ b/.maintain/scripts/generate_sol.sh
@@ -1,11 +1,14 @@
#!/bin/sh
set -eu
+PRETTIER_CONFIG="$(pwd)""/.prettierrc"
+
tmp=$(mktemp)
cargo test --package $PACKAGE -- $NAME --exact --nocapture --ignored | tee $tmp
raw=$(mktemp --suffix .sol)
sed -n '/=== SNIP START ===/, /=== SNIP END ===/{ /=== SNIP START ===/! { /=== SNIP END ===/! p } }' $tmp > $raw
+
formatted=$(mktemp)
-prettier --use-tabs $raw > $formatted
+prettier --config $PRETTIER_CONFIG $raw > $formatted
mv $formatted $OUTPUT
.prettierignorediffbeforeafterboth--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+!**/*.sol
.prettierrcdiffbeforeafterboth--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,16 @@
+{
+ "useTabs": true,
+ "tabWidth": 2,
+ "singleQuote": true,
+ "trailingComma": "all",
+ "overrides": [
+ {
+ "files": "*.sol",
+ "options": {
+ "singleQuote": false,
+ "printWidth": 120,
+ "explicitTypes": "always"
+ }
+ }
+ ]
+}
\ No newline at end of file
pallets/unique/CHANGELOG.mddiffbeforeafterboth--- a/pallets/unique/CHANGELOG.md
+++ b/pallets/unique/CHANGELOG.md
@@ -4,6 +4,11 @@
<!-- bureaucrate goes here -->
+## [v0.2.0] 2022-09-13
+
+### Changes
+- Change **collectionHelper** method `createRefungibleCollection` to `createRFTCollection`,
+
## [v0.1.4] 2022-09-05
### Added
pallets/unique/Cargo.tomldiffbeforeafterboth--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -9,7 +9,7 @@
license = 'GPLv3'
name = 'pallet-unique'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = "0.1.4"
+version = "0.2.0"
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
pallets/unique/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -245,6 +245,7 @@
}
#[weight(<SelfWeightOf<T>>::create_collection())]
+ #[solidity(rename_selector = "createRFTCollection")]
fn create_refungible_collection(
&mut self,
caller: caller,
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.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;
@@ -23,14 +19,11 @@
/// @dev inlined interface
contract CollectionHelpersEvents {
- event CollectionCreated(
- address indexed owner,
- address indexed collectionId
- );
+ event CollectionCreated(address indexed owner, address indexed collectionId);
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x675f3074
+/// @dev the ERC-165 identifier for this interface is 0x88ee8ef1
contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
/// Create an NFT collection
/// @param name Name of the collection
@@ -69,9 +62,9 @@
return 0x0000000000000000000000000000000000000000;
}
- /// @dev EVM selector for this function is: 0x44a68ad5,
- /// or in textual repr: createRefungibleCollection(string,string,string)
- function createRefungibleCollection(
+ /// @dev EVM selector for this function is: 0xab173450,
+ /// or in textual repr: createRFTCollection(string,string,string)
+ function createRFTCollection(
string memory name,
string memory description,
string memory tokenPrefix
@@ -106,11 +99,7 @@
/// @return bool Does the collection exist?
/// @dev EVM selector for this function is: 0xc3de1494,
/// or in textual repr: isCollectionExist(address)
- function isCollectionExist(address collectionAddress)
- public
- view
- returns (bool)
- {
+ function isCollectionExist(address collectionAddress) public view returns (bool) {
require(false, stub_error);
collectionAddress;
dummy;
tests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -14,14 +14,11 @@
/// @dev inlined interface
interface CollectionHelpersEvents {
- event CollectionCreated(
- address indexed owner,
- address indexed collectionId
- );
+ event CollectionCreated(address indexed owner, address indexed collectionId);
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x675f3074
+/// @dev the ERC-165 identifier for this interface is 0x88ee8ef1
interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
/// Create an NFT collection
/// @param name Name of the collection
@@ -45,9 +42,9 @@
string memory baseUri
) external returns (address);
- /// @dev EVM selector for this function is: 0x44a68ad5,
- /// or in textual repr: createRefungibleCollection(string,string,string)
- function createRefungibleCollection(
+ /// @dev EVM selector for this function is: 0xab173450,
+ /// or in textual repr: createRFTCollection(string,string,string)
+ function createRFTCollection(
string memory name,
string memory description,
string memory tokenPrefix
@@ -67,8 +64,5 @@
/// @return bool Does the collection exist?
/// @dev EVM selector for this function is: 0xc3de1494,
/// or in textual repr: isCollectionExist(address)
- function isCollectionExist(address collectionAddress)
- external
- view
- returns (bool);
+ function isCollectionExist(address collectionAddress) external view returns (bool);
}
tests/src/eth/collectionHelpersAbi.jsondiffbeforeafterboth--- a/tests/src/eth/collectionHelpersAbi.json
+++ b/tests/src/eth/collectionHelpersAbi.json
@@ -59,7 +59,7 @@
{ "internalType": "string", "name": "description", "type": "string" },
{ "internalType": "string", "name": "tokenPrefix", "type": "string" }
],
- "name": "createRefungibleCollection",
+ "name": "createRFTCollection",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "nonpayable",
"type": "function"
tests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/createRFTCollection.test.ts
+++ b/tests/src/eth/createRFTCollection.test.ts
@@ -41,7 +41,7 @@
const collectionCountBefore = await getCreatedCollectionCount(api);
const result = await collectionHelper.methods
- .createRefungibleCollection(collectionName, description, tokenPrefix)
+ .createRFTCollection(collectionName, description, tokenPrefix)
.send();
const collectionCountAfter = await getCreatedCollectionCount(api);
@@ -65,7 +65,7 @@
.call()).to.be.false;
await collectionHelpers.methods
- .createRefungibleCollection('A', 'A', 'A')
+ .createRFTCollection('A', 'A', 'A')
.send();
expect(await collectionHelpers.methods
@@ -76,7 +76,7 @@
itWeb3('Set sponsorship', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const collectionHelpers = evmCollectionHelpers(web3, owner);
- let result = await collectionHelpers.methods.createRefungibleCollection('Sponsor collection', '1', '1').send();
+ let result = await collectionHelpers.methods.createRFTCollection('Sponsor collection', '1', '1').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const sponsor = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const collectionEvm = evmCollection(web3, owner, collectionIdAddress, {type: 'ReFungible'});
@@ -96,7 +96,7 @@
itWeb3('Set limits', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const collectionHelpers = evmCollectionHelpers(web3, owner);
- const result = await collectionHelpers.methods.createRefungibleCollection('Const collection', '5', '5').send();
+ const result = await collectionHelpers.methods.createRFTCollection('Const collection', '5', '5').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const limits = {
accountTokenOwnershipLimit: 1000,
@@ -141,7 +141,7 @@
.isCollectionExist(collectionAddressForNonexistentCollection).call())
.to.be.false;
- const result = await collectionHelpers.methods.createRefungibleCollection('Collection address exist', '7', '7').send();
+ const result = await collectionHelpers.methods.createRFTCollection('Collection address exist', '7', '7').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
expect(await collectionHelpers.methods
.isCollectionExist(collectionIdAddress).call())
@@ -164,7 +164,7 @@
const tokenPrefix = 'A';
await expect(helper.methods
- .createRefungibleCollection(collectionName, description, tokenPrefix)
+ .createRFTCollection(collectionName, description, tokenPrefix)
.call()).to.be.rejectedWith('name is too long. Max length is ' + MAX_NAME_LENGHT);
}
@@ -174,7 +174,7 @@
const description = 'A'.repeat(MAX_DESCRIPTION_LENGHT + 1);
const tokenPrefix = 'A';
await expect(helper.methods
- .createRefungibleCollection(collectionName, description, tokenPrefix)
+ .createRFTCollection(collectionName, description, tokenPrefix)
.call()).to.be.rejectedWith('description is too long. Max length is ' + MAX_DESCRIPTION_LENGHT);
}
{
@@ -183,7 +183,7 @@
const description = 'A';
const tokenPrefix = 'A'.repeat(MAX_TOKEN_PREFIX_LENGHT + 1);
await expect(helper.methods
- .createRefungibleCollection(collectionName, description, tokenPrefix)
+ .createRFTCollection(collectionName, description, tokenPrefix)
.call()).to.be.rejectedWith('token_prefix is too long. Max length is ' + MAX_TOKEN_PREFIX_LENGHT);
}
});
@@ -196,7 +196,7 @@
const tokenPrefix = 'A';
await expect(helper.methods
- .createRefungibleCollection(collectionName, description, tokenPrefix)
+ .createRFTCollection(collectionName, description, tokenPrefix)
.call()).to.be.rejectedWith('NotSufficientFounds');
});
@@ -204,7 +204,7 @@
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const notOwner = createEthAccount(web3);
const collectionHelpers = evmCollectionHelpers(web3, owner);
- const result = await collectionHelpers.methods.createRefungibleCollection('A', 'A', 'A').send();
+ const result = await collectionHelpers.methods.createRFTCollection('A', 'A', 'A').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contractEvmFromNotOwner = evmCollection(web3, notOwner, collectionIdAddress, {type: 'ReFungible'});
const EXPECTED_ERROR = 'NoPermission';
@@ -229,7 +229,7 @@
itWeb3('(!negative test!) Set limits', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const collectionHelpers = evmCollectionHelpers(web3, owner);
- const result = await collectionHelpers.methods.createRefungibleCollection('Schema collection', 'A', 'A').send();
+ const result = await collectionHelpers.methods.createRFTCollection('Schema collection', 'A', 'A').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const collectionEvm = evmCollection(web3, owner, collectionIdAddress, {type: 'ReFungible'});
await expect(collectionEvm.methods
tests/src/eth/fractionalizer/Fractionalizer.soldiffbeforeafterboth84 "RFT collection is already set"85 );86 address collectionHelpers = 0x6C4E9fE1AE37a41E93CEE429e8E1881aBdcbb54F;84 address collectionHelpers = 0x6C4E9fE1AE37a41E93CEE429e8E1881aBdcbb54F;87 rftCollection = CollectionHelpers(collectionHelpers).createRefungibleCollection(_name, _description, _tokenPrefix);85 rftCollection = CollectionHelpers(collectionHelpers).createRFTCollection(_name, _description, _tokenPrefix);88 emit RFTCollectionSet(rftCollection);86 emit RFTCollectionSet(rftCollection);89 }87 }9088tests/src/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth--- a/tests/src/eth/fractionalizer/fractionalizer.test.ts
+++ b/tests/src/eth/fractionalizer/fractionalizer.test.ts
@@ -21,7 +21,7 @@
import {readFile} from 'fs/promises';
import {executeTransaction, submitTransactionAsync} from '../../substrate/substrate-api';
import {getCreateCollectionResult, getCreateItemResult, UNIQUE, requirePallets, Pallets} from '../../util/helpers';
-import {collectionIdToAddress, CompiledContract, createEthAccountWithBalance, createNonfungibleCollection, createRefungibleCollection, GAS_ARGS, itWeb3, tokenIdFromAddress, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from '../util/helpers';
+import {collectionIdToAddress, CompiledContract, createEthAccountWithBalance, createNonfungibleCollection, createRFTCollection, GAS_ARGS, itWeb3, tokenIdFromAddress, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from '../util/helpers';
import {Contract} from 'web3-eth-contract';
import * as solc from 'solc';
@@ -123,7 +123,7 @@
itWeb3('Set RFT collection', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const fractionalizer = await deployFractionalizer(web3, owner);
- const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress} = await createRFTCollection(api, web3, owner);
const refungibleContract = uniqueRefungible(web3, collectionIdAddress, owner);
await refungibleContract.methods.addCollectionAdmin(fractionalizer.options.address).send();
const result = await fractionalizer.methods.setRFTCollection(collectionIdAddress).send();
@@ -256,7 +256,7 @@
itWeb3('call setRFTCollection twice', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress} = await createRFTCollection(api, web3, owner);
const refungibleContract = uniqueRefungible(web3, collectionIdAddress, owner);
const fractionalizer = await deployFractionalizer(web3, owner);
@@ -282,7 +282,7 @@
itWeb3('call setRFTCollection while not collection admin', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const fractionalizer = await deployFractionalizer(web3, owner);
- const {collectionIdAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress} = await createRFTCollection(api, web3, owner);
await expect(fractionalizer.methods.setRFTCollection(collectionIdAddress).call())
.to.be.rejectedWith(/Fractionalizer contract should be an admin of the collection$/g);
@@ -368,7 +368,7 @@
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const fractionalizer = await deployFractionalizer(web3, owner);
- const {collectionIdAddress: rftCollectionAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress: rftCollectionAddress} = await createRFTCollection(api, web3, owner);
const refungibleContract = uniqueRefungible(web3, rftCollectionAddress, owner);
const rftTokenId = await refungibleContract.methods.nextTokenId().call();
await refungibleContract.methods.mint(owner, rftTokenId).send();
@@ -381,7 +381,7 @@
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const {fractionalizer} = await initFractionalizer(api, web3, privateKeyWrapper, owner);
- const {collectionIdAddress: rftCollectionAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress: rftCollectionAddress} = await createRFTCollection(api, web3, owner);
const refungibleContract = uniqueRefungible(web3, rftCollectionAddress, owner);
const rftTokenId = await refungibleContract.methods.nextTokenId().call();
await refungibleContract.methods.mint(owner, rftTokenId).send();
@@ -392,7 +392,7 @@
itWeb3('call rft2nft for RFT token that was not minted by fractionalizer contract', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const {collectionIdAddress: rftCollectionAddress} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress: rftCollectionAddress} = await createRFTCollection(api, web3, owner);
const fractionalizer = await deployFractionalizer(web3, owner);
const refungibleContract = uniqueRefungible(web3, rftCollectionAddress, owner);
tests/src/eth/reFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungible.test.ts
+++ b/tests/src/eth/reFungible.test.ts
@@ -26,7 +26,7 @@
itWeb3('totalSupply', async ({api, web3, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
const nextTokenId = await contract.methods.nextTokenId().call();
@@ -38,7 +38,7 @@
itWeb3('balanceOf', async ({api, web3, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -63,7 +63,7 @@
itWeb3('ownerOf', async ({api, web3, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -79,7 +79,7 @@
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const receiver = createEthAccount(web3);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -103,7 +103,7 @@
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const receiver = createEthAccount(web3);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -130,7 +130,7 @@
itWeb3('Can perform mint()', async ({web3, api, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, owner);
- let result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ let result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const receiver = createEthAccount(web3);
const contract = evmCollection(web3, owner, collectionIdAddress, {type: 'ReFungible'});
@@ -163,7 +163,7 @@
itWeb3('Can perform mintBulk()', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -221,7 +221,7 @@
itWeb3('Can perform burn()', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -247,7 +247,7 @@
itWeb3('Can perform transferFrom()', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -304,7 +304,7 @@
itWeb3('Can perform transfer()', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -344,7 +344,7 @@
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const receiver = createEthAccount(web3);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -376,7 +376,7 @@
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const receiver = createEthAccount(web3);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -413,7 +413,7 @@
itWeb3('transferFrom() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -430,7 +430,7 @@
itWeb3('transfer() call fee is less than 0.2UNQ', async ({web3, api, privateKeyWrapper}) => {
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
tests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungibleToken.test.ts
+++ b/tests/src/eth/reFungibleToken.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {approve, createCollection, createRefungibleToken, transfer, transferFrom, UNIQUE, requirePallets, Pallets} from '../util/helpers';
-import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, createRefungibleCollection, evmCollection, evmCollectionHelpers, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, tokenIdToAddress, transferBalanceToEth, uniqueRefungible, uniqueRefungibleToken} from './util/helpers';
+import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, createRFTCollection, evmCollection, evmCollectionHelpers, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, tokenIdToAddress, transferBalanceToEth, uniqueRefungible, uniqueRefungibleToken} from './util/helpers';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -458,7 +458,7 @@
const caller = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const receiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
const helper = evmCollectionHelpers(web3, caller);
- const result = await helper.methods.createRefungibleCollection('Mint collection', '6', '6').send();
+ const result = await helper.methods.createRFTCollection('Mint collection', '6', '6').send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
const contract = evmCollection(web3, caller, collectionIdAddress, {type: 'ReFungible'});
@@ -658,7 +658,7 @@
itWeb3('Default parent token address and id', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const {collectionIdAddress, collectionId} = await createRefungibleCollection(api, web3, owner);
+ const {collectionIdAddress, collectionId} = await createRFTCollection(api, web3, owner);
const refungibleContract = uniqueRefungible(web3, collectionIdAddress, owner);
const refungibleTokenId = await refungibleContract.methods.nextTokenId().call();
await refungibleContract.methods.mint(owner, refungibleTokenId).send();
tests/src/eth/util/helpers.tsdiffbeforeafterboth--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -141,10 +141,10 @@
expect(result.success).to.be.true;
}
-export async function createRefungibleCollection(api: ApiPromise, web3: Web3, owner: string) {
+export async function createRFTCollection(api: ApiPromise, web3: Web3, owner: string) {
const collectionHelper = evmCollectionHelpers(web3, owner);
const result = await collectionHelper.methods
- .createRefungibleCollection('A', 'B', 'C')
+ .createRFTCollection('A', 'B', 'C')
.send();
return await getCollectionAddressFromResult(api, result);
}