Comments (4)
Could you please paste an order (without signature)?
I just checked and we use greaterThan
for all balance/allowance
validations, which is correct.
This might be the problem with rounding during fillMakerAmount
computation.
Will be nice to see takerAmount
, makerAmount
and fillTakerAmount
.
from 0x-monorepo.
I haven't run into that one in a while, but here is a similar example:
Taker will be account: 0xEb71bad396acAa128aEadBC7dBD59ca32263DE01
Current ZRX balance: 7721349919979265
Trying to perform this batch fill:
[{
"signedOrder": {
"ecSignature": {
"r": "0x878329a293bb14a42019d2f0583f0f6003e49cbf1ab738848bd37c5537b96a25",
"s": "0x1b21ac49607606881c4f08c8f994410529fa9ad2b2252ec73ff561aff223d19f",
"v": 27
},
"exchangeContractAddress": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364",
"expirationUnixTimestampSec": "1514452757",
"feeRecipient": "0xeb71bad396acaa128aeadbc7dbd59ca32263de01",
"maker": "0x825cf4ab733265702f9582cd4d10f457baeee38e",
"makerFee": "0",
"makerTokenAddress": "0x05d090b51c40b020eab3bfcb6a2dff130df22e9c",
"makerTokenAmount": "989999999999999900",
"salt": "87276384580698629138334991609897348028108012915977568200418381927530806470590",
"taker": "0x0000000000000000000000000000000000000000",
"takerFee": "1783783783783783",
"takerTokenAddress": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570",
"takerTokenAmount": "891891891891891791"
},
"takerTokenFillAmount": "7698255154515718"
}]
Receiving:
Error: INSUFFICIENT_TAKER_BALANCE
at OrderValidationUtils.<anonymous> (order_validation_utils.js:215)
at step (order_validation_utils.js:32)
at Object.next (order_validation_utils.js:13)
at fulfilled (order_validation_utils.js:4)
at <anonymous>
I'm not sure if the fee is checked before or after balance, but I'm expecting that to be:
takerTokenFillAmount.dividedBy(signedOrder.takerTokenAmount).mul(signedOrder.takerFee).round(0)
=> 15396510309031
So the total order should be 15396510309031 + 7698255154515718 = 7713651664824749
from 0x-monorepo.
having the exact same issue here, sample code https://gist.githubusercontent.com/avonian/834cbb25f60299036261b4b3fefa3857/raw/5962518ee5632e753f739cbaed6b38754d8d3959/INSUFFICIENT_MAKER_BALANCE
from 0x-monorepo.
I think - this release should fix it https://github.com/0xProject/0x.js/releases/tag/v0.22.2
from 0x-monorepo.
Related Issues (20)
- sol-compiler: build fails behind proxy since #1596 HOT 2
- sol-tracing-utils: consider changing the solidity parser HOT 1
- sol-compiler: fails on file with structs only HOT 2
- @0x/utils: Extra space in `provider.send` varies HOT 4
- @0x/contract-wrappers: `marketBuyOrdersFillOrKill` incorrect ABI encoding HOT 2
- [sol-compiler] New release of sol-compiler?
- Buy Contract - Call fails after payment token approval
- @0x/sol-compiler bug: sol-compiler not recognizing pragma experimental 0.5.0 HOT 2
- @0x/staking wrong dependency HOT 2
- sol-compiler does not recognize solc versions after 0.5.12 HOT 1
- Using sol-trace with external, existing contracts as interfaces HOT 3
- command for new package? HOT 2
- Instant revamp bake-off HOT 23
- 0x-contract-wrappers & 0x/abi-gen: TypeError: Cannot instantiate typing.Union HOT 2
- sol-compiler update link for solc binary downloads HOT 2
- Issues with installing project dependencies on MacOS Catalina HOT 3
- asset-swapper: CryptoCom is missing from market operation types HOT 2
- [abi-gen] [base-contract] Crypto algorithms blocking javascript main thread HOT 2
- [sol-compiler] AST is not present in the output when requested HOT 2
- python: getting signature using private key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 0x-monorepo.