@@ -100,11 +100,12 @@ async function getTokensEquivalent (lpAddress, lpTokenAmount) {
100100}
101101
102102class MasterChef {
103- constructor ( chefABI , address , pendingMethodName ) {
103+ constructor ( chefABI , address , pendingMethodName , pendingSymbol = '' ) {
104104 this . address = address
105105 this . contract = new web3 . eth . Contract ( chefABI , address )
106106 this . decoder = new InputDataDecoder ( chefABI )
107107 this . pendingMethodName = pendingMethodName
108+ this . pendingSymbol = pendingSymbol
108109 }
109110
110111 lpTransactions ( walletTx , poolID ) {
@@ -144,7 +145,10 @@ class MasterChef {
144145 async getPendingReward ( poolID , walletAddress ) {
145146 const pendingReward = await this . contract . methods [ this . pendingMethodName ] ( poolID , walletAddress ) . call ( )
146147
147- const tokenName = this . pendingMethodName . replace ( 'pending' , '' ) . toUpperCase ( )
148+ let tokenName = this . pendingSymbol
149+ if ( tokenName === '' ) {
150+ tokenName = this . pendingMethodName . replace ( 'pending' , '' ) . toUpperCase ( )
151+ }
148152
149153 const rewards = { }
150154 rewards [ tokenName ] = parseFloat ( Web3 . utils . fromWei ( pendingReward ) )
@@ -245,7 +249,7 @@ class PancakeSwapChef extends MasterChef {
245249}
246250
247251class PancakeSwapCloneChef extends MasterChef {
248- constructor ( address , pendingMethodName ) {
252+ constructor ( address , pendingMethodName , tokenSymbol = '' ) {
249253 const newChefABI = pancakeSwapABI . map ( method => {
250254 if ( method . name !== 'pendingCake' ) {
251255 return method
@@ -259,12 +263,19 @@ class PancakeSwapCloneChef extends MasterChef {
259263}
260264
261265const defiPlatforms = {
266+ acryptos : new PancakeSwapCloneChef ( '0x96c8390BA28eB083A784280227C37b853bc408B7' , 'pendingSushi' , 'ACS' ) ,
262267 alpaca : new PancakeSwapCloneChef ( '0xA625AB01B08ce023B2a342Dbb12a16f2C8489A8F' , 'pendingAlpaca' ) ,
268+ apeSwap : new PancakeSwapCloneChef ( '0x5c8D727b265DBAfaba67E050f2f739cAeEB4A6F9' , 'pendingCake' , 'BANANA' ) ,
263269 autoFarm : new AutoFarmChef ( ) ,
264- pancakeSwap : new PancakeSwapChef ( ) ,
265270 bVault : new BVaultChef ( ) ,
271+ cafeSwap : new PancakeSwapCloneChef ( '0xc772955c33088a97D56d0BBf473d05267bC4feBB' , 'pendingCake' , 'BREW' ) ,
272+ coralFarm : new PancakeSwapCloneChef ( '0x713e34640ef300a0B178a9688458BbA8b1FA35A7' , 'pendingCrl' ) ,
266273 goose : new PancakeSwapCloneChef ( '0xe70E9185F5ea7Ba3C5d63705784D8563017f2E57' , 'pendingEgg' ) ,
267- saltSwap : new PancakeSwapCloneChef ( '0xB4405445fFAcF2B86BC2bD7D1C874AC739265658' , 'pendingSalt' )
274+ kebab : new PancakeSwapCloneChef ( '0x76FCeffFcf5325c6156cA89639b17464ea833ECd' , 'pendingCake' , 'KEBAB' ) ,
275+ pancakeSwap : new PancakeSwapChef ( ) ,
276+ ramen : new PancakeSwapCloneChef ( '0x97dd424b4628c8d3bd7fcf3a4e974cebba011651' , 'pendingCake' , 'RAMEN' ) ,
277+ saltSwap : new PancakeSwapCloneChef ( '0xB4405445fFAcF2B86BC2bD7D1C874AC739265658' , 'pendingSalt' ) ,
278+ slime : new PancakeSwapCloneChef ( '0x4B0073A79f2b46Ff5a62fA1458AAc86Ed918C80C' , 'pendingReward' , 'SLIME' )
268279}
269280
270281/**
0 commit comments