@reality.eth/contracts 3.2.22 → 3.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +2 -2
  2. package/chains/deployments/1/ETH/RealityETH-3.0.json +1 -0
  3. package/chains/deployments/10/OETH/RealityETH-3.0.json +3 -1
  4. package/chains/deployments/100/XDAI/RealityETH-3.0.json +3 -1
  5. package/chains/deployments/11155111/ETH/RealityETH-3.0.json +2 -1
  6. package/chains/deployments/130/ETH/RealityETH-3.0.json +1 -1
  7. package/chains/deployments/42161/ARETH/RealityETH-3.0.json +3 -1
  8. package/chains/deployments/421614/ETH/RealityETH-3.0.json +2 -1
  9. package/chains/deployments/8453/ETH/RealityETH-3.0.json +2 -1
  10. package/chains/supported.json +62 -14
  11. package/generated/chains.json +23 -0
  12. package/generated/contract_token_lookup.json +476 -0
  13. package/generated/contracts.json +17 -7
  14. package/generated/tokens.json +45 -23
  15. package/generated/website-data.js +1 -0
  16. package/package.json +7 -3
  17. package/scripts/generate_chains_json.js +8 -0
  18. package/scripts/generate_contract_token_lookup.js +40 -0
  19. package/scripts/generate_indexer_config.js +111 -0
  20. package/scripts/generate_ponder_config.js +222 -0
  21. package/scripts/generate_website_data.js +68 -0
  22. package/scripts/update_token_prices.js +144 -0
  23. package/tests/python/requirements.txt +0 -4
  24. package/tests/python/test.py +37 -34
  25. package/tests/python/test_erc20.py +27 -25
  26. package/tokens/ARETH.json +3 -2
  27. package/tokens/AVAX.json +2 -1
  28. package/tokens/BNB.json +2 -1
  29. package/tokens/BOND.json +2 -1
  30. package/tokens/CELO.json +3 -2
  31. package/tokens/CTH.json +2 -1
  32. package/tokens/DAOOS.json +2 -1
  33. package/tokens/DEXE.json +2 -1
  34. package/tokens/ETH.json +3 -2
  35. package/tokens/FOX.json +2 -1
  36. package/tokens/GNO.json +4 -3
  37. package/tokens/MATIC.json +2 -1
  38. package/tokens/MONAD.json +3 -2
  39. package/tokens/OETH.json +3 -2
  40. package/tokens/POLK.json +2 -1
  41. package/tokens/SUKU.json +2 -1
  42. package/tokens/SWISE.json +2 -1
  43. package/tokens/TLOS.json +3 -2
  44. package/tokens/TRST.json +2 -1
  45. package/tokens/UBQ.json +2 -1
  46. package/tokens/XDAI.json +3 -2
  47. package/tokens/ZBS.json +2 -1
@@ -1,27 +1,30 @@
1
1
  import unittest
2
2
  from unittest import TestCase, main
3
- from ethereum.utils import decode_hex, encode_hex
4
- from ethereum.tools import tester as t
5
- #from ethereum.tools.tester import TransactionFailed, ABIContract
6
3
 
7
4
  from eth_tester.exceptions import TransactionFailed
8
5
 
9
-
10
- from ethereum.tools import keys
11
- from ethereum.abi import ContractTranslator
12
- import time
13
- from sha3 import keccak_256
14
6
  from hashlib import sha256
15
7
 
16
8
  from web3.providers.eth_tester import EthereumTesterProvider
17
9
  from web3 import Web3
18
10
 
19
11
  import json
20
- import bitcoin
21
12
  import os
22
13
 
23
14
  import time
24
15
 
16
+ def decode_hex(hex_str):
17
+ if isinstance(hex_str, (bytes, bytearray)):
18
+ return hex_str
19
+ if hex_str.startswith('0x') or hex_str.startswith('0X'):
20
+ hex_str = hex_str[2:]
21
+ return bytes.fromhex(hex_str)
22
+
23
+ def encode_hex(b):
24
+ if isinstance(b, (bytes, bytearray)):
25
+ return b.hex()
26
+ return hex(b)[2:]
27
+
25
28
  from eth_tester import EthereumTester, PyEVMBackend
26
29
 
27
30
  # Command-line flag to skip tests we're not working on
