@@ -94,47 +94,19 @@ describe("Test pure proxy precompile", () => {
9494 assert . equal ( balanceAfter , balance + BigInt ( amount ) , "balance should be increased" )
9595 } )
9696
97- it ( "Call createPureProxy, add kill one" , async ( ) => {
98- const contract = new ethers . Contract ( IPROXY_ADDRESS , IProxyABI , evmWallet )
99- const type = 0 ;
100- const delay = 0 ;
101- const index = 0 ;
102- const extIndex = 1 ;
103-
104- const proxies = await getProxies ( api , convertH160ToSS58 ( evmWallet . address ) )
105- const length = proxies . length
106- const addTx = await contract . createPureProxy ( type , delay , index )
107- const response = await addTx . wait ( )
108- const createBlockNumber = response . blockNumber
109-
110- const currentLength = ( await getProxies ( api , convertH160ToSS58 ( evmWallet . address ) ) ) . length
111- assert . equal ( currentLength , length + 1 , "proxy should be set" )
112-
113- try {
114- const tx = await contract . killPureProxy ( decodeAddress ( proxies [ proxies . length - 1 ] ) , type , index ,
115- createBlockNumber , extIndex )
116- await tx . wait ( )
117- } catch ( error ) {
118- console . log ( "error" , error )
119- }
120-
121- const proxiesAfterRemove = await getProxies ( api , convertH160ToSS58 ( evmWallet . address ) )
122- assert . equal ( proxiesAfterRemove . length , 0 , "proxies should be removed" )
123- } )
124-
12597 it ( "Call createPureProxy, add multiple proxies" , async ( ) => {
126- const contract = new ethers . Contract ( IPROXY_ADDRESS , IProxyABI , evmWallet )
98+ const contract = new ethers . Contract ( IPROXY_ADDRESS , IProxyABI , evmWallet1 )
12799 const type = 0 ;
128100 const delay = 0 ;
129101 const index = 0 ;
130- const proxies = await getProxies ( api , convertH160ToSS58 ( evmWallet . address ) )
102+ const proxies = await getProxies ( api , convertH160ToSS58 ( evmWallet1 . address ) )
131103 const length = proxies . length
132104 for ( let i = 0 ; i < 5 ; i ++ ) {
133105 const tx = await contract . createPureProxy ( type , delay , index )
134106 await tx . wait ( )
135107
136108 await new Promise ( resolve => setTimeout ( resolve , 500 ) ) ;
137- const currentProxies = await getProxies ( api , convertH160ToSS58 ( evmWallet . address ) )
109+ const currentProxies = await getProxies ( api , convertH160ToSS58 ( evmWallet1 . address ) )
138110 assert . equal ( currentProxies . length , length + i + 1 , "proxy should be set" )
139111 }
140112 } )
0 commit comments