Handle increase liquidity event (#143)

* Implement handler for NFPM IncreaseLiquidity event.

* Get contract values by querying uni-watcher.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
This commit is contained in:
Ashwin Phatak
2021-07-16 18:34:51 +05:30
committed by GitHub
co-authored by nabarun
parent ae13edb99a
commit 3477366458
16 changed files with 2575 additions and 1378 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ describe('Get value from storage', () => {
const { storageLayout } = contracts.TestAddress;
const { value, proof: { data: proofData } } = await getStorageValue(storageLayout, getStorageAt, blockHash, testAddress.address, 'address1');
expect(value).to.be.a('string');
expect(String(value).toLowerCase()).to.equal(address1Value);
expect(value).to.equal(address1Value);
if (isIpldGql) {
assertProofData(blockHash, testAddress.address, JSON.parse(proofData));
+4
View File
@@ -97,6 +97,10 @@ export const getValueByType = (storageValue: string, typeLabel: string): bigint
return utils.toUtf8String(storageValue);
}
if (typeLabel.startsWith('address')) {
return utils.getAddress(storageValue);
}
return storageValue;
};
+1 -1
View File
@@ -91,7 +91,7 @@ export const getStorageAt: GetStorageAt = async ({ blockHash, contract, slot })
*/
export const generateDummyAddresses = (length: number): Array<string> => {
return Array.from({ length }, () => {
return ethers.utils.hexlify(ethers.utils.randomBytes(20));
return ethers.utils.getAddress(ethers.utils.hexlify(ethers.utils.randomBytes(20)));
});
};