Coder Social home page Coder Social logo

persistenceone / persistence-sdk Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 4.0 5.66 MB

Node modules and client utilities to build Persistence platform node applications.

Home Page: https://persistence.one/

License: Apache License 2.0

Makefile 3.40% Go 96.54% Shell 0.06%
sdk epochs ibchooker interchainquery

persistence-sdk's Introduction

persistence-sdk

Go Report Card license LoC

Node modules and client utilities to build Persistence platform node applications.

persistence-sdk's People

Contributors

0xankit avatar ajansari95 avatar ajeet97 avatar akaladarshi avatar alexanderbez avatar anmol1696 avatar antstalepresh avatar arhamchordia avatar bahdotsh avatar catshaark avatar czarcas7ic avatar deepanshutr avatar faddat avatar gayathriah avatar jeebster avatar kruspy avatar lovesh2407 avatar mattverse avatar nk307 avatar persistenceadmin avatar prashantkrv avatar puneet2019 avatar saisunkari19 avatar sujith-surendran avatar sunnya97 avatar thunnini avatar valardragon avatar vision2point0 avatar xbalbinus avatar xlab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

persistence-sdk's Issues

Splits Wrap and unwrap

Split wrap, wraps a coin (eg. 100 uatom , sdk.Int) and assigns it to 100.00.......0 sdk.Dec.
Once wrapped these splits are allowed to be sent across, (eg. 0.00005 uatom) will be allowed to be sent

And while unwrap transaction the decimals are left behind.

TODO in fact signing

MetaFact signing is a todo since long,
The implementation in base/fact.go for signing, will always panic because context.NewCliContext does not initialise with a keybase.
Also we would want the signing to happen at the client end itself.

Queries to take in special parameters.

Example:
query splits for single account.
query orders for specific Identities.
query identities associated with a set of addresses/ single address

--- Feature Request ---

Mutate Asset does not check if fromID owns the asset.

Test scenario:

  1. Maintainer mints an asset
  2. Maintainer transfers the asset to another Identites so that the maintainer no longer has any asset left
  3. Maintainer tries to mutate asset which is not owned by maintainer.
    This test cases goes through.

Todo's left to implement

The following files have incomplete code (some todos commented out, yet to be implemented)

  • modules/identities/internal/transactions/define/keeper.go
  • modules/identities/internal/transactions/provision/keeper.go
  • modules/identities/internal/transactions/quash/keeper.go
  • modules/identities/internal/transactions/unprovision/keeper.go

Unable to query transaction hash.

Getting the following response on a successful tx when querying its hash:
{ jsonrpc: "2.0", id: -1, error: { code: -32603, message: "Internal error", data: "runtime error: invalid memory address or nil pointer dereference" } }

Maintainers Module initiailization.

Identity module and maintainer modules need to be decoupled.
Its auxiliaries are called inside the init function of each other. Causing Maintainer Deputize transaction to throw nil pointer exception.

branch - master
commit - eb6bc10

Module event emitted in transaction.go HandleMessage incorrect

lines in [schema/helpers/base/tranaction.go ~ HandleMessage](https://github.com/persistenceOne/persistenceSDK/blob/004063432009880b4fdb087d35434372f84fdc46/schema/helpers/base/transaction.go#L76-L81l)
context.EventManager().EmitEvent(
		sdkTypes.NewEvent(
			sdkTypes.EventTypeMessage,
			sdkTypes.NewAttribute(sdkTypes.AttributeKeyModule, transaction.name),
		),
	
)

Here the Attribute key is Module, while transaction name is being passed.
Ideally it should be module.name (or message.Route()), since cosmos-sdk already appends AttributeKeyAction (as msg.Type())

Staking & Sending malfunction with KEPLR & Ledger Nano X

There seems to be an issue with the Ledger Nano X and KEPLR when using the Persistence Wallet. Every time I click “approve” to initiate a transaction (for sending or staking) the transaction is immediately rejected and I get “Data is invalid : Unexpected characters”. The latest version of the ATOM app was running on the Nano X but it did not display anything special (no dialog appearing). Setting up the Persistence wallet and connecting the Nano X through Keplr worked fine. I am using Brave 1.26.67 on Windows 10 (German locale). I also tried Ubuntu Linux with Brave and got the same issue.

Order Make Tx: Cannot change exchange rate once order is created without adding more makerOwnableSplit

To change only the exchange rate, giving maker ownable split value 0 fails the tx because the makerOwnableSplit is Dec{ nil } that fails the tx. Hence to change the exchange rate one has to add some amount of maker ownable to the order. Also, for assets, this becomes impossible because there is no split left to add once the order is created.

Changing auxiliaryRequest.Split.LTE to auxiliaryRequest.Split.LT in splits/auxiliares/transfer/keeper, tx still fails when there is no split left of the ownable ID (fromSplit of fromSplitID is nil, as in the case of assets).

assetNode export command not working.

assetNode export gives the following response

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1065a7f]

branch master-

version: 0.1.0-13-gdb2e7fd
commit: db2e7fd

Order Make Expiry and MakerOwnableSplit

While define order - those fields are compulsory to be added for order to work.
while making order - if we send the expiry and makerOwnableSplit as mutables, then they are again appended by the keeper.

Need to either check for duplicate property ID's before appending, or resolve the transactionRequest struct, so it works via mutables only!

Data type of property are allowed to be of different type than what was used to create the definition of the entity.

For example, if Identity Define was created using the following mutable Traits "mutableTraits":"OfficialHolidays:S|,PartyTime:S| and while issuing an identity it is changed to "mutableProperties":"OfficialHolidays:S|Christmas,PartyTime:H|12" (making PartyTime property from S type to H type), the transaction goes through successfully. The respective entity also takes this property with this different data type (taking H) under the same classification (where it is S). Hence this might be affecting Meta module too.

UnWrap Splits

Unwrapping a non int amount of split, truncates the coins, and coins are lost.

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.