b459cf35ed
beginning work on method polling; first need to generate list of token holder address in a completely generic/contratc agnostic fashion. Created address retriever that can iterate through any given contract's watched events, finding the inputs/arguments with address type, and generate a list from those values. Edit: Contract objects now cache every event emitted address as its event logs are transformed into the repo to grow a list of contract associated addresses as we go
Ian Norden2018-11-04 15:26:39 -06:00
e9dbd771e5
tests and fixes for fetcher, parser, retriever, converter, and repository; update cmd and watcher
Ian Norden2018-11-03 14:02:31 -05:00
5307de2b97
modify go-etheruem vendor lib with methods that allow for unpacking of events into maps of interfaces
Ian Norden2018-11-03 14:01:41 -05:00
8ce75fe5ad
Generic watcher that takes a contract address, grabs the contract abi and starting block number, creates custom event filters, and extracts and transforms event data into postgres. Can configure to look at only a subset of events through CLI flag. Building but needs testing.
Ian Norden2018-11-03 14:00:25 -05:00
57820ff473
change transformer interface and watcher so that contract config is now fed into AddTransformers such that a single watcher can be loaded with transformers that use different cofigs
Ian Norden2018-09-19 12:22:05 -05:00
44177e0772
reorganizing contract-specific modules into event_triggered contract directories
Ian Norden2018-09-18 22:15:49 -05:00
d66e50dad6
Changes to address Rob's comments. Added generic/event_triggered transformer, tests, and repo migrations for Burn and Mint events
Ian Norden2018-08-31 14:48:43 -05:00
4aa403d90d
event_triggered transformer, transformer tests, and integrations tests for Transfer and Approval events
Ian Norden2018-08-28 16:03:55 -05:00
aa2068bd08
adjust retriever to pull token holder addresses from Transfer and Approval events (iterating over Approvals might be redundant); edit Makefile to import new missing dependencies of go-ethereum/accounts/keystore, organizing mocks and adding event related mocks and filters
Ian Norden2018-08-28 12:50:53 -05:00
ada872404e
Transfer and Approval event repo and repo tests + db migrations for these events.
Ian Norden2018-08-28 11:45:31 -05:00
55a73c5797
work on erc20 event_triggered functionality and generic helper for log unpacking and converting. helpers.ConvertToLog and helpers.createTopics have been adjusted to be variadic to work with event logs with any number of topics. Also uncovered issue with Dai and TrueUSD that means they doesn't really conform to the ERC20 standard. this is because they named their arguments to standard events like Approval and Trasnfer differently (e.g. Approval(src address, guy address, wad uint) and Approval(owner address, spender address, value uint) instead of the standard which is Approval(tokenOwner address, spender address, tokens uint)). This causes incompatibility with generic ERC20 entities and converters for these events.
Ian Norden2018-08-26 21:55:09 -05:00
44e0a8d303
retriever for generating list of all token holder addresses + updated transformer to use said addresses to populate balanceOf and allowance information and added database migrations for balance and allowance tables
Ian Norden2018-08-22 14:11:15 -05:00
1d50a0ace0
fixed tests for getting balanceOf and allowance, added balanceOf and allowance to the repo and repo tests and updated sql schema with new token_balance and token_allowance tables to accept this data
Ian Norden2018-08-22 13:10:23 -05:00
9b41000b88
Moved fetcher to generic directory (methods have to remain public since it is in seperate package now), added FetchHash method, created ERC20 and generic getters which call the fetcher with specific contract methods (GetTotalSupply, GetBalance, GetAllowance for ERC20 getter, and GetOwner, GetStoppedStatus, GetStringName, GetHashName, GetStringSymbol, GetHashSymbol, and GetDecimals for generic getter). Getter tests cover all but GetBalance and GetAllowance, and also cover all of the Fetcher methods- but with only nil methodArgs. GetAllowance and GetBalance tests are not working against infura and these are the only contract method calls with arguments passed in so I suspect this might be where the issue lies. Have tested GetBalance using previous version of FetchContractData without the variadic input to the Pack method and it fails with the same error so I don’t think it is due to those changes.
Ian Norden2018-08-14 23:17:22 -05:00
99e549b3df
changes to repo and repo tests so that supply table is organized and accessed by token_address
Ian Norden2018-08-12 15:35:23 -05:00
bea712ba10
fetcher tests for FetchBool and FetchAddress
Ian Norden2018-08-09 12:23:42 -05:00
ccd21f73c9
adjusted FetchContractData to work with variable number of contract method arguments, changed fetcher's FetchSupply method to more general FetchBigInt method and added FetchBool and FetchAddress methods
Ian Norden2018-08-09 11:58:06 -05:00