-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2116 from oasisprotocol/mz/oasisscanv2-vendor-test
Migrate oasis scan v1 vendor tests to v2
- Loading branch information
Showing
4 changed files
with
632 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Migrate oasis scan v1 vendor tests to v2 |
255 changes: 255 additions & 0 deletions
255
src/vendors/__tests__/__snapshots__/oasisscan-v2.test.ts.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,255 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`oasisscan-v2 parse account 1`] = ` | ||
{ | ||
"address": "oasis1qp53ud2pcmm73mlf4qywnrr245222mvlz5a2e5ty", | ||
"allowances": [ | ||
{ | ||
"address": "oasis1qrnu9yhwzap7rqh6tdcdcpz0zf86hwhycchkhvt8", | ||
"amount": "1000000000", | ||
}, | ||
], | ||
"available": "79081079928346", | ||
"debonding": "0", | ||
"delegations": "1582807331065921", | ||
"nonce": "103", | ||
"total": "1661888410994267", | ||
} | ||
`; | ||
|
||
exports[`oasisscan-v2 parse delegations 1`] = ` | ||
{ | ||
"debonding": [ | ||
{ | ||
"amount": "101817386235", | ||
"epoch": 38376, | ||
"shares": "101817386235", | ||
"validatorAddress": "oasis1qpqz2ut6a6prfcjm64xnpnjhsnqny6jqfyav829v", | ||
}, | ||
], | ||
"delegations": [ | ||
{ | ||
"amount": "1000395287073", | ||
"shares": "706988419241", | ||
"validatorAddress": "oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe", | ||
}, | ||
], | ||
} | ||
`; | ||
|
||
exports[`oasisscan-v2 parse transaction list 1`] = ` | ||
[ | ||
{ | ||
"amount": "44000000000", | ||
"fee": undefined, | ||
"from": "oasis1qqnk4au603zs94k0d0n7c0hkx8t4p6r87s60axru", | ||
"hash": "00c71fa97422eafe9f030720a3c57e52b24bca0c81cb161ea8a9e39e190628ac", | ||
"level": undefined, | ||
"nonce": "78", | ||
"round": 12638138, | ||
"runtimeId": "000000000000000000000000000000000000000000000000e2eaa99fc008f87f", | ||
"runtimeName": "Emerald", | ||
"status": 1, | ||
"timestamp": 1729693571000, | ||
"to": "oasis1qra2sljuf780qutea635w933r8pu6lesysxp6xw9", | ||
"type": "consensus.Deposit", | ||
}, | ||
{ | ||
"amount": "100000000", | ||
"fee": "0", | ||
"from": "oasis1qzyw98s2qrvf3t78nf0guu98laykw6lzkga5zlzy", | ||
"hash": "6cfbdac302bcf93d7f0204a04c5f8780719501fe238ab6b161b5ce7f6ebdbe92", | ||
"level": 22831816, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736930331000, | ||
"to": "oasis1qzca4c3gch3ymy3w7e5ffzf9l6alpazpf5ffyytn", | ||
"type": "staking.Transfer", | ||
}, | ||
{ | ||
"amount": "25000900000000", | ||
"fee": "0", | ||
"from": "oasis1qquj8fnczvzcvx8q560ym7js37lnz3wnjvtx5xvt", | ||
"hash": "667bd1bbfe6d217b906521d17f2d59d49f7daa33fc3b6c3292b59fe45c09fea6", | ||
"level": 22831554, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736928792000, | ||
"to": "oasis1qqekv2ymgzmd8j2s2u7g0hhc7e77e654kvwqtjwm", | ||
"type": "staking.AddEscrow", | ||
}, | ||
{ | ||
"amount": "238686295585", | ||
"fee": "2000", | ||
"from": "oasis1qqs5wnxvsk009swtt7ehm5fslxve96kczszwt47s", | ||
"hash": "14fd88b9a54c9f1023ba19e659738030a35d9776d49fb1109e36d79df16563d7", | ||
"level": 22826519, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736899208000, | ||
"to": "oasis1qqs5wnxvsk009swtt7ehm5fslxve96kczszwt47s", | ||
"type": "staking.ReclaimEscrow", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "2000", | ||
"from": "oasis1qrc8s2trrm9zgha8wq636yetx7sxjf7x35pf3vrc", | ||
"hash": "d468509acce7853226ac5a8552ea98b90b1231a08bd357d10bf95ffa50a12a89", | ||
"level": 22737133, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736372956000, | ||
"to": undefined, | ||
"type": "staking.AmendCommissionSchedule", | ||
}, | ||
{ | ||
"amount": "49900000000", | ||
"fee": "0", | ||
"from": "oasis1qqn0zqq0aw98dh50cqc5dfj4spam8cdddsqv4j6j", | ||
"hash": "4bed95352d63dff872ab87beaac84b9556b1848b4ae46d5ee17f7da3fc89edba", | ||
"level": 22825769, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736894808000, | ||
"to": "oasis1qrd3mnzhhgst26hsp96uf45yhq6zlax0cuzdgcfc", | ||
"type": "staking.Allow", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "0", | ||
"from": "oasis1qqwmgc8a3aznsq32tc2zq3z5erc7cnzcpcmvluqv", | ||
"hash": "da4566971b81ef8ae655b20ef4abaf5eee228574debdff36e57580d9fa885f50", | ||
"level": 22831864, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736930611000, | ||
"to": undefined, | ||
"type": "roothash.ExecutorCommit", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "0", | ||
"from": "oasis1qz5afnujgfsxhct630f8nlqtpgxd5kzlvuvtnfqr", | ||
"hash": "360011badfab81ba0532deaf67610d43a878d956e98c125e13a1a213c88be59e", | ||
"level": 22730556, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 0, | ||
"timestamp": 1736334075000, | ||
"to": undefined, | ||
"type": "registry.RegisterEntity", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "0", | ||
"from": "oasis1qq22fw848zvk97zc0x32vx2y4ff8dz2zx5temr0v", | ||
"hash": "996c6b02ee289d25a8aaca952b7e6a54bf60a08f808264cf352c5109cb8e206d", | ||
"level": 22831877, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1736930687000, | ||
"to": undefined, | ||
"type": "registry.RegisterNode", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "0", | ||
"from": "oasis1qrvmxhcjpjvgel9dqfs6zrnza3hqjpa6ug2arc0d", | ||
"hash": "3a2ab03593c6e49ce5b8a78538cd4ddbf528493578fb2e85884f81064bfec016", | ||
"level": 21327977, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 1, | ||
"timestamp": 1728043536000, | ||
"to": undefined, | ||
"type": "registry.RegisterRuntime", | ||
}, | ||
{ | ||
"amount": "0", | ||
"fee": "0", | ||
"from": "oasis1qpn83e8hm3gdhvpfv66xj3qsetkj3ulmkugmmxn3", | ||
"hash": "e31b538bd077e6e31e7b445d69159ab2a504605834365f412d16f61f1026d470", | ||
"level": 21169426, | ||
"nonce": undefined, | ||
"round": undefined, | ||
"runtimeId": undefined, | ||
"runtimeName": undefined, | ||
"status": 0, | ||
"timestamp": 1727107550000, | ||
"to": undefined, | ||
"type": "governance.CastVote", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`oasisscan-v2 parse validators 1`] = ` | ||
[ | ||
{ | ||
"address": "oasis1qqtmpsavs44vz8868p008uwjulfq03pcjswslutz", | ||
"current_rate": 0.08, | ||
"escrow": "155132526860793429", | ||
"media": { | ||
"email_address": "[email protected]", | ||
"logotype": "https://s3.amazonaws.com/keybase_processed_uploads/e976400f2c6613037aa555dd11394305_360_360.jpg", | ||
"twitter_acc": "Kiln_finance", | ||
"website_link": "https://kiln.fi", | ||
}, | ||
"name": "Kiln", | ||
"rank": 1, | ||
"status": "active", | ||
}, | ||
{ | ||
"address": "oasis1qq3xrq0urs8qcffhvmhfhz4p0mu7ewc8rscnlwxe", | ||
"current_rate": 0.05, | ||
"escrow": "141543315349195787", | ||
"media": { | ||
"email_address": "[email protected]", | ||
"logotype": "https://s3.amazonaws.com/keybase_processed_uploads/e1378cd4d5203ded716906687ad53905_360_360.jpg", | ||
"twitter_acc": "stakefish", | ||
"website_link": "https://stake.fish", | ||
}, | ||
"name": "stakefish", | ||
"rank": 2, | ||
"status": "active", | ||
}, | ||
{ | ||
"address": "oasis1qpn83e8hm3gdhvpfv66xj3qsetkj3ulmkugmmxn3", | ||
"current_rate": 0.08, | ||
"escrow": "123770022870837688", | ||
"media": { | ||
"email_address": "[email protected]", | ||
"logotype": "https://s3.amazonaws.com/keybase_processed_uploads/3a844f583b686ec5285403694b738a05_360_360.jpg", | ||
"twitter_acc": "ChorusOne", | ||
"website_link": "https://chorus.one/", | ||
}, | ||
"name": "Chorus One", | ||
"rank": 3, | ||
"status": "active", | ||
}, | ||
] | ||
`; |
Oops, something went wrong.