![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
eos-new-table
Advanced tools
Generate EOS C++ smart contract to create a table on the blockchain.
Install it globally with:
npm i -g eos-new-table
$ eos-new-table
Generate EOS C++ smart contract to create a table on the blockchain.
Options:
--name Name of the element to be represented. e.g. user
--attributes Semicolon separated list of attributes of the element with their types.
e.g. 'std::string name; uint64_t token_amount'
--table-name Name of the table to be created. If not defined the name parameter will be used.
--help Show this help message.
$ eos-new-table --name user --table-name users --attributes 'std::string name; uint64_t tokens_amount'
#include <eosiolib/eosio.hpp>
using namespace eosio;
class user_management : public eosio::contract {
public:
using contract::contract;
user_management(account_name self):
contract(self),
users(_self, _self) {}
/// @abi action
void insert(std::string name, uint64_t tokens_amount) {
users.emplace(_self, [&](auto& new_user) {
new_user.id = users.available_primary_key();
new_user.name = name;
new_user.tokens_amount = tokens_amount;
});
}
private:
// @abi table users i64
struct user {
uint64_t id;
std::string name;
uint64_t tokens_amount;
uint64_t primary_key() const { return id; };
EOSLIB_SERIALIZE(user, (id)(name)(tokens_amount))
};
eosio::multi_index<N(users), user> users;
};
EOSIO_ABI(user_management, (insert))
FAQs
Generate EOS C++ smart contract to create a table.
We found that eos-new-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.