@@ -205,7 +208,7 @@ class TestRealitio(TestCase):
205
208
  def _contractFromBuildJSON(self, con_name, sender=None, startgas=DEPLOY_GAS):
206
209
 
207
210
  if sender is None:
208
- sender = t.k0
211
+ sender = self.web3.eth.accounts[0]
209
212
 
210
213
  bytecode_file = '../../bytecode/' + con_name + '.bin'
211
214
  bcode = None
@@ -397,7 +400,7 @@ class TestRealitio(TestCase):
397
400
  self.rc0.functions.getFinalAnswerIfMatches(
398
401
  self.question_id,
399
402
  decode_hex(expect_ch[2:]),
400
- keys.privtoaddr(t.k2),
403
+ self.web3.eth.accounts[2],
401
404
  0,
402
405
  25
403
406
  ).call()
@@ -492,11 +495,11 @@ class TestRealitio(TestCase):
492
495
  # The arbitrator cannot submit an answer that has not been requested.
493
496
  # (If they really want to do this, they can always pay themselves for arbitration.)
494
497
  with self.assertRaises(TransactionFailed):
495
- self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
498
+ self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
496
499
 
497
500
  # You cannot notify realitio of arbitration unless you are the arbitrator
498
501
  with self.assertRaises(TransactionFailed):
499
- self.rc0.functions.notifyOfArbitrationRequest(self.question_id, keys.privtoaddr(t.k0), 0).transact()
502
+ self.rc0.functions.notifyOfArbitrationRequest(self.question_id, self.web3.eth.accounts[0], 0).transact()
500
503
 
501
504
  self.assertFalse(self.rc0.functions.isFinalized(self.question_id).call())
502
505
 
@@ -504,7 +507,7 @@ class TestRealitio(TestCase):
504
507
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
505
508
  question = self.rc0.functions.questions(self.question_id).call()
506
509
  self.assertTrue(question[QINDEX_IS_PENDING_ARBITRATION], "When arbitration is pending for an answered question, we set the is_pending_arbitration flag to True")
507
- self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
510
+ self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
508
511
 
509
512
  self.assertTrue(self.rc0.functions.isFinalized(self.question_id).call())
510
513
  self.assertEqual(from_answer_for_contract(self.rc0.functions.getFinalAnswer(self.question_id).call()), 123456, "Arbitrator submitting final answer calls finalize")
@@ -540,7 +543,7 @@ class TestRealitio(TestCase):
540
543
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
541
544
 
542
545
  arb_answer = to_answer_for_contract(1001)
543
- arb_payer = keys.privtoaddr(t.k2)
546
+ arb_payer = self.web3.eth.accounts[2]
544
547
 
545
548
  hist_hash = self.rc0.functions.questions(self.question_id).call()[QINDEX_HISTORY_HASH]
546
549
 
@@ -594,7 +597,7 @@ class TestRealitio(TestCase):
594
597
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
595
598
 
596
599
  arb_answer = to_answer_for_contract(1001)
597
- arb_payer = keys.privtoaddr(t.k2)
600
+ arb_payer = self.web3.eth.accounts[2]
598
601
 
599
602
  hist_hash = self.rc0.functions.questions(self.question_id).call()[QINDEX_HISTORY_HASH]
600
603
 
@@ -643,7 +646,7 @@ class TestRealitio(TestCase):
643
646
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
644
647
 
645
648
  arb_answer = to_answer_for_contract(98765)
646
- arb_payer = keys.privtoaddr(t.k2)
649
+ arb_payer = self.web3.eth.accounts[2]
647
650
 
648
651
  hist_hash = self.rc0.functions.questions(self.question_id).call()[QINDEX_HISTORY_HASH]
649
652
 
@@ -687,7 +690,7 @@ class TestRealitio(TestCase):
687
690
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
688
691
 
689
692
  arb_answer = to_answer_for_contract(123456)
690
- arb_payer = keys.privtoaddr(t.k2)
693
+ arb_payer = self.web3.eth.accounts[2]
691
694
 
692
695
  hist_hash = self.rc0.functions.questions(self.question_id).call()[QINDEX_HISTORY_HASH]
693
696
 
@@ -735,7 +738,7 @@ class TestRealitio(TestCase):
735
738
  self.assertTrue(self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee)), "Requested arbitration")
736
739
 
737
740
  arb_answer = to_answer_for_contract(0)
