Git Product home page Git Product logo

iost.js's People

Contributors

dependabot[bot] avatar flybikegx avatar ifsfvip avatar lileicool1 avatar lispc avatar nujabes403 avatar sswsdsn avatar tonokim avatar wangyu0air avatar x-zho14 avatar zgayjjf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iost.js's Issues

Token iost exceeds amount limit

Hi,
I'm testing a function in my ABI and getting the error: Error: token iost exceeds amount limit.

I have tried publishing the contract as unlimited amount limit, and still no luck.

Any advice would be appreciated.

Creating a new account fails using API

const kp = KeyPair.newKeyPair(); const tx = iost.newAccount( "account1", "admin", kp.id, kp.id, 1024, 1000 ); account.signTx(tx);

If I give send this transaction directly, chain_id not matches error occurs.
So I assigned the chain_id as tx.chain_id = 1020

Now, if I try to send this transaction, error: token iost exceed amountLimit in tx. need 10 error occurs. If I approve the amount tx.addApprove("iost", 10);,
error: token iost exceed amountLimit in tx. need 7.76 error occurs.

Can you check this code with the latest SDK?

Error invalid chain_id, should be 1020, yours 1024

Can be recreated with:

git clone https://github.com/iost-official/iost.js
cd iost.js/examples
npm install
node system_test

System info:

IOST 3.1.0
iost.js - current codebase (there are no version numbers)

The actual error message:

Error... tx failed, res: "send tx failed. Error: error: {\"code\":2,\"message\":\"VerifyError 
invalid chain_id, should be 1020, yours:1024\"}", tx: 
{"gasRatio":1,"gasLimit":2000000,"actions":
[{"contract":"auth.iost","actionName":"signUp","data":"
[\"u572203300\",\"BMHt8eDG9CzBj4suWEeNUNi59EoxdhjeSc4nutNiiUUH\",\"BMHt8eDG9
CzBj4suWEeNUNi59EoxdhjeSc4nutNiiUUH\"]"},
{"contract":"ram.iost","actionName":"buy","data":"[\"admin\",\"u572203300\",1024]"},
{"contract":"gas.iost","actionName":"pledge","data":"
[\"admin\",\"u572203300\",\"1000\"]"}],"signers":[],"signatures":
[],"publisher":"admin","publisher_sigs":
[{"algorithm":"ED25519","public_key":"6BK1LqmtXLqamvA6/MbylCpFJLDfPANE3BlQcoMWcMQ=","signature":"wl1CsuIxvPwbMdxrNDtX2aVhk3pEOnqBnm1p7zh8tRXRVlnteZfHwthUsy
P5SVWF3IEKltrB9pPa/YmLjLy/Aw=="}],"amount_limit":
[],"chain_id":1024,"reserved":null,"time":1558857220344000000,"expiration":1558857310
344000000,"delay":0}

Raw transaction

Can anyone point me to the function from where I can print raw transaction on console?

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.