This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| updatePrices() { | |
| const batch = new web3.eth.BatchRequest() | |
| this.pairs = [] | |
| const requests = []; | |
| serializedPairs.forEach(lp => { | |
| requests.push(new Promise((resolve, reject) => { | |
| const contract = new web3.eth.Contract(pancakePairAbis, lp.pair.address) | |
| batch.add(contract.methods.getReserves().call.request((error, reserves) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class FluentCounter | |
| { | |
| private $count = 0; | |
| public function count() : self | |
| { | |
| $this->count += 1; | |
| return $this; |