11import 'should' ;
22import { Networks } from '../../src' ;
3- import {
4- erc7984Registry ,
5- getWrapperPair ,
6- getActiveWrapperPairs ,
7- Erc7984WrapperPair ,
8- } from '../../src/erc7984Registry' ;
3+ import { erc7984Registry , getWrapperPair , getActiveWrapperPairs , Erc7984WrapperPair } from '../../src/erc7984Registry' ;
94
105describe ( 'ERC-7984 Statics Registry' , function ( ) {
116 describe ( 'erc7984Registry shape' , function ( ) {
@@ -54,10 +49,7 @@ describe('ERC-7984 Statics Registry', function () {
5449
5550 describe ( 'getWrapperPair' , function ( ) {
5651 it ( 'returns the correct Hoodi testnet pair for hteth:ctest1' , function ( ) {
57- const pair = getWrapperPair (
58- Networks . test . hoodi . name ,
59- '0x7b1d59bbcd291daa59cb6c8c5bc04de1afc4aba1'
60- ) ;
52+ const pair = getWrapperPair ( Networks . test . hoodi . name , '0x7b1d59bbcd291daa59cb6c8c5bc04de1afc4aba1' ) ;
6153 pair . should . not . be . undefined ( ) ;
6254 pair ! . wrapperAddress . should . equal ( '0x7b1d59bbcd291daa59cb6c8c5bc04de1afc4aba1' ) ;
6355 pair ! . rate . should . equal ( 1n ) ;
@@ -67,23 +59,14 @@ describe('ERC-7984 Statics Registry', function () {
6759 } ) ;
6860
6961 it ( 'returns the correct Hoodi testnet pair for hteth:cusdt' , function ( ) {
70- const pair = getWrapperPair (
71- Networks . test . hoodi . name ,
72- '0x2debbe0487ef921df4457f9e36ed05be2df1ac75'
73- ) ;
62+ const pair = getWrapperPair ( Networks . test . hoodi . name , '0x2debbe0487ef921df4457f9e36ed05be2df1ac75' ) ;
7463 pair . should . not . be . undefined ( ) ;
7564 pair ! . requiresApprovalReset . should . be . true ( ) ;
7665 } ) ;
7766
7867 it ( 'is case-insensitive for the wrapper address' , function ( ) {
79- const lower = getWrapperPair (
80- Networks . test . hoodi . name ,
81- '0x7b1d59bbcd291daa59cb6c8c5bc04de1afc4aba1'
82- ) ;
83- const mixed = getWrapperPair (
84- Networks . test . hoodi . name ,
85- '0x7B1D59BbCD291daA59CB6C8C5bC04DE1aFC4ABA1'
86- ) ;
68+ const lower = getWrapperPair ( Networks . test . hoodi . name , '0x7b1d59bbcd291daa59cb6c8c5bc04de1afc4aba1' ) ;
69+ const mixed = getWrapperPair ( Networks . test . hoodi . name , '0x7B1D59BbCD291daA59CB6C8C5bC04DE1aFC4ABA1' ) ;
8770 lower . should . not . be . undefined ( ) ;
8871 mixed . should . not . be . undefined ( ) ;
8972 lower ! . wrapperAddress . should . equal ( mixed ! . wrapperAddress ) ;
@@ -95,10 +78,7 @@ describe('ERC-7984 Statics Registry', function () {
9578 } ) ;
9679
9780 it ( 'returns undefined for an address not in the registry' , function ( ) {
98- const pair = getWrapperPair (
99- Networks . test . hoodi . name ,
100- '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
101- ) ;
81+ const pair = getWrapperPair ( Networks . test . hoodi . name , '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' ) ;
10282 ( pair === undefined ) . should . be . true ( ) ;
10383 } ) ;
10484
@@ -114,26 +94,16 @@ describe('ERC-7984 Statics Registry', function () {
11494 } ) ;
11595
11696 it ( 'returns the correct mainnet pair for eth:cusdt' , function ( ) {
117- const pair = getWrapperPair (
118- Networks . main . ethereum . name ,
119- '0xae0207c757aa2b4019ad96edd0092ddc63ef0c50'
120- ) ;
97+ const pair = getWrapperPair ( Networks . main . ethereum . name , '0xae0207c757aa2b4019ad96edd0092ddc63ef0c50' ) ;
12198 pair . should . not . be . undefined ( ) ;
122- pair ! . underlyingErc20Address . should . equal (
123- '0xdac17f958d2ee523a2206206994597c13d831ec7'
124- ) ;
99+ pair ! . underlyingErc20Address . should . equal ( '0xdac17f958d2ee523a2206206994597c13d831ec7' ) ;
125100 pair ! . requiresApprovalReset . should . be . true ( ) ;
126101 } ) ;
127102
128103 it ( 'returns the correct mainnet pair for eth:cusdc' , function ( ) {
129- const pair = getWrapperPair (
130- Networks . main . ethereum . name ,
131- '0xe978f22157048e5db8e5d07971376e86671672b2'
132- ) ;
104+ const pair = getWrapperPair ( Networks . main . ethereum . name , '0xe978f22157048e5db8e5d07971376e86671672b2' ) ;
133105 pair . should . not . be . undefined ( ) ;
134- pair ! . underlyingErc20Address . should . equal (
135- '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
136- ) ;
106+ pair ! . underlyingErc20Address . should . equal ( '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ) ;
137107 pair ! . requiresApprovalReset . should . be . false ( ) ;
138108 } ) ;
139109 } ) ;
0 commit comments