-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flashswap #16
Comments
@jurgenBE Sorry I don't see any error message in the post. Can you share what exactly you ran and what you got on your machine or on your console? Please note that the article and this repository were created for entertaining and educational purpose only it does not guarantee that all codes are workable all the time. Thanks. |
@jurgenBE Hey so I think the issue here is that |
@benedictmc If you've got a tweaked code in hands, please raise a PR in the repository. I'll look into that and merge it into main branch. Thanks. |
@benedictmc thanks for that. were you able to execute the function after making this edit? I still get the same 'execution revert' error. |
@0xplask @benedictmc Please confirm the revised code and let me know if it works. I did some online research and updated the contract and the script. |
I have a question, if i use the code 'as is' it does not work, i always get 'Fail' but don't know if it's a failure in the contract or not, so i tried to add en event, but that's also not shown. Did your code work on mainnet like that, don't you have to sign the transaction or something. Do i have to hex the data first? I am getting desprerate, i've tried so many things...
this is the code, i do a reversal from apefactory to pancakerouter, and added 1 required to see if i see the message and added in the last try this emit event :
I already found out that it is in the pancakeCall function : i found that the error is showed here :
require(msg.sender == UniswapV2Library.pairFor(fromApeFactory, token0, token1), 'message fail 1');
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.6 <0.8.0;
import './utils/SafeMath.sol';
import './UniswapV2Library.sol';
import './interfaces/IERC20.sol';
import './interfaces/IUniswapV2Pair.sol';
import './interfaces/IUniswapV2Factory.sol';
import './interfaces/IUniswapV2Router02.sol';
import './interfaces/IPancakeCallee.sol';
import './interfaces/IApeCallee.sol';
contract EventExample {
using SafeMath for uint;
}
The text was updated successfully, but these errors were encountered: