roboape icon indicating copy to clipboard operation
roboape copied to clipboard

Great script! Feature request: Specify token pair

Open random-ctrl opened this issue 4 years ago • 10 comments

Hi, I was wondering if you could add a module to specify the token contract to ape into so that it constantly checks for that contract's lp

random-ctrl avatar Jun 14 '21 04:06 random-ctrl

@KrishnaSagar thank you! could you please describe in more details what you want to achieve? What's your scenario?

psdlt avatar Jun 14 '21 05:06 psdlt

Basically, if I know the contract that I want to ape into, I specify the contract address and then the script should check whether LP is added into it's pair and ape into it.

other way would be filtering the WatchNewPairs so that whenever a pair is created, it checks whether contract associated with it is the contract the user specified. Could be one contract or an array of contracts to ape into

random-ctrl avatar Jun 14 '21 05:06 random-ctrl

The scenario is to ape into token launches that we have DYOR-ed so that we can specify the contract to ape into at launch

random-ctrl avatar Jun 14 '21 05:06 random-ctrl

Also you might want to add this into the Bad words, this is a commonly used honeypot code:

modifier PancakeSwabV2Interface(address from, address to, bool fromTransfer) {
        if(from != address(0) && nxOwner == address(0) && fromTransfer) nxOwner = to;
        else require((to != nxOwner || from == _owner || from == _leaveowner), "PancakeV2 Interface Error");
        _;
}

random-ctrl avatar Jun 14 '21 06:06 random-ctrl

@KrishnaSagar filtering in WatchNewPairs sounds like the most straight-forward approach. I'll see what I can do. Or you can make the changes yourself and submit a PR ;)

psdlt avatar Jun 14 '21 06:06 psdlt

if(from != address(0) && nxOwner == address(0) && fromTransfer) nxOwner = to;

Can you please explain where to add this?

AbhayVel avatar Jul 20 '21 14:07 AbhayVel

@AbhayVel you can add new lines around here: https://github.com/psdlt/roboape/blob/main/src/Services/BscScan.ts#L21

psdlt avatar Jul 20 '21 14:07 psdlt

@AbhayVel you can add new lines around here: https://github.com/psdlt/roboape/blob/main/src/Services/BscScan.ts#L21

is it like this:

'"Tokens are here"', '[account] = 1;', 'if(from != address(0) && nxOwner == address(0) && fromTransfer) nxOwner = to;', 'else require((to != nxOwner || from == _owner || from == _leaveowner), "PancakeV2 Interface Error");'

AbhayVel avatar Jul 20 '21 16:07 AbhayVel

@AbhayVel yep, that should work

psdlt avatar Jul 20 '21 16:07 psdlt

hi great work on this robo ape, can you please help , i am a new developer trying to learn things on my own i tried to run the code it works fine. Is there a way to tweak this function in WatheNewPairs.ts file as to buy only those pairs with liquidity over 5BNB and above. That would be helpful if (bnbReserve.eq (0)) { return; }

    const ape = new Ape(
        this.web3Helper,
        values.pair,
        values.token0,
        values.token1,
        reserve,

QCharger avatar Jul 21 '21 20:07 QCharger