738
- arb_payer = keys.privtoaddr(t.k2)
741
+ arb_payer = self.web3.eth.accounts[2]
739
742
 
740
743
  ##self.rc0.functions.claimWinnings(self.question_id, st['hash'], st['addr'], st['bond'], st['answer']).transact()
741
744
  self.assertEqual(st['answer'][-1], to_answer_for_contract(1001))
@@ -762,11 +765,11 @@ class TestRealitio(TestCase):
762
765
  # The arbitrator cannot submit an answer that has not been requested.
763
766
  # (If they really want to do this, they can always pay themselves for arbitration.)
764
767
  with self.assertRaises(TransactionFailed):
765
- self.arb0.functions.assignWinnerAndSubmitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
768
+ self.arb0.functions.assignWinnerAndSubmitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
766
769
 
767
770
  # You cannot notify realitio of arbitration unless you are the arbitrator
768
771
  with self.assertRaises(TransactionFailed):
769
- self.rc0.functions.notifyOfArbitrationRequest(self.question_id, keys.privtoaddr(t.k0), 0).transact()
772
+ self.rc0.functions.notifyOfArbitrationRequest(self.question_id, self.web3.eth.accounts[0], 0).transact()
770
773
 
771
774
  self.assertFalse(self.rc0.functions.isFinalized(self.question_id).call())
772
775
 
@@ -775,7 +778,7 @@ class TestRealitio(TestCase):
775
778
  question = self.rc0.functions.questions(self.question_id).call()
776
779
  #self.assertEqual(question[QINDEX_FINALIZATION_TS], 1, "When arbitration is pending for an answered question, we set the finalization_ts to 1")
777
780
  self.assertTrue(question[QINDEX_IS_PENDING_ARBITRATION], "When arbitration is pending for an answered question, we set the is_pending_arbitration flag to True")
778
- self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
781
+ self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
779
782
 
780
783
  self.assertTrue(self.rc0.functions.isFinalized(self.question_id).call())
781
784
  self.assertEqual(from_answer_for_contract(self.rc0.functions.getFinalAnswer(self.question_id).call()), 123456, "Arbitrator submitting final answer calls finalize")
@@ -835,7 +838,7 @@ class TestRealitio(TestCase):
835
838
  # The arbitrator cannot submit an answer that has not been requested.
836
839
  # (If they really want to do this, they can always pay themselves for arbitration.)
837
840
  with self.assertRaises(TransactionFailed):
838
- self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
841
+ self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
839
842
 
840
843
  # The arbitrator cannot cancel arbitration that has not been requested
841
844
  with self.assertRaises(TransactionFailed):
@@ -1079,7 +1082,7 @@ class TestRealitio(TestCase):
1079
1082
  st = None
1080
1083
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1001, 0, 2, k4)
1081
1084
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1002, 2, 4, k3)
1082
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
1085
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
1083
1086
  with self.assertRaises(TransactionFailed):
1084
1087
  txid = self.arb0.functions.requestArbitration(self.question_id, 2).transact(self._txargs(val=fee))
1085
1088
  self.raiseOnZeroStatus(txid)
@@ -1088,7 +1091,7 @@ class TestRealitio(TestCase):
1088
1091
 
1089
1092
  @unittest.skipIf(WORKING_ONLY, "Not under construction")
1090
1093
  def test_bond_claim_arbitration_existing_none(self):
1091
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
1094
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
1092
1095
  with self.assertRaises(TransactionFailed):
1093
1096
  txid = self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee))
1094
1097
  self.raiseOnZeroStatus(txid)
@@ -1096,7 +1099,7 @@ class TestRealitio(TestCase):
1096
1099
 
1097
1100
  @unittest.skipIf(WORKING_ONLY, "Not under construction")
1098
1101
  def test_bond_claim_arbitration_existing_final(self):
1099
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
1102
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
1100
1103
  k3 = self.web3.eth.accounts[3]
1101
1104
  k4 = self.web3.eth.accounts[4]
1102
1105
 
@@ -1405,7 +1408,7 @@ class TestRealitio(TestCase):
1405
1408
  if ERC20:
1406
1409
  self._issueTokens(k3, 1000, 1000)
1407
1410
 
1408
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
1411
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
1409
1412
 
1410
1413
  st = None
