Edvard Hübinette
571f300392
Add rendering of available transformer names to continuousLogSync help ( #109 )
2018-11-12 14:01:07 +01:00
Elizabeth
672269effa
VDB 207 refactor more repo tests ( #107 )
...
* Use shared repo tests for vat flux
* Use shared repo methods for vat flux
* Use shared repo test examples for vat fold
* Use shared repository methods for vat fold
* Use shared repo test examples for vat grab
* Use shared repo methods for vat grab
* Use shared repo test examples for vat heal
* Use shared repo methods for vat heal
2018-11-09 14:54:22 -06:00
Elizabeth
c1e10f09fb
Vdb 67 convert numbers to ray and wad ( #105 )
...
* Add method to convert values to ray or wad units
* Convert data to ray or wad for cat_file_chop_lump
* Use shared convert functions in price feed conversion
* Pull common ray/wad values into vars
* Fix after rebase with staging
2018-11-09 14:53:20 -06:00
Rob Mulholand
0b58efb56a
Extract common repository methods
...
- Inject column names to reduce duplication across common behavior
- Extract checked headers column names to constants
2018-11-08 13:08:59 -06:00
Rob Mulholand
8c168ed332
Extract constants package
...
- Reduce clutter in the shared package
2018-11-08 13:08:59 -06:00
Rob Mulholand
8c5192f82f
(VDB-210) Refactor tend repository tests
2018-11-08 13:08:59 -06:00
Rob Mulholand
1c1a9c699a
(VDB-209) Refactor price feed repository tests
2018-11-08 13:08:59 -06:00
Rob Mulholand
af8bbe5ce9
(VDB-208) Refactor pit file repository tests
2018-11-08 13:08:59 -06:00
Rob Mulholand
a1c4d70a77
(VDB-99) Transform Flap deal events
...
- Add flapper address to deal transformer config
2018-11-07 10:52:55 -06:00
Rob Mulholand
9cc9d4d3b6
(VDB-95) Transform Flop dent events
...
- Add flopper address to dent config
2018-11-07 10:52:55 -06:00
Rob Mulholand
52bbedd837
(VDB-98) Transform Flap tend events
...
- Add Flapper contract address to tend transformer config
2018-11-07 10:52:55 -06:00
Rob Mulholand
b2a78f1da4
Remove unused transformer config struct
2018-11-07 10:52:55 -06:00
Rob Mulholand
cb141f7cb7
(VDB-204) Add transformer for Flap kick
2018-11-07 10:52:55 -06:00
Taka Goto
627ae288bd
use self hosted parity kovan for staging
2018-11-06 12:58:45 -06:00
Takayuki Goto
7afd978cf0
Merge pull request #100 from 8thlight/update-integration-tests
...
integration tests hits self hosted remote parity kovan node:
2018-11-06 12:08:48 -06:00
Elizabeth
0ab5ea1b25
Refactor more repo tests ( #101 )
...
* Use shared repository tests for deal
* Small updates to repo tests
* Use shared repository test examples for dent
* Use shared repository test examples for drip_drip
* Use shared repository test examples for drip_file_ilk
* Use shared repository test examples for drip_file_repo
* Use shared repository test examples for drip_file_vow
* Update formatting
2018-11-06 10:51:26 -06:00
Elizabeth
a4abf3781e
Refactor repository tests ( #99 )
...
* Add shared test examples for repositories
- Create
- MissingHeaders
- MarkHeaderChecked
* Use shared repository tests for cat_file_chop_lump
* Use shared repository test for cat_file_flip
* Use shared repository test for cat_file_pit_vow
* Updates to shared repository tests
* Use shared repository tests for deal
* Small updates to repo tests
2018-11-06 10:30:31 -06:00
Elizabeth
bfe4531d7e
Common transformer tests ( #97 )
...
* Move chop lump transformer test to a generic log_note_transformer_test
* Add test cases to transformer test
- cat file flip
- cat file pit vow
- deal
- dent
* Move transformer tests over to transformer factor test file
- drip drip
- drip file ilk/repo/vow
- pit file deb ceiling/ilk/stability fee
- price feeds
* Move LogNoteTransformer test into factory package and remove log specific transformer tests
* Move Transformer test into factory package and remove log event specific transformer tests
* Respond to PR comments
2018-11-06 10:30:11 -06:00
Taka Goto
2cc9826be9
create integration toml file
2018-11-06 09:25:08 -06:00
Ian Norden
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
2018-11-04 21:37:31 -06:00
Ian Norden
e9dbd771e5
tests and fixes for fetcher, parser, retriever, converter, and repository; update cmd and watcher
2018-11-04 01:49:11 -05:00
Ian Norden
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.
2018-11-03 14:00:25 -05:00
Ian Norden
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.
2018-11-03 13:49:23 -05:00
Ian Norden
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
2018-11-03 13:49:23 -05:00
Rob Mulholand
ba071ef13f
Consolidate test doubles
...
- Migrate various mocks of core namespaces to shared version in `fakes` pkg
- Err on the side of making test doubles less sophisticated
- Don't pull over mocks of namespaces that are only used in example code
2018-11-03 13:49:23 -05:00
Rob Mulholand
5fe6394406
Add tests for pkg/geth/blockchain
...
- inject dependencies instead of initializing them in the constructor
2018-11-03 13:49:23 -05:00
Rob Mulholand
05186634bd
Add light sync command
...
- Only syncs block headers (excludes block bodies, transactions, receipts, and logs)
- Modifies validation window to include the most recent block
- Isolates validation window to the variable defined in the cmd directory (blocks
have a separate variable defined in the block_repository for determining when
to set a block as final)
2018-11-03 13:49:23 -05:00
Maxim Krasilnikov
7b507667f8
Added user and password to db config
2018-11-03 13:49:23 -05:00
Takayuki Goto
0d325afbfb
flop kick transformer factory ( #98 )
...
* flop kick transformer factory
* add tests for wrong model/entity
2018-11-02 09:13:10 -05:00
Elizabeth
981393d0a7
Use transformer factory for FlipKick ( #96 )
2018-11-02 09:12:51 -05:00
Taka Goto
3b722c132e
integration tests hits self hosted parity kovan node:
2018-11-01 10:24:03 -05:00
Elizabeth
ab4e904713
Frob transformer factory ( #95 )
...
* Updates to previous transformers
* Use transformer factory for Frob
* Move bite integration test to integrationt est pkg
2018-10-29 15:08:00 -05:00
Rob Mulholand
78b8173b37
Improve test coverage for event method signature lookups
2018-10-26 15:35:18 -05:00
Rob Mulholand
602802e5f4
Don't test order of DB results
...
- reduce flakiness by enabling tests to pass regardless of result order
2018-10-26 15:35:18 -05:00
Rob Mulholand
ed624330f6
Rename Flog pack to Vow flog
...
- enables differentiation if another contract implements flog
- also deletes flog-specific mocks
2018-10-26 15:35:18 -05:00
Rob Mulholand
1b680d2a4b
Use transformer factory for Drip drip
2018-10-26 15:35:18 -05:00
Edvard Hübinette
f3a82e6ba1
VDB-184 Refactor Dent ( #91 )
...
* Factorise dent transformer
* Update dent transformer tests
* Add additional tests to dent repository test
* Update dent to use LogNoteTransformer factory
2018-10-26 13:56:49 -05:00
Rob Mulholand
d1ee501f12
Use transformer factory for Bite ( #89 )
...
* Use transformer factory for Bite
- introduces separate transformer factory for non-LogNote events
- converter includes `ToEntities` for events defined via ABI
* Updates after rebasing with staging
2018-10-26 13:26:10 -05:00
Rob Mulholand
0e5b23993a
Discard log output from Vat heal during tests
2018-10-26 12:02:56 -05:00
Rob Mulholand
45a52a59f9
Add repository tests for Deal
2018-10-26 12:02:56 -05:00
Edvard
0e1675354f
Update tests for deal transformer
2018-10-26 12:02:56 -05:00
Edvard
35a8009410
Refactor deal transformer to use factory
2018-10-26 12:02:56 -05:00
Elizabeth
d522d33531
Update vat heal to use transformer factory ( #88 )
...
* Update vat heal to use transformer factory
2018-10-26 11:40:24 -05:00
Rob Mulholand
5de949f4c5
Add cat file repository tests
2018-10-26 11:36:02 -05:00
Edvard
00bb48bafb
Fix whitespace errors
2018-10-26 11:36:02 -05:00
Edvard
e6e2ed3308
Update cat file transformer tests
2018-10-26 11:36:02 -05:00
Edvard
28ab5f92ab
Factorise cat_file transformers
2018-10-26 11:36:02 -05:00
Rob Mulholand
47a3c35938
Use transformer factory for Price Feed events
2018-10-26 11:25:16 -05:00
Elizabeth
bd428e752a
Update vat grab to use transformer factory ( #85 )
...
* Update vat grab to use transformer factory
2018-10-26 11:02:39 -05:00
Rob Mulholand
745b3a460e
Add test for updating existing checked header row
2018-10-26 10:45:49 -05:00
Rob Mulholand
e37447ae9a
Use transformer factory for Vat fold
2018-10-26 10:45:49 -05:00
Takayuki Goto
0e7f316568
flip kick integration test ( #83 )
...
* flip kick integration test
* use timestamp instead to compare date
* fix after rebase staging
2018-10-26 10:26:22 -05:00
Rob Mulholand
3ec5b4afab
Remove unused param in integration test helper
2018-10-25 10:02:06 -05:00
Rob Mulholand
8831586fba
Extract shared mock converter and repository
2018-10-25 10:02:06 -05:00
Rob Mulholand
f5b9a21a8c
Use transformer factory for Vat slip
2018-10-25 10:02:06 -05:00
Rob Mulholand
1e7ee08af5
Use transformer factory for Vat toll
2018-10-25 10:02:06 -05:00
Rob Mulholand
6d662a6ce7
Add test for can't create Vat tune of wrong type
2018-10-25 10:02:06 -05:00
Rob Mulholand
a0cae99437
Use transformer factory for Vat flux
2018-10-25 10:02:06 -05:00
Edvard Hübinette
be249437c2
VDB-117: Add Vow.flog
transformer ( #80 )
...
* Add DB migrations for flog
* Add Vow addresses and constants
* Add err logging to ABI signature getter, test for flog sig
* Add flog transformer
* Add tests+data for flog transformer
* Prepend DB tables and columns with vow_
* Panic on failure to get method sig
2018-10-25 12:19:46 +02:00
Rob Mulholand
78d746bb5b
Use transformer factory for Vat tune
2018-10-24 15:49:19 -05:00
Elizabeth
5682ee988b
Add log index to various events ( #78 )
...
* Add log_index field to flip kick
* Add log index to flop kick
* Add repo tests for Cat.file
* Add log_index to vat_flux
* Add log_index to vat_slip
* Add log_index to vat_toll
* Add log_index to vat_tune
* Add test to repos for updating checked headers
2018-10-23 16:33:04 -05:00
Takayuki Goto
28f8861f81
Merge pull request #71 from 8thlight/VDB-150-vat-flux-integration-test
...
integration test for vat flux
2018-10-23 16:01:42 -05:00
Rob Mulholand
42d60c3cbd
Add log index to Vat move
2018-10-23 15:25:21 -05:00
Rob Mulholand
4ac896c246
Add log index to Vat init
2018-10-23 15:25:21 -05:00
Rob Mulholand
702f90367a
Add log index to Vat heal
2018-10-23 15:25:21 -05:00
Rob Mulholand
650bbf5874
Add log index to Vat grab
2018-10-23 15:25:21 -05:00
Rob Mulholand
1e74c73591
Add log index to Vat fold
2018-10-23 15:25:21 -05:00
Rob Mulholand
db52955669
Add log index to Tend
2018-10-23 15:25:21 -05:00
Rob Mulholand
e0253cce55
Add log index to Price Feed events
2018-10-23 15:25:21 -05:00
Rob Mulholand
a0a86871b5
Add log index to Frob
2018-10-23 15:25:21 -05:00
Rob Mulholand
b3d00fe3c5
Add log index to Pit file events
2018-10-23 15:25:21 -05:00
Edvard
a0deb5eb62
Add and use transformer labels in shared constants
2018-10-23 11:23:31 +02:00
Edvard
f55449d0e5
Replace GinkgoRandomSeed with proper randomisation
2018-10-23 10:47:01 +02:00
Edvard
794a7e5f99
Nuke some leftover converter interfaces
2018-10-23 10:47:01 +02:00
Edvard
6d9547a888
Fix invalidated test for tend repository
2018-10-23 10:47:01 +02:00
Edvard
7ee3329baf
Privatise DB repository field and add transformer test
2018-10-23 10:47:01 +02:00
Edvard
cb74cbe990
Add cast error checking to refactored transformers
2018-10-23 10:47:01 +02:00
Edvard
b7f8432e65
Fix git whitespace warnings
2018-10-23 10:47:00 +02:00
Edvard
bb204b6b14
Remove unnecessary type washing in factory transformer
2018-10-23 10:45:48 +02:00
Edvard
e7e511764e
Implement skip to next header on empty matchingLogs
2018-10-23 10:45:48 +02:00
Edvard
33f1f62c11
Implement SingleTransformerConfig
2018-10-23 10:45:48 +02:00
Edvard
7d3bf1f0f6
Fixes after rebase
2018-10-23 10:45:48 +02:00
Edvard
70722fc9e3
Add todo for changing to single topic in shared transformer config
2018-10-23 10:45:48 +02:00
Edvard
2a9fafca08
Update drip_file tests
2018-10-23 10:45:48 +02:00
Edvard
dc4eb009c1
Refactor drip_file transformers
2018-10-23 10:45:48 +02:00
Edvard
ccca6e0229
Update old pit file shared config references
2018-10-23 10:43:03 +02:00
Edvard
d9b6603109
Update pit file debt ceiling tests
2018-10-23 10:43:03 +02:00
Edvard
24199cb67e
Refactor pit file debt ceiling transformer
2018-10-23 10:43:03 +02:00
Edvard
0239c4daf6
Fix sneaky missing asterisk
2018-10-23 10:43:03 +02:00
Edvard
399b3b78a0
Update tests for pit file ilk transformer
2018-10-23 10:43:03 +02:00
Edvard
98062a7970
Refactor pit file ilk transfomer
2018-10-23 10:43:03 +02:00
Edvard
837a777c8a
Update transformer name for stability fee
2018-10-23 10:43:03 +02:00
Edvard
3412866182
Update tests for stability_fee
2018-10-23 10:43:03 +02:00
Edvard
2cc303a2f5
Refactor stability_fee transfomer
2018-10-23 10:43:03 +02:00
Edvard
57b3744085
Update tend tests
2018-10-23 10:43:03 +02:00
Edvard
a4df8f348d
Refactor Tend transformer using factory
2018-10-23 10:43:03 +02:00
Edvard
4d36f6200d
Further refactor move and init tests
2018-10-23 10:43:03 +02:00
Edvard
c4d3783f8b
Expand error logging in transformer
2018-10-23 10:43:03 +02:00
Edvard
719ffd5819
Update vat init tests for factory
2018-10-23 10:43:03 +02:00
Edvard
fedbce80f6
Refactor vat init transformer to use factory
2018-10-23 10:43:03 +02:00
Edvard
177d212cc4
Add SetDB test for vat move
2018-10-23 10:43:03 +02:00
Edvard
32654ffabc
Add transformer name to config for logging in factory transformer
2018-10-23 10:43:03 +02:00
Edvard
46d8ea8d97
Snag transformer topics from config in factory
2018-10-23 10:43:03 +02:00
Edvard
155569a1d8
Update vat_move tests
2018-10-23 10:43:03 +02:00
Edvard
af1dfbc489
Implement vat_move transformer using factory
2018-10-23 10:43:03 +02:00
Edvard
15e33db33d
Fix transformer factory
2018-10-23 10:43:03 +02:00
Edvard
1b9e6491da
Add transformer factory
2018-10-23 10:43:03 +02:00
Elizabeth
954fcf2378
integration tests ( #75 )
...
* Deal integration test
* Add LogIndex to CatFileChopLump to update unique constraint
* Add LogIndex to cat_file_pit_vow records
* Add integration tests for Cat.file transformers
* Add log index to Cat.file flip
2018-10-22 13:28:42 -05:00
Rob Mulholand
d87fb14c6b
Add log index to Drip file events
2018-10-22 12:14:43 -05:00
Rob Mulholand
de294ad8ea
Add log index to Drip drip
2018-10-22 12:14:43 -05:00
Rob Mulholand
e5ba0496a6
Add log index to Dent
2018-10-22 12:14:43 -05:00
Rob Mulholand
1aafb7201e
Add log index to Deal
2018-10-22 12:14:43 -05:00
Rob Mulholand
495f39abb8
Add log index to Bite
2018-10-22 12:14:43 -05:00
Rob Mulholand
ea3de51792
Add Flop kick integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
fa828cf041
Add Tend integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
cbb5ffa3c7
Add Pit file stability fee integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
3449a1e246
Add Pit file debt ceiling integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
a83bf5ed0d
Add Pit file ilk integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
677e78891d
Add Drip file vow integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
0ce3e3d829
Add Bite integration test
2018-10-19 14:21:57 -05:00
Rob Mulholand
ddc7ee5143
Add Drip drip integration test
2018-10-19 10:56:28 -05:00
Rob Mulholand
b067ba565e
Add Vat fold integration test
2018-10-19 10:56:28 -05:00
Rob Mulholand
fdbe0b0b44
Add Vat heal integration test
2018-10-19 10:56:28 -05:00
Rob Mulholand
a7b9b825c8
Add Vat init integration test
2018-10-19 10:56:28 -05:00
Rob Mulholand
9b427ea1e9
Add Vat move integration test
2018-10-19 10:56:28 -05:00
Taka Goto
21088eb3a2
integration test for vat flux
2018-10-17 16:25:12 -05:00
Konstantin Zolotarev
b38c29ce43
Merge pull request #64 from 8thlight/contract_addresses
...
Added configuration for contract addresses
2018-10-17 21:34:25 +03:00
Rob Mulholand
130d11d0aa
Add Vat slip transformer
2018-10-17 13:30:35 -05:00
Elizabeth
3baca64903
Update address formatting ( #67 )
...
* Add getSignatures command for list of signatures in constants
* Update VatTune converter's formatting of addresses
and added an integration test
* Move VatTune and PriceFeeds integration tests to a common suite
* Update VatGrab converter for address format
* Update frob converter to fix urn and ilk formatting/decoding
* Update formatting
* Update make test command and add integrationtest command
* Add integration test to travis build
* Update creating headers in integration tests to include Raw and Timestamp fields
2018-10-17 13:04:55 -05:00
Taka Goto
4721a91faa
use before each for transformer test
2018-10-17 12:15:15 -05:00
Taka Goto
a3ca319e9b
remove unnecessary byte slicing
2018-10-17 12:04:11 -05:00
Taka Goto
2f64269ab3
update from pr feedback; update tests and use shared fake header
2018-10-17 11:48:57 -05:00
Taka Goto
f32a4fa2a5
use kovan vat contract address
2018-10-17 10:55:30 -05:00
Taka Goto
2e72a7e940
vat flux transformer
2018-10-17 10:53:53 -05:00
Rob Mulholand
d0226dbce5
Convert Bite event field types to numeric
...
- Enables arithmetic operations when constructing views
- Also removes application-level references to DB ID
2018-10-16 15:27:13 -05:00
Rob Mulholand
d3df685c46
Add timestamp to block header
...
- Enables quickly deriving timestamp from header for log events
2018-10-12 12:00:02 -05:00
Rob Mulholand
5f67161f41
Convert raw header to JSON
...
- Enables parsing values off of header via Postgres migration
2018-10-12 12:00:02 -05:00
Edvard Hübinette
be58dd4ac8
Add vat_move
transformer ( #47 )
...
* Add vat_move transformer base
* Add vat_move migrations
* Add test data for vat_move
* Add vat_move transformer to initialisers
* Add numeric cast to psql insert of Rad
* Add new db schema
* Dependency update
* Expand abbreviation in repository
* Add test suite for vat_move
* Add header checking to transformer and mock repository
* Remove trailing zero in test data
* Fix minor mishaps
* Go fmt nitpicking
* Refactoring in tests
* Add tests covering checked headers stuff (and fix revealed bugs)
* go fmt fixes
* Implement batching behaviour of transformer
* Small fixes after review
* Go fmt
2018-10-12 16:13:13 +02:00
Konstantin Zolotarev
0b281eab47
Added default addresses to config & rename fallback var
2018-10-12 11:11:31 +03:00
Konstantin Zolotarev
245732b7f4
Added configuration for contract addresses
2018-10-11 19:10:53 +03:00
Elizabeth
6c77f369d9
Vat heal ( #56 )
...
* VatHeal Converter
* Add VatHeal repository
* Add VatHeal transformer
* Add VatHeal to continuousLogSync command
* Mark vat_init_checked as true when creating vat init records
* Update urn and v converting
* Return error if Repository.MarkCheckedHeader fails
* Add deleting vat heal from test cleanup method
2018-10-10 11:56:06 -05:00
David Terry
0bb3737027
vat.fold: pull common test setup into BeforeEach blocks
2018-10-10 18:13:10 +03:00
David Terry
b1745a6403
Merge branch 'staging' into VDB-101-vat-fold-transformer
...
Conflicts:
cmd/continuousLogSync.go
db/schema.sql
pkg/transformers/shared/constants.go
pkg/transformers/transformers.go
test_config/test_config.go
2018-10-10 14:09:14 +03:00
David Terry
89ec0a1cab
documentation: document config file for transformers
2018-10-10 14:06:00 +03:00
David Terry
95f1c94bf5
vat.fold: check for errors in insert before updating checked_headers
2018-10-10 14:03:37 +03:00
David Terry
1273acb733
vat.fold: add repository tests for MarkHeaderChecked
2018-10-10 13:51:44 +03:00
David Terry
3778d7ac06
vat.fold: add transformer tests for MarkHeaderChecked
2018-10-10 13:40:25 +03:00
David Terry
7e7ad13de6
vat.fold: handle errors
2018-10-10 13:39:33 +03:00
David Terry
dde57178f1
vat.fold: break out of loop in transformer if no logs found
2018-10-10 13:38:57 +03:00
David Terry
724839ce4a
documentation: document vat event types
2018-10-10 13:37:59 +03:00