npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eoslime

v2.0.1

Published

eoslime is an EOS development and deployment framework based on eosjs.js

Downloads

34

Readme

npm version codecov support typescript

eoslime.js

EOS development and deployment framework based on eosjs.js. The framework's main purpose is to make the process of unit testing, deployment and compilation much simpler and much easier.

Telegram - https://t.me/eoslime
Documentation - https://lyubo.gitbook.io/eoslime/

Contributors

Thanks these wonderful people for helping improve EOSLime

Change log

Version 2.0.0 change log

[Typescript support && Codebase code coverage]

Breaking changes

  • Rename Account.addAuthorityKey to Account.addOnBehalfKey
  • Rename Account.executiveAuth to Account.authority
  • New way to access contract actions and tables
    Actions
    const tokenContract = await eoslime.Contract.at('contract name');
    // Before
    tokenContract.issue(params, options)
    // Now
    tokenContract.actions.issue([params], options)
    Tables
    const tokenContract = await eoslime.Contract.at('contract name');
    // Before
    tokenContract.balances()
    // Now
    tokenContract.tables.balances()
  • Contract.on('deploy')
    // Before
    Contract.on('deploy', (tx, contract) => {}))
    // Now
    Contract.on('deploy', (contract, tx) => {}))
  • Remove AuthorityAccount
  • Deprecate Account.createSubAuthority
  • Replace createSubAuthority with addAuthority
    const account = await eoslime.Account.createRandom();
      
    // ------------ [ Before ] ------------
      
    // Add subAuthority and return an instance of AuthorityAccount
    const subAuthorityAccount = await account.createSubAuthority('subauthority');
      
    // Add what actions the new authority could access
    await subAuthorityAccount.setAuthorityAbilities([
        { action: 'produce', contract: faucetContract.name }
    ]);
      
    // ------------ [ Now ] ------------
      
    // Add subAuthority and return tx receipt
    const tx = await account.addAuthority('subauthority');
      
    // Add what actions the new authority could access
    await account.setAuthorityAbilities('subauthority', [
        { action: 'produce', contract: faucetContract.name }
    ]);
      
    const subAuthorityAccount = eoslime.Account.load('name', 'key', 'subauthority');

News

  • Typescript support
  • Refactor CLI commands
  • Fix nodeos pre-loaded accounts to have different keys
  • Unit tests for all CLI commands
  • Return transaction receipts on every chain iteraction
  • Use logger instead console.log
  • Update Kylin network endpoint
  • Add Jungle3 support
  • Remove the check requiring an executor to be provided on contract instantiation. Without executor, one could fetch only the data from the contract tables
  • contract.action.sign(params)
    // Before
    contract.action.sign(params)
      
    // Now
    // Options are the same like the ones for contract.action(params, options)
    contract.actions.action.sign([params], options)
  • contract.action.getRawTransaction(params)
    // Before
    contract.action.getRawTransaction(params)
      
    // Now
    // Options are the same like the ones for contract.action(params, options)
    contract.actions.action.getRawTransaction([params], options)

Version 1.0.4 change log

  • eoslime nodeos

    • eoslime nodeos start --path="Some path"
      Run local predefined single node chain
    • eoslime nodeos stop
      Stop single node chain started by eoslime nodeos start
    • eoslime nodeos accounts
      Show preloaded accounts on eoslime nodeos start
    • eoslime nodeos logs
      Show chain logs
  • Account.create(name, privateKey, ?creator) There are cases you have already generated your private key and you have a name for your account. You only need to create it on the chain.

  • Contract.deployRaw(rawWasm, abiJSON, ?options)
    Used for deploying a contract from WASM string and ABI in JSON format A typical use case for deployRaw is in CI/CD. You don't want to compile your contract every time, however your tests needs WASM and ABI. A good approach is to deploy your contract on a test network like Jungle one and retrieve its WASM and ABI for your tests.

    const eoslime = eoslime.init('jungle');
    const deployedContract = 'your_contract_name'; 
    const contractA_ABI = await eoslime.Provider.getABI(deployedContract);
    const contractA_WASM = await eoslime.Provider.getRawWASM(deployedContract);
          
    const contractB = await eoslime.Contract.deployRaw(contractA_WASM, contractA_ABI); 
  • Contract.deployRawOnAccount(rawWasm, abiJSON, account, ?options)
    Used for deploying a contract from WASM string and ABI in JSON format

  • Provider.getABI(contractName)
    Returns contract ABI in JSON format

  • Provider.getRawWASM(contractName)
    Returns raw WASM useful for deploying another contract directly

  • contractInstance.abi
    Returns contract ABI in JSON format

  • contractInstance.getRawWASM()
    Returns contract raw WASM

Version 1.0.3 change log

  • eoslime shape --framework=react
    A shape represents a simple full project. It includes a contract, tests, deployments and user interface. The idea of that project is for developers to have a ready solution they could start to build on top.
    React Project implementation - https://github.com/LimeChain/eoslime-shape-react

Version 1.0.2 change log

  • Fix ABI Parsing - https://github.com/LimeChain/eoslime/issues/37
  • Fix describe.only - mocha describe.only behaviour has broken with eoslime test
  • Add more flexibility in eoslime initialization EOSLIME was able to be initialized only with pre-configured providers connections. Now you can connect eoslime to your chain and keep the pre-configured functionality as the default account on local network
    // New local flexible initialization
    const eoslime = require('eoslime').init('local', { url: 'Your url', chainId: 'Your chainId' });
    const eoslime = require('eoslime').init('jungle', { url: 'Your url', chainId: 'Your chainId' });
    const eoslime = require('eoslime').init('bos', { url: 'Your url', chainId: 'Your chainId' });
    // ... any other supported netwok ...
  • Allow read-only contracts - You are able now to instantiate a contract without a signer/executor and read the contract's tables
  • Add Tutorial section in the documentation
  • Describe how examples in the documentation could be run
  • Increase the code coverage from 46% to 90+ %

Version 1.0.1 change log

  • Token option was added There are cases, where you need to execute a contract function and pay some tokens, but this could be done by processing two transactions. The first one is to your contract, the second one is to eosio.token contract. But what about if the tokens transfer reverts and the transaction to your contract is successful. That is what payable contract actions are purposed for. You should be able to execute an atomic transaction constructed by both actions above.
// Local network initialization
const eoslime = require('eoslime').init();

const CONTRACT_NAME = 'mycontract';
const ABI_PATH = './contract/contract.abi';

// Pre-created local network accounts
const user1 = eoslime.Account.load('myacc1', 'privateKey1');

let contract = eoslime.Contract.at(ABI_PATH, CONTRACT_NAME, user1);

// Execute `doSmth` and transfer 5.0000 SYS tokens to the contract at once(atomically)
await contract.doSmth('Your args here', { from: user1, tokens: '5.0000 SYS' });
  • Scope was added to the table query chain If you skip scope, the default one will be set to the from
await Provider.select('table').from('contract name').scope('account name').find()