In-depth documentation on PancakeSwap is available at docs.pancakeswap.finance.
The following assumes the use of node@>=10
.
yarn
yarn compile
yarn test
Core smart contracts
License: GNU General Public License v3.0
In-depth documentation on PancakeSwap is available at docs.pancakeswap.finance.
The following assumes the use of node@>=10
.
yarn
yarn compile
yarn test
Hello,
I hope you can help me i think im missing some additional calculation.
When i query your router contract (0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F) and i want to get the amount that i will get i use getAmountsIn or getAmountsOut but the value that it returns is very different then the web app itself...
Are there some additional calculations in play?
And also how can i access getReserves function on the smart contract?
Someone has added inadequate initial liquidity (like 0.00000001 BNB / 1 token) for existing token and swap price became insane, so the pair is now broken - no one can add new liquidity or fix the price because price impact is 99%. Is it possible to recreate pair contract or do something else in this case?
Hi,
1 vulnerabilities (medium severity) are introduced in @pancakeswap-libs/pancake-swap-core:
Vulnerability CVE-2021-23358 (medium severity) is detected in package underscore (versions: >=1.3.2 <1.12.1,>=1.13.0-0 <1.13.0-2): https://snyk.io/vuln/SNYK-JS-UNDERSCORE-1080984
The above vulnerable package is referenced by @pancakeswap-libs/pancake-swap-core via:
@pancakeswap-libs/[email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected]
Since @pancakeswap-libs/[email protected].* is transitively referenced by 156 downstream projects (e.g., @gravis.finance/uikit 1.1.74 (latest version),
@pancakeswap-libs/sdk-v2 2.2.0 (latest version), kccswap-sdk 0.0.6 (latest version), @gravis.finance/sdk 1.0.9 (latest version), definixswap-sdk 0.0.10-klaytn (latest version),
If @pancakeswap-libs/[email protected].* removes the vulnerable packages from the above version, then its fixed version can help downstream users decrease their pain.
Could you help update packages in this version?
In @pancakeswap-libs/[email protected].*, you can kindly perform the following upgrades (not crossing their major versions):
truffle-hdwallet-provider ^1.0.17 ➔ 1.0.15
;
Note:
ruffle-hdwallet-provider 1.0.15 transitively depends on [email protected] (a vulnerability CVE-2018-1109 patched version)
Thanks for your contributions to the npm ecosystem!
Best regards,
Paimon
Hi,
I am the dev of a BEP20 token and I have an issue when buying it through poocoin. The main LP is IUP/BNB and someone created a pool IUP/BUSD with less than 20 BUSD in it. The price of this pool is 100x less than the price of the main LP. This results in poocoin automatically trying to use this LP to buy the token. As the LP was so small I tried to add some liquidity but it didn't solve the issue.
It seems that the IUP/BUSD pool is bugged and no one can swap using it. I tried to swap directly through router v2 smart contract but the transaction always fails.
Some swaps have been made using this pool so I don't thing the issue comes from our token.
The problem is exactly the same as this one: pancakeswap/pancake-swap-interface-v1#95
I'm going to make a smart contract with time-lock based on pancakeswap core.
Is there any best way to provide on your end?
hi guys i need run this project for testing locally with truffle, can you help me ?
PancakeSwap.finance was previously forked from the mythical UniSwap. Since then we've made a few changed of our own: 6c0f9af
The first task is super simple!
Fix the test and complete the Readme.
The first to complete the task will be rewarded with 100 CAKE (currently around $70).
Token developers need a solution to burn/lock LP tokens and transfer to the new LP token after PancakeSwap releases a new router.
If we transfer LP tokens to 0x000000...dead wallet, we can't take back these LP tokens anymore.
The best solution IMHO is PancakeSwap create a smart contract to lock the LP and allow the owner just move the LP between V1, V2 or V3.
Bug in pancakeswap v2, the mintFee function doesn't handle dynamic supply coins, mintFee needs to be disabled on 0x4745dfd13b7182b61f2f9db5f93547225364c29d
Hello, talent devs.
Now uers can't sell BabyBNB token.
(https://bscscan.com/address/0xc1168b7b85b2bbc8a5c73c007b74e7523b2da209)
I checked the reason.
This error comes from follow red part.
This token is forked from EverRise.
minimumTokensBeforeSwap = 10,000,000,000 BABYBNB
_maxTxAmount = 1000000000000000000000000000000000000000000000000000000000000000000 BABYBNB
I think that all things are correct.
I don't understand why this issue is appeared.
If you are experienced this issue, please help me.
Thanks.
When I run yarn test
, the error occured:
yarn run v1.22.10
$ yarn compile
$ yarn clean
$ rimraf ./build/
$ waffle .waffle.json
$ mocha
PancakeERC20
1) "before each" hook
PancakeFactory
2) "before each" hook
PancakePair
3) "before each" hook
0 passing (360ms)
3 failing
1) PancakeERC20
"before each" hook:
Uncaught Error: Callback was already called.
at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
at finish (internal/streams/writable.js:670:14)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at runNextTicks (internal/process/task_queues.js:62:3)
at processImmediate (internal/timers.js:434:9)
2) PancakeFactory
"before each" hook:
Uncaught Error: Callback was already called.
at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
at finish (internal/streams/writable.js:670:14)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
3) PancakePair
"before each" hook:
Uncaught Error: Callback was already called.
at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
at WriteStream.<anonymous> (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
at finish (internal/streams/writable.js:670:14)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at runNextTicks (internal/process/task_queues.js:62:3)
at processImmediate (internal/timers.js:434:9)
/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358
callback(err);
^
Error: Callback was already called.
at /mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
at WriteStream.<anonymous> (/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
at WriteStream.emit (events.js:315:20)
at WriteStream.destroy (/mnt/e/workspace/solidity/pancakeswap/pancake-swap-core/node_modules/level-ws/level-ws.js:140:8)
at finish (internal/streams/writable.js:670:14)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My nodeJS version is: v14.16.0
I am tryibg to swap wbnb and tokens. I got this error
https://testnet.bscscan.com/tx/0x12af2178ee050d375c3ee6f88d8fb6b0dd3e8bb4bde00518ce0792e55d00b6b5
how to fix it?
how can get this contract address on bsc test net
can't find on website docs
We deployed our BSC-Contract and added it to Pancakeswap. Now after 7 transactions the error message The transaction cannot succeed due to error: TransferHelper: TRANSFER_FROM_FAILED. This is probably an issue with one of the tokens you are swapping. appears. What is the error and how can I fix it? Would appreciate any fast help! contract adress is: 0xfc69c71d008e8ff7afc406d5b8d7916b519d76f1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.