Creation and modification of Tabletsa powder on web3.js 2.0.0: blood management
In addition to the web3.js, it is possible to develop with new versions, the disinfectants are not made with change in the bases and in the API. In this state, we will think about how to proclaim and modify the tablatsa (also existence as an AtraSlookbuptable program) in the new version 2.0.0 Web3.js.
What is this Tablatsa powder?
Tabletsa is an interface for the reserves or data blockchain. This allows you to peel on the basis of conquret creatures, such as lies, signs or data. In the web3.js Tabletsa contract, penetration is used for different attachments, such as dental finances (DIFI), non -elati tokens (NFT) and more.
Old Way: Use of Adrickuptableprogram '

Out of 2.0.0 it is possible to insert and change the tablatsa lip, using Old Api Addrestabletableprogram ':
Javascript
Const SlowUtable = New Web3
// Tablitsa lip configuration
});
// Create a function to invite Tablatsa
Query function () {)
Return SlookUpTable.quary (address);
}
// using the function the address is found
Query (). So ((result) => {
Console.log (result);
});
However, this is a name for a sort of score. APIIndresslookuptableprogramis did not work for large variants for use or phrase.
New way: with helpsooluptables.createandit
With the problem of web3.js 2.0.0, the new interface for the creation and modification of the tablitz scoreboard:supuptables.createandit. This technique provides greater ibyity and scale on the old bees:
Javascript
Const Slookupatable = Wait SulDupables.Createnedit ({{
// Tablitsa lips configuration (for example, backlit)
Add,
});
// Create a function to invite Tablatsa
ASININCRICA Query function () {
Const Result = Wait supuplable.query ();
Result of Vozurat;
}
// using the function the address is found
Query (). So ((result) => {
Console.log (result);
});
TheCreateandit 'method is overwhelmed by the creation and management of different tables, including the installation of values for tables or the unification of the anesthetized tables.
How to work in the lip table
To relate how to work the table in the new web3.js version, take them into their intrauterine work. That
Creation of Tablatsa : When you put a new table, USASupuptables.Createded ', web3.js generates the index for Tablatsa on its configuration.
Data indexing : data indicated by Putema Carton in the Chronicle Addeline (for example Json or Database).
3.
Conclusion
In this state, we have studied, how to create and modify the Tablatsa in the new web3.js 2.0.0 version, theSooluptables.createandit 'method. The use of this is a built -in interface, now it is possible to create more flaps and easily manage data data sets.
Do not forget to verify advertising [Web3.js documentation] (
Primer code
Here is the primer of sooluptables.createnedit 'for the creation of a new table:
Javascript
Const Slookupatable = Wait SulDupables.Createnedit ({{
Address: [
'0x ...',
'0x ...',
"
});
// Create a function to invite Tablatsa
ASININCRICA Query function () {
Const Result = Wait supuplable.query ();
Result of Vozurat;
}
// using the function the address is found
Query (). So ((result) => {
Console.log (result);
});
This code creates a new tablatsa with two addresses and shows how to invite it, using theCreateeadit method.