GithubHelp home page GithubHelp logo

arablocks / ara-util Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 397 KB

Utility functions for common Ara tasks

Home Page: https://ara.one/

License: GNU General Public License v3.0

JavaScript 97.38% Shell 1.01% Solidity 1.61%

ara-util's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ara-util's Issues

Override web3 functions rather than wrap them

Expected Behavior

I get a web3 instance from the ara-util/web3 submodule.

Actual Behavior

web3 wrapper functions are returned, and any modules needing a web3 instance have to get it from ara-context instead.

Bubble up `ara-context`

ara-util should provide function to return a web3 instance. This should reduce the number of situations where both ara-util and ara-context are required, preventing dependency mismatches

Need gas option for tx.js

Right now the gasPrice is fixed at whatever value web3.eth.getGasPrice() returns. When the network is burdened, it makes tx very slow. Need an option to override gasPrice value.

Expose transaction hash

Is it possible to return tx hash from contract calls? With that, we can create a link to the pending tx on etherscan, which is pretty common for dapps to do. Happy to take a crack at it myself.

`validate` should take in keyring options

Expected Behavior

validate function should take in opts for keyring, since validate will resolve the ddo, and only fall back to constants if necessary.

Actual Behavior

Currently validate uses constants for keyring options, rather than taking in network name/secret.

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:
  • Subsystem:

Create a file for commonly used transform functions

Expected Behavior

Projects can rely on a common toHex function

Actual Behavior

Projects write and maintain their own toHex function

Steps to Reproduce the Problem

n/a

Specifications

  • Version: 0.3.3
  • Platform: n/a
  • Subsystem: n/a

Lots of constants and hard-coded variables around keys / keyrings

Expected Behavior

Able to adjust behavior of ara-util without digging through node_modules to change variables

Actual Behavior

Having to dig through node_modules to change constant files

Steps to Reproduce the Problem

  1. Use a project that uses ara-filesystem
  2. Have to use pre-chosen constants or dig through your node_modules

Specifications

  • Version: 0.3.0
  • Platform: n/a
  • Subsystem: n/a

Circular dependency with `ara-filesystem`

Expected Behavior

ara-filesystem depends on ara-util only

Actual Behavior

ara-filesystem depends on ara-util and ara-util depends on ara-filesystem

Steps to Reproduce the Problem

  1. view in package.json s

Specifications

  • Version: all
  • Platform: all
  • Subsystem: all

validate() approves AFS DID (passed in as owner) + owner password

Expected Behavior

validate() should throw if an AFS DID is passed in as owner

Actual Behavior

validate() successfully returns if an AFS DID is passed in as owner with the owner's password

Steps to Reproduce the Problem

  1. Pass in AFS DID into validate() as owner

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.