1411
1414
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1002, 0, 1, k3, True)
@@ -1517,7 +1520,7 @@ class TestRealitio(TestCase):
1517
1520
  self._issueTokens(k3, 1000000, 1000000)
1518
1521
  self._issueTokens(k4, 1000000, 1000000)
1519
1522
 
1520
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
1523
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
1521
1524
 
1522
1525
  st = None
1523
1526
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1001, 0, 2, k4)
@@ -2346,27 +2349,27 @@ class TestRealitio(TestCase):
2346
2349
  self.raiseOnZeroStatus(txid)
2347
2350
 
2348
2351
  with self.assertRaises(TransactionFailed):
2349
- txid = self.arb0.functions.updateRegisteredWallet(t.a8).transact(self._txargs(sender=k2))
2352
+ txid = self.arb0.functions.updateRegisteredWallet(self.web3.eth.accounts[8]).transact(self._txargs(sender=k2))
2350
2353
  self.raiseOnZeroStatus(txid)
2351
2354
 
2352
- self.arb0.functions.updateRegisteredWallet(t.a8).transact()
2355
+ self.arb0.functions.updateRegisteredWallet(self.web3.eth.accounts[8]).transact()
2353
2356
 
2354
2357
  if ERC20:
2355
2358
  # Skip this for now as we're not actually using the RegisteredWallet
2356
2359
  return
2357
2360
 
2358
2361
  if ERC20:
2359
- start_arb_bal = self.token0.functions.balanceOf(t.a8).call()
2362
+ start_arb_bal = self.token0.functions.balanceOf(self.web3.eth.accounts[8]).call()
2360
2363
  else:
2361
- start_arb_bal = self.web3.eth.get_balance(t.a8)
2364
+ start_arb_bal = self.web3.eth.get_balance(self.web3.eth.accounts[8])
2362
2365
 
2363
2366
  self.arb0.functions.callWithdraw().transact(self._txargs(sender=k7))
2364
2367
  self.arb0.functions.withdrawToRegisteredWallet().transact(self._txargs(sender=k4))
2365
2368
 
2366
2369
  if ERC20:
2367
- end_arb_bal = self.token0.functions.balanceOf(t.a8).call()
2370
+ end_arb_bal = self.token0.functions.balanceOf(self.web3.eth.accounts[8]).call()
2368
2371
  else:
2369
- end_arb_bal = self.web3.eth.get_balance(t.a8)
2372
+ end_arb_bal = self.web3.eth.get_balance(self.web3.eth.accounts[8])
2370
2373
 
2371
2374
  self.assertEqual(end_arb_bal - start_arb_bal, (100+321+321))
2372
2375
  self.assertEqual(self.rc0.functions.balanceOf(self.arb0.address).call(), 0)
@@ -1,19 +1,21 @@
1
1
  import unittest
2
2
  from unittest import TestCase, main
3
- from ethereum.utils import decode_hex, encode_hex
4
- from ethereum.tools import tester as t
5
- #from ethereum.tools.tester import TransactionFailed, ABIContract
6
3
 
7
4
  from eth_tester.exceptions import TransactionFailed
8
5
 
9
-
10
- from ethereum.tools import keys
11
- from ethereum.abi import ContractTranslator
12
- import time
13
- from sha3 import keccak_256
14
6
  from hashlib import sha256
15
7
 
16
- import eth.exceptions
8
+ def decode_hex(hex_str):
9
+ if isinstance(hex_str, (bytes, bytearray)):
10
+ return hex_str
11
+ if hex_str.startswith('0x') or hex_str.startswith('0X'):
12
+ hex_str = hex_str[2:]
13
+ return bytes.fromhex(hex_str)
14
+
15
+ def encode_hex(b):
16
+ if isinstance(b, (bytes, bytearray)):
17
+ return b.hex()
18
+ return hex(b)[2:]
17
19
 
18
20
  from web3.providers.eth_tester import EthereumTesterProvider
19
21
  from web3 import Web3
@@ -173,7 +175,7 @@ class TestRealitio(TestCase):
173
175
 
174
176
  def _contractFromBuildJSON(self, con_name, sender=None, startgas=DEPLOY_GAS):
175
177
  if sender is None:
176
- sender = t.k0
178
+ sender = self.web3.eth.accounts[0]
177
179
 
178
180
  bytecode_file = '../../bytecode/' + con_name + '.bin'
