@@ -15,9 +15,9 @@ import {
1515 noneCV ,
1616} from '@stacks/transactions' ;
1717import { logger } from '../../src/logger' ;
18- import { testnetKeys } from '../../src/api/routes/debug' ;
1918import { PgWriteStore } from '../../src/datastore/pg-write-store' ;
2019import { standByForTx as standByForTxShared } from '../utils/test-helpers' ;
20+ import { FAUCET_TESTNET_KEYS } from 'src/api/routes/faucets' ;
2121
2222function hash160 ( bfr : Buffer ) : Buffer {
2323 const hash160 = createHash ( 'ripemd160' )
@@ -346,7 +346,10 @@ describe('BNS integration tests', () => {
346346 const name = 'alice' ;
347347 const importZonefile = `$ORIGIN ${ name } .${ namespace } \n$TTL 3600\n_http._tcp IN URI 10 1 "https://blockstack.s3.amazonaws.com/${ name } .${ namespace } "\n` ;
348348 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
349- const testnetKey = { pkey : testnetKeys [ 0 ] . secretKey , address : testnetKeys [ 0 ] . stacksAddress } ;
349+ const testnetKey = {
350+ pkey : FAUCET_TESTNET_KEYS [ 0 ] . secretKey ,
351+ address : FAUCET_TESTNET_KEYS [ 0 ] . stacksAddress ,
352+ } ;
350353
351354 // initalizing namespace network - preorder and reveal
352355 await initiateNamespaceNetwork ( namespace , salt , namespaceHash , testnetKey , 12 ) ;
@@ -379,7 +382,10 @@ describe('BNS integration tests', () => {
379382 const name = 'update' ;
380383 const importZonefile = `$ORIGIN ${ name } .${ namespace } \n$TTL 3600\n_http._tcp IN URI 10 1 "https://blockstack.s3.amazonaws.com/${ name } .${ namespace } "\n` ;
381384 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
382- const testnetKey = { pkey : testnetKeys [ 1 ] . secretKey , address : testnetKeys [ 1 ] . stacksAddress } ;
385+ const testnetKey = {
386+ pkey : FAUCET_TESTNET_KEYS [ 1 ] . secretKey ,
387+ address : FAUCET_TESTNET_KEYS [ 1 ] . stacksAddress ,
388+ } ;
383389
384390 // initalizing namespace network - preorder and reveal
385391 await initiateNamespaceNetwork ( namespace , salt , namespaceHash , testnetKey , 12 ) ;
@@ -475,7 +481,10 @@ describe('BNS integration tests', () => {
475481 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
476482 const zonefile = `$ORIGIN ${ name } .${ namespace } \n$TTL 3600\n_http._tcp IN URI 10 1 "https://blockstack.s3.amazonaws.com/${ name } .${ namespace } "\n` ;
477483 const importZonefile = `$ORIGIN ${ name } .${ namespace } \n$TTL 3600\n_http._tcp IN URI 10 1 "https://blockstack.s3.amazonaws.com/${ name } .${ namespace } "\n` ;
478- const testnetKey = { pkey : testnetKeys [ 2 ] . secretKey , address : testnetKeys [ 2 ] . stacksAddress } ;
484+ const testnetKey = {
485+ pkey : FAUCET_TESTNET_KEYS [ 2 ] . secretKey ,
486+ address : FAUCET_TESTNET_KEYS [ 2 ] . stacksAddress ,
487+ } ;
479488 // initializing namespace network
480489 await initiateNamespaceNetwork ( namespace , salt , namespaceHash , testnetKey , 12 ) ;
481490 await namespaceReady ( namespace , testnetKey . pkey ) ;
@@ -495,8 +504,8 @@ describe('BNS integration tests', () => {
495504 }
496505 // testing name transfer
497506 const transferTestnetKey = {
498- pkey : testnetKeys [ 2 ] . secretKey ,
499- address : testnetKeys [ 3 ] . stacksAddress ,
507+ pkey : FAUCET_TESTNET_KEYS [ 2 ] . secretKey ,
508+ address : FAUCET_TESTNET_KEYS [ 3 ] . stacksAddress ,
500509 } ;
501510 await nameTransfer ( namespace , name , transferTestnetKey ) ;
502511
@@ -512,7 +521,10 @@ describe('BNS integration tests', () => {
512521 const namespace = 'name-revoke' ;
513522 const name = 'foo' ;
514523 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
515- const testnetKey = { pkey : testnetKeys [ 4 ] . secretKey , address : testnetKeys [ 4 ] . stacksAddress } ;
524+ const testnetKey = {
525+ pkey : FAUCET_TESTNET_KEYS [ 4 ] . secretKey ,
526+ address : FAUCET_TESTNET_KEYS [ 4 ] . stacksAddress ,
527+ } ;
516528 const zonefile = `$ORIGIN ${ name } .${ namespace } \n$TTL 3600\n_http._tcp IN URI 10 1 "https://blockstack.s3.amazonaws.com/${ name } .${ namespace } "\n` ;
517529
518530 // initializing namespace network
@@ -532,7 +544,10 @@ describe('BNS integration tests', () => {
532544 const namespace = 'name-renewal' ;
533545 const name = 'renewal' ;
534546 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
535- const testnetKey = { pkey : testnetKeys [ 5 ] . secretKey , address : testnetKeys [ 5 ] . stacksAddress } ;
547+ const testnetKey = {
548+ pkey : FAUCET_TESTNET_KEYS [ 5 ] . secretKey ,
549+ address : FAUCET_TESTNET_KEYS [ 5 ] . stacksAddress ,
550+ } ;
536551
537552 // initializing namespace network
538553 await initiateNamespaceNetwork ( namespace , salt , namespaceHash , testnetKey , 1 ) ;
@@ -572,7 +587,10 @@ describe('BNS integration tests', () => {
572587 const namespace = 'name-renewal2' ;
573588 const name = 'renewal2' ;
574589 const namespaceHash = hash160 ( Buffer . concat ( [ Buffer . from ( namespace ) , salt ] ) ) ;
575- const testnetKey = { pkey : testnetKeys [ 5 ] . secretKey , address : testnetKeys [ 5 ] . stacksAddress } ;
590+ const testnetKey = {
591+ pkey : FAUCET_TESTNET_KEYS [ 5 ] . secretKey ,
592+ address : FAUCET_TESTNET_KEYS [ 5 ] . stacksAddress ,
593+ } ;
576594
577595 // initializing namespace network
578596 await initiateNamespaceNetwork ( namespace , salt , namespaceHash , testnetKey , 1 ) ;
0 commit comments