Git Product home page Git Product logo

skale.js's Introduction

SKALE.js | The SKALE Network SDK

Code Coverage Twitter "Buy Me A Coffee"

A community run project designed to offer abstraction over the core SKALE network smart contracts.

Installation

# Install Individual Components
npm add @skaleproject/<component-name>

# The umbrella package
npm add @skaleproject/skale.js

Available Packages on NPM

The following are all of the SKALE.js packages available

Package Name NPM Tag
@skaleproject/constants npm (tag)
@skaleproject/skale.js npm (tag)
@skaleproject/config-controller npm (tag)
@skaleproject/etherbase npm (tag)
@skaleproject/context npm (tag)
@skaleproject/marionette npm (tag)
@skaleproject/multisig-wallet npm (tag)
@skaleproject/ima npm (tag)
@skaleproject/pow npm (tag)
@skaleproject/pow-ethers npm (tag)
@skaleproject/pow-web3 npm (tag)
@skaleproject/utils npm (tag)

Contribution

If you are interested in making contributions to this project you should should checkout the GitHub Issues. help wanted and good first issue are two tags you can filter by to find things to work on.

To start, fork the project, and checkout a new branch. Branch names should be in kebab-case and should start with one of the following:

  • bug

    For bug fixes (Example: bug-fix-something)
  • configuration

    For updates to the core configuration of the package suite (Example: configuration-update-esm)
  • docs

    For new or updates to documentation (Example: docs-add-pow-functions)
  • feature

    For new features (Example: feature-new-utility)
  • package

    For new package creation (Example: package-skale-manager)
  • test

    For adding or updating tests ONLY (Example: test-complete-pow)

Security & Liability

SKALE.js and all of its sub-packages and connected packages are WITHOUT ANY WARRANTY; without even the implied warranty for any user commerical or otherwise. The creators and contributors of this package may not be held liable for any damages, losses, issues, or problems caused resulting in the use of this package for any reason.

**EXPERIMENTAL NOTICE**
This package is under heavy development. Use at your own risk.

License

All contributions are made under the MIT License (including all sub projects). See License

skale.js's People

Contributors

thegreataxios avatar tobowers avatar

Stargazers

Artem Payvin avatar Franz avatar Adil avatar

Watchers

 avatar

skale.js's Issues

Package Setup & Scaffolding

Describe the Feature

  • As the SKALE Network is very flexible, a core package set should be as well
  • The packages should be modular
  • This can happen by creating a core package system that is then inherited by a central package
  • Packages can be called individually or by the "central" package

Code Example

N/A

SKALE Chain Token Check Utility

Describe the Feature

  • Function in the Utility Package to see if token is ERC20
  • ERC721 & ERC1155 Checks will come after

Code Example

/// @function checkIsERC20
utils.checkIsERC20(...args: Args);

type Args {
   address: `0x${string}`;
   chainName: string;
   mainnet: boolean; // Defaults to True
   swiftCheck: boolean; // Defaults to True -> If False, check BlockScout

}

Docs Not Building in Vercel

SKALE.js Version

  • ALL

Describe the Bug

Error: Command "npx typedoc" exited with 3

This error is thrown in vercel due to lack of finding tsconfig and entryPoint for tsdoc

Describe Expectations

It should built and not throw an error.

Errors

No response

[Package] Command Line Interface V0

Describe the Feature

  • Utilize the SKALE.js package for a global CLI
  • The CLI should enable commands that are chain agnostic
  • Commands should fire right from the CLI by utilizing any of the following:
    • PRIVATE_KEY stored somewhere on the computer
    • Ledger Live Integration?
    • @trezor/connect Integration?
  • Calls should fire right from the CLI without needing a signer
  • Encoding Data should also be possible for those that prefer a manual process

Code Example

skl chains --list --mainnet
/// ['chain1', 'chain2', 'chain3']

```npx skl config-controller whitelist "0x..."```
/// Success. 0x... Whitelisted on Chain X [X is set as default in envioronment]

[Feature] Update Proof of Work to Have Anonymous and User Controlled Interactions

Describe the Feature

Anonymous

  • The current setup is technically anonymous
  • What this means is that the msg.sender is a random user
  • This works for publicly accessible functions, not access monitored functions

User Controlled - Manually

  • The provider should be set with a private key
  • Useful for Scripting

User Controlled - Injected

  • Useful for browser injection
  • Metamask, Rainbowkit, etc

Code Example

N/A

Mining gas for contract deployment is failing with error

SKALE.js Version

0.3.2

Describe the Bug

Here is a bytecode: 60b28061000f600039806000f350fe6040516313f44d1081523360208201526040810160405260006020826024601c850173d2002000000000000000000000000000000000d27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa15156061578081fd5b81511515606c578081fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601915081602082378035828234f580151560a6578182fd5b8082525050506014600cf3

Tried to generate gas to deploy a contract - returned an error that Given input "NUMBER" is not a number (error from web3-utils library when it tried to calculate soliditySha3 from BN of bytecode)

Describe Expectations

Gas to be mined

Errors

Error: Given input "233070634920839346103616756224538253227713001046278438069785740062836890984185704696763612399300861775714551699063926876429210000203319967833941183612449599827729869954631245207337403031162157919405148544528436668532346662429306510475170031005845604619526601033266370489503704280662858916953153992954766054865346178707589501003514659584617142809885013489765440569058172309099896456649023456815165983568249203150779034186980630677036643196254548489426118096426372339" is not a number.
    at numberToHex (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/web3-utils/lib/utils.js:243:15)
    at Object.toHex (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/web3-utils/lib/utils.js:322:62)
    at _processSolidityEncodePackedArgs (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/web3-utils/lib/soliditySha3.js:175:23)
    at Array.map (<anonymous>)
    at soliditySha3 (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/web3-utils/lib/soliditySha3.js:213:24)
    at SkalePowMiner.<anonymous> (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/@skaleproject/pow/lib/cjs/miner.js:68:87)
    at Generator.next (<anonymous>)
    at /Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/@skaleproject/pow/lib/cjs/miner.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/payvint/Documents/Blockchain/skale-deterministic-deployment-proxy/node_modules/@skaleproject/pow/lib/cjs/miner.js:27:12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.