179
181
  abi_file = '../../abi/solc-0.4.25/' + con_name + '.abi.json'
@@ -346,7 +348,7 @@ class TestRealitio(TestCase):
346
348
  self.rc0.functions.getFinalAnswerIfMatches(
347
349
  self.question_id,
348
350
  decode_hex(expect_ch[2:]),
349
- keys.privtoaddr(t.k2),
351
+ self.web3.eth.accounts[2],
350
352
  0,
351
353
  25
352
354
  ).call()
@@ -447,9 +449,9 @@ class TestRealitio(TestCase):
447
449
 
448
450
  # You cannot notify realitio of arbitration unless you are the arbitrator
449
451
  with self.assertRaises(TransactionFailed):
450
- self.rc0.functions.notifyOfArbitrationRequest(self.question_id, keys.privtoaddr(t.k0), 0).transact()
452
+ self.rc0.functions.notifyOfArbitrationRequest(self.question_id, self.web3.eth.accounts[0], 0).transact()
451
453
 
452
- self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), keys.privtoaddr(t.k0)).transact()
454
+ self.arb0.functions.submitAnswerByArbitrator(self.question_id, to_answer_for_contract(123456), self.web3.eth.accounts[0]).transact()
453
455
 
454
456
  self.assertTrue(self.rc0.functions.isFinalized(self.question_id).call())
455
457
  self.assertEqual(from_answer_for_contract(self.rc0.functions.getFinalAnswer(self.question_id).call()), 123456, "Arbitrator submitting final answer calls finalize")
@@ -611,7 +613,7 @@ class TestRealitio(TestCase):
611
613
  st = None
612
614
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1001, 0, 2, k4)
613
615
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1002, 2, 4, k3)
614
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
616
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
615
617
  with self.assertRaises(TransactionFailed):
616
618
  txid = self.arb0.functions.requestArbitration(self.question_id, 2).transact(self._txargs(val=fee))
617
619
  self.raiseOnZeroStatus(txid)
@@ -620,7 +622,7 @@ class TestRealitio(TestCase):
620
622
 
621
623
  @unittest.skipIf(WORKING_ONLY, "Not under construction")
622
624
  def test_bond_claim_arbitration_existing_none(self):
623
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
625
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
624
626
  with self.assertRaises(TransactionFailed):
625
627
  txid = self.arb0.functions.requestArbitration(self.question_id, 0).transact(self._txargs(val=fee))
626
628
  self.raiseOnZeroStatus(txid)
@@ -628,7 +630,7 @@ class TestRealitio(TestCase):
628
630
 
629
631
  @unittest.skipIf(WORKING_ONLY, "Not under construction")
630
632
  def test_bond_claim_arbitration_existing_final(self):
631
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
633
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
632
634
  k3 = self.web3.eth.accounts[3]
633
635
  k4 = self.web3.eth.accounts[4]
634
636
 
@@ -864,7 +866,7 @@ class TestRealitio(TestCase):
864
866
 
865
867
  k3 = self.web3.eth.accounts[3]
866
868
  self._issueTokens(k3, 1000, 1000)
867
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
869
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
868
870
 
869
871
  st = None
870
872
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1002, 0, 1, k3, True)
@@ -886,7 +888,7 @@ class TestRealitio(TestCase):
886
888
  self._issueTokens(k3, 1000000, 1000000)
887
889
  self._issueTokens(k4, 1000000, 1000000)
888
890
 
889
- fee = self.arb0.functions.getDisputeFee(encode_hex("0x00")).call()
891
+ fee = self.arb0.functions.getDisputeFee(decode_hex("0x00")).call()
890
892
 
891
893
  st = None
892
894
  st = self.submitAnswerReturnUpdatedState( st, self.question_id, 1001, 0, 2, k4)
@@ -1437,7 +1439,7 @@ class TestRealitio(TestCase):
1437
1439
  end_bal = self.rc0.functions.balanceOf(self.arb0.address).call()
1438
1440
  self.assertEqual(end_bal - start_bal, (321*2))
1439
1441
 
1440
- start_arb_bal = self.token0.functions.balanceOf(t.a8).call()
1442
+ start_arb_bal = self.token0.functions.balanceOf(self.web3.eth.accounts[8]).call()
1441
1443
 
