Releases: LimeChain/eoslime
Release Version 2.0.0
[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
ActionsTablesconst tokenContract = await eoslime.Contract.at('contract name'); // Before tokenContract.issue(params, options) // Now tokenContract.actions.issue([params], options)
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)
Release Version 1.0.4
-
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
- eoslime nodeos start --path="Some path"
-
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 fordeployRaw
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
Release Version 1.0.3
- 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
Release Version 1.0.2
Version 1.0.2 change log
- Fix ABI Parsing - #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 withouth 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+ %
Release Version 1.0.1
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()
Release Version 1.0.0
- Support Multisignature accounts
- Add CLI commands
- Read the new Documentation
Version 0.0.17
Features included in the release:
- Table getters
- Nonce actions support
Version 0.0.14
Features included in the release:
- On account creation you can provide account permission
- One permission per Account instance
- Implement
createAuthority
method which created a new authority for an account - Implement
addPermission
method which adds a new permission to account's authority. Example: addseosio.code
permission to 'active' authority - Add the
inline
option to deployers. It addseosio.code
to contract's active authority in order the contract to do inline actions - Implement
makeInline
method in contract. It addseosio.code
to contract authority.
Version 0.0.12
Bug fixes and changes included in the release:
- On account creation, buy by default 8192 bytes ram
- Add Kylin test network in the supported list of networks
- Change
Account.send
function to hassymbol
as a parameter - Change the order of params in
getBalance
function - Change
Account.buyBandwitdth
to accept a token's symbol in formatamount symbol
=10.0000 EOS
Version 0.0.11
Version breaking changes:
- Change the way eoslime initialize
- Implement providers
- Deprecate createTestingAccounts utils funtion for now
- Deprecate AccountsLoader, the functionality is moved on eoslime.Account
- Implement Account functions as getBalance, send, buyRam and buyBandwidth.
- Add codecoverage
- AccountDeployer now requires contract account in order to deploy instead of getting default account if none is provided
- Rename some contract properties as defaultExecutor => executor | contractName => name