@@ -1710,7 +1710,7 @@ export class BtcNameResolver extends OP_NET {
17101710 @returns (
17111711 { name : 'total' , type : ABIDataTypes . UINT64 } ,
17121712 { name : 'keys' , type : ABIDataTypes . ARRAY_OF_BYTES } ,
1713- { name : 'names' , type : ABIDataTypes . ARRAY_OF_STRINGS } ,
1713+ { name : 'names' , type : ABIDataTypes . ARRAY_OF_STRING } ,
17141714 )
17151715 public getDomainsByOwner ( calldata : Calldata ) : BytesWriter {
17161716 const owner = calldata . readAddress ( ) ;
@@ -1762,6 +1762,19 @@ export class BtcNameResolver extends OP_NET {
17621762
17631763 return response ;
17641764 }
1765+
1766+ protected _addressToU256 ( addr : Address ) : u256 {
1767+ return u256 . fromUint8ArrayBE ( addr ) ;
1768+ }
1769+
1770+ protected _u256ToAddress ( val : u256 ) : Address {
1771+ if ( val . isZero ( ) ) {
1772+ return Address . zero ( ) ;
1773+ }
1774+ const bytes = val . toUint8Array ( true ) ;
1775+ return Address . fromUint8Array ( bytes ) ;
1776+ }
1777+
17651778 private _storeDomainName ( domainKey : u256 , domainName : string ) : void {
17661779 const keyBytes = domainKey . toUint8Array ( true ) . slice ( 0 , 30 ) ;
17671780 const storage = new AdvancedStoredString (
@@ -1781,16 +1794,6 @@ export class BtcNameResolver extends OP_NET {
17811794 ) ;
17821795 return storage . value ;
17831796 }
1784- protected _addressToU256 ( addr : Address ) : u256 {
1785- return u256 . fromUint8ArrayBE ( addr ) ;
1786- }
1787- protected _u256ToAddress ( val : u256 ) : Address {
1788- if ( val . isZero ( ) ) {
1789- return Address . zero ( ) ;
1790- }
1791- const bytes = val . toUint8Array ( true ) ;
1792- return Address . fromUint8Array ( bytes ) ;
1793- }
17941797
17951798 private _ownerIndexKey ( ownerU256 : u256 , index : u64 ) : u256 {
17961799 const writer = new BytesWriter ( 40 ) ;
0 commit comments