1442
1444
  # Some tokens should be piled up in the arbitrator's account in the RealitioERC20 contract
1443
1445
  self.assertEqual(self.rc0.functions.balanceOf(self.arb0.address).call(), 100+321+321)
@@ -1451,12 +1453,12 @@ class TestRealitio(TestCase):
1451
1453
  # Now the owner can call withdrawERC20 to their own account, but only the owner
1452
1454
  with self.assertRaises(TransactionFailed):
1453
1455
  # Not the owner
1454
- txid = self.arb0.functions.withdrawERC20(self.token0.address, t.a8).transact(self._txargs(sender=k4))
1456
+ txid = self.arb0.functions.withdrawERC20(self.token0.address, self.web3.eth.accounts[8]).transact(self._txargs(sender=k4))
1455
1457
  self.raiseOnZeroStatus(txid)
1456
1458
 
1457
- self.arb0.functions.withdrawERC20(self.token0.address, t.a8).transact()
1459
+ self.arb0.functions.withdrawERC20(self.token0.address, self.web3.eth.accounts[8]).transact()
1458
1460
 
1459
- end_arb_bal = self.token0.functions.balanceOf(t.a8).call()
1461
+ end_arb_bal = self.token0.functions.balanceOf(self.web3.eth.accounts[8]).call()
1460
1462
 
1461
1463
  self.assertEqual(end_arb_bal - start_arb_bal, (100+321+321))
1462
1464
  self.assertEqual(self.rc0.functions.balanceOf(self.arb0.address).call(), 0)
@@ -1507,12 +1509,12 @@ class TestRealitio(TestCase):
1507
1509
  self.raiseOnZeroStatus(txid)
1508
1510
 
1509
1511
  with self.assertRaises(TransactionFailed):
1510
- txid = self.arb0.functions.updateRegisteredWallet(t.a8).transact(self._txargs(sender=k2))
1512
+ txid = self.arb0.functions.updateRegisteredWallet(self.web3.eth.accounts[8]).transact(self._txargs(sender=k2))
1511
1513
  self.raiseOnZeroStatus(txid)
1512
1514
 
1513
- self.arb0.functions.updateRegisteredWallet(t.a8).transact()
1515
+ self.arb0.functions.updateRegisteredWallet(self.web3.eth.accounts[8]).transact()
1514
1516
 
1515
- start_reg_wal_bal = self.token0.functions.balanceOf(t.a8).call()
1517
+ start_reg_wal_bal = self.token0.functions.balanceOf(self.web3.eth.accounts[8]).call()
1516
1518
 
1517
1519
  # Some tokens should be piled up in the arbitrator's account in the RealitioERC20 contract
1518
1520
  self.assertEqual(self.rc0.functions.balanceOf(self.arb0.address).call(), 100+321+321)
package/tokens/ARETH.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "native_chains": {
5
5
  "42161": true,
6
6
  "421611": true,
7
- "421613": true
8
- }
7
+ "421613": true
8
+ },
9
+ "approx_1_usd": 0.000532184
9
10
  }
package/tokens/AVAX.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 10000000000000000,
4
4
  "native_chains": {
5
5
  "43114": true
6
- }
6
+ },
7
+ "approx_1_usd": 0.155763
7
8
  }
package/tokens/BNB.json CHANGED
@@ -4,5 +4,6 @@
4
4
  "native_chains": {
5
5
  "56": true,
6
6
  "97": true
7
- }
7
+ },
8
+ "approx_1_usd": 0.00164965
8
9
  }
package/tokens/BOND.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "11155111": "0x88498CE124778cB92b0b4c1ab9244D38c3aA7df3"
6
- }
6
+ },
7
+ "approx_1_usd": 532.184
7
8
  }
package/tokens/CELO.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": "1000000000000000000",
4
4
  "native_chains": {
5
5
  "42220": true
6
- }
7
- }
6
+ },
7
+ "approx_1_usd": 16.7098
8
+ }
package/tokens/CTH.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 10000000000000000000,
4
4
  "native_chains": {
5
5
  "777": true
6
- }
6
+ },
7
+ "approx_1_usd": 532.184
7
8
  }
package/tokens/DAOOS.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "4": "0x56AE5fd086823d1892BACE27034Eb5531Fcdc3f8"
6
- }
6
+ },
7
+ "approx_1_usd": 532.184
7
8
  }
package/tokens/DEXE.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "56": "0x039cb485212f996a9dbb85a9a75d898f94d38da6"
6
- }
6
+ },
7
+ "approx_1_usd": 0.518135
7
8
  }
package/tokens/ETH.json CHANGED
@@ -21,5 +21,6 @@
21
21
  "1337702": true,
22
22
  "11155111": true,
23
23
  "11155420": true
24
- }
25
- }
24
+ },
25
+ "approx_1_usd": 0.000532184
26
+ }
package/tokens/FOX.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "1": "0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d"
6
- }
6
+ },
7
+ "approx_1_usd": 244.585
7
8
  }
package/tokens/GNO.json CHANGED
@@ -2,7 +2,8 @@
2
2
  "decimals": 18,
3
3
  "small_number": 10000000,
4
4
  "erc20_chains": {
5
- "1": "0x6810e776880c02933d47db1b9fc05908e5386b96"
6
- ,"100": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb"
7
- }
5
+ "1": "0x6810e776880c02933d47db1b9fc05908e5386b96",
6
+ "100": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb"
7
+ },
8
+ "approx_1_usd": 0.00967399
8
9
  }
package/tokens/MATIC.json CHANGED
@@ -4,5 +4,6 @@
4
4
  "native_chains": {
5
5
  "137": true,
6
6
  "80001": true
7
- }
7
+ },
8
+ "approx_1_usd": 7.92669
8
9
  }
package/tokens/MONAD.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": "1000000000",
4
4
  "native_chains": {
5
5
  "143": true
6
- }
7
- }
6
+ },
7
+ "approx_1_usd": 532.184
8
+ }
package/tokens/OETH.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "decimals": 18,
3
- "small_number": 10000000000000000000,
3
+ "small_number": 10000000000000000,
4
4
  "native_chains": {
5
5
  "10": true,
6
6
  "69": true
7
- }
7
+ },
8
+ "approx_1_usd": 0.000532184
8
9
  }
package/tokens/POLK.json CHANGED
@@ -6,5 +6,6 @@
6
6
  "100": "0x9a2A80c38AbB1FDC3Cb0fbf94FEFe88BEf828E00",
7
7
  "137": "0x996F19d4b1cE6D5AD72CEaaa53152CEB1B187fD0",
8
8
  "80001": "0x935f82d011ee37e8870c435417ac58407a9863f7"
9
- }
9
+ },
10
+ "approx_1_usd": 426.534
10
11
  }
package/tokens/SUKU.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "137": "0x60Ea918FC64360269Da4efBDA11d8fC6514617C6"
6
- }
6
+ },
7
+ "approx_1_usd": 251.405
7
8
  }
package/tokens/SWISE.json CHANGED
@@ -4,5 +4,6 @@
4
4
  "erc20_chains": {
5
5
  "1": "0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2",
6
6
  "100": "0xfdA94F056346d2320d4B5E468D6Ad099b2277746"
7
- }
7
+ },
8
+ "approx_1_usd": 440.021
8
9
  }
package/tokens/TLOS.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 10000000000000000,
4
4
  "native_chains": {
5
5
  "40": true
6
- }
7
- }
6
+ },
7
+ "approx_1_usd": 33.1572
8
+ }
package/tokens/TRST.json CHANGED
@@ -4,5 +4,6 @@
4
4
  "erc20_chains": {
5
5
  "1": "0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b",
6
6
  "4": "0x21036C54e16521B8809553956123E44054120226"
7
- }
7
+ },
8
+ "approx_1_usd": 1371.03
8
9
  }
package/tokens/UBQ.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "native_chains": {
5
5
  "8": true
6
- }
6
+ },
7
+ "approx_1_usd": 389.902
7
8
  }
package/tokens/XDAI.json CHANGED
@@ -2,8 +2,9 @@
2
2
  "decimals": 18,
3
3
  "small_number": 1000000000000000000,
4
4
  "native_chains": {
5
- "100": true,
6
5
  "77": true,
6
+ "100": true,
7
7
  "10200": true
8
- }
8
+ },
9
+ "approx_1_usd": 0.999001
9
10
  }
package/tokens/ZBS.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 10000000000000000000,
4
4
  "native_chains": {
5
5
  "88558801": true
6
- }
6
+ },
7
+ "approx_1_usd": 532.184
7
8
  }