refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
56
dev/env/node_modules/ethers/lib.esm/address/address.d.ts
generated
vendored
Executable file
56
dev/env/node_modules/ethers/lib.esm/address/address.d.ts
generated
vendored
Executable file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Returns a normalized and checksumed address for %%address%%.
|
||||
* This accepts non-checksum addresses, checksum addresses and
|
||||
* [[getIcapAddress]] formats.
|
||||
*
|
||||
* The checksum in Ethereum uses the capitalization (upper-case
|
||||
* vs lower-case) of the characters within an address to encode
|
||||
* its checksum, which offers, on average, a checksum of 15-bits.
|
||||
*
|
||||
* If %%address%% contains both upper-case and lower-case, it is
|
||||
* assumed to already be a checksum address and its checksum is
|
||||
* validated, and if the address fails its expected checksum an
|
||||
* error is thrown.
|
||||
*
|
||||
* If you wish the checksum of %%address%% to be ignore, it should
|
||||
* be converted to lower-case (i.e. ``.toLowercase()``) before
|
||||
* being passed in. This should be a very rare situation though,
|
||||
* that you wish to bypass the safegaurds in place to protect
|
||||
* against an address that has been incorrectly copied from another
|
||||
* source.
|
||||
*
|
||||
* @example:
|
||||
* // Adds the checksum (via upper-casing specific letters)
|
||||
* getAddress("0x8ba1f109551bd432803012645ac136ddd64dba72")
|
||||
* //_result:
|
||||
*
|
||||
* // Converts ICAP address and adds checksum
|
||||
* getAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
|
||||
* //_result:
|
||||
*
|
||||
* // Throws an error if an address contains mixed case,
|
||||
* // but the checksum fails
|
||||
* getAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_error:
|
||||
*/
|
||||
export declare function getAddress(address: string): string;
|
||||
/**
|
||||
* The [ICAP Address format](link-icap) format is an early checksum
|
||||
* format which attempts to be compatible with the banking
|
||||
* industry [IBAN format](link-wiki-iban) for bank accounts.
|
||||
*
|
||||
* It is no longer common or a recommended format.
|
||||
*
|
||||
* @example:
|
||||
* getIcapAddress("0x8ba1f109551bd432803012645ac136ddd64dba72");
|
||||
* //_result:
|
||||
*
|
||||
* getIcapAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
|
||||
* //_result:
|
||||
*
|
||||
* // Throws an error if the ICAP checksum is wrong
|
||||
* getIcapAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK37");
|
||||
* //_error:
|
||||
*/
|
||||
export declare function getIcapAddress(address: string): string;
|
||||
//# sourceMappingURL=address.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/address.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/address.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src.ts/address/address.ts"],"names":[],"mappings":"AAmFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA6BlD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKtD"}
|
||||
156
dev/env/node_modules/ethers/lib.esm/address/address.js
generated
vendored
Executable file
156
dev/env/node_modules/ethers/lib.esm/address/address.js
generated
vendored
Executable file
@@ -0,0 +1,156 @@
|
||||
import { keccak256 } from "../crypto/index.js";
|
||||
import { getBytes, assertArgument } from "../utils/index.js";
|
||||
const BN_0 = BigInt(0);
|
||||
const BN_36 = BigInt(36);
|
||||
function getChecksumAddress(address) {
|
||||
// if (!isHexString(address, 20)) {
|
||||
// logger.throwArgumentError("invalid address", "address", address);
|
||||
// }
|
||||
address = address.toLowerCase();
|
||||
const chars = address.substring(2).split("");
|
||||
const expanded = new Uint8Array(40);
|
||||
for (let i = 0; i < 40; i++) {
|
||||
expanded[i] = chars[i].charCodeAt(0);
|
||||
}
|
||||
const hashed = getBytes(keccak256(expanded));
|
||||
for (let i = 0; i < 40; i += 2) {
|
||||
if ((hashed[i >> 1] >> 4) >= 8) {
|
||||
chars[i] = chars[i].toUpperCase();
|
||||
}
|
||||
if ((hashed[i >> 1] & 0x0f) >= 8) {
|
||||
chars[i + 1] = chars[i + 1].toUpperCase();
|
||||
}
|
||||
}
|
||||
return "0x" + chars.join("");
|
||||
}
|
||||
// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
|
||||
// Create lookup table
|
||||
const ibanLookup = {};
|
||||
for (let i = 0; i < 10; i++) {
|
||||
ibanLookup[String(i)] = String(i);
|
||||
}
|
||||
for (let i = 0; i < 26; i++) {
|
||||
ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
|
||||
}
|
||||
// How many decimal digits can we process? (for 64-bit float, this is 15)
|
||||
// i.e. Math.floor(Math.log10(Number.MAX_SAFE_INTEGER));
|
||||
const safeDigits = 15;
|
||||
function ibanChecksum(address) {
|
||||
address = address.toUpperCase();
|
||||
address = address.substring(4) + address.substring(0, 2) + "00";
|
||||
let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join("");
|
||||
// Javascript can handle integers safely up to 15 (decimal) digits
|
||||
while (expanded.length >= safeDigits) {
|
||||
let block = expanded.substring(0, safeDigits);
|
||||
expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
|
||||
}
|
||||
let checksum = String(98 - (parseInt(expanded, 10) % 97));
|
||||
while (checksum.length < 2) {
|
||||
checksum = "0" + checksum;
|
||||
}
|
||||
return checksum;
|
||||
}
|
||||
;
|
||||
const Base36 = (function () {
|
||||
;
|
||||
const result = {};
|
||||
for (let i = 0; i < 36; i++) {
|
||||
const key = "0123456789abcdefghijklmnopqrstuvwxyz"[i];
|
||||
result[key] = BigInt(i);
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
function fromBase36(value) {
|
||||
value = value.toLowerCase();
|
||||
let result = BN_0;
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
result = result * BN_36 + Base36[value[i]];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Returns a normalized and checksumed address for %%address%%.
|
||||
* This accepts non-checksum addresses, checksum addresses and
|
||||
* [[getIcapAddress]] formats.
|
||||
*
|
||||
* The checksum in Ethereum uses the capitalization (upper-case
|
||||
* vs lower-case) of the characters within an address to encode
|
||||
* its checksum, which offers, on average, a checksum of 15-bits.
|
||||
*
|
||||
* If %%address%% contains both upper-case and lower-case, it is
|
||||
* assumed to already be a checksum address and its checksum is
|
||||
* validated, and if the address fails its expected checksum an
|
||||
* error is thrown.
|
||||
*
|
||||
* If you wish the checksum of %%address%% to be ignore, it should
|
||||
* be converted to lower-case (i.e. ``.toLowercase()``) before
|
||||
* being passed in. This should be a very rare situation though,
|
||||
* that you wish to bypass the safegaurds in place to protect
|
||||
* against an address that has been incorrectly copied from another
|
||||
* source.
|
||||
*
|
||||
* @example:
|
||||
* // Adds the checksum (via upper-casing specific letters)
|
||||
* getAddress("0x8ba1f109551bd432803012645ac136ddd64dba72")
|
||||
* //_result:
|
||||
*
|
||||
* // Converts ICAP address and adds checksum
|
||||
* getAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
|
||||
* //_result:
|
||||
*
|
||||
* // Throws an error if an address contains mixed case,
|
||||
* // but the checksum fails
|
||||
* getAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_error:
|
||||
*/
|
||||
export function getAddress(address) {
|
||||
assertArgument(typeof (address) === "string", "invalid address", "address", address);
|
||||
if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
|
||||
// Missing the 0x prefix
|
||||
if (!address.startsWith("0x")) {
|
||||
address = "0x" + address;
|
||||
}
|
||||
const result = getChecksumAddress(address);
|
||||
// It is a checksummed address with a bad checksum
|
||||
assertArgument(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, "bad address checksum", "address", address);
|
||||
return result;
|
||||
}
|
||||
// Maybe ICAP? (we only support direct mode)
|
||||
if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
|
||||
// It is an ICAP address with a bad checksum
|
||||
assertArgument(address.substring(2, 4) === ibanChecksum(address), "bad icap checksum", "address", address);
|
||||
let result = fromBase36(address.substring(4)).toString(16);
|
||||
while (result.length < 40) {
|
||||
result = "0" + result;
|
||||
}
|
||||
return getChecksumAddress("0x" + result);
|
||||
}
|
||||
assertArgument(false, "invalid address", "address", address);
|
||||
}
|
||||
/**
|
||||
* The [ICAP Address format](link-icap) format is an early checksum
|
||||
* format which attempts to be compatible with the banking
|
||||
* industry [IBAN format](link-wiki-iban) for bank accounts.
|
||||
*
|
||||
* It is no longer common or a recommended format.
|
||||
*
|
||||
* @example:
|
||||
* getIcapAddress("0x8ba1f109551bd432803012645ac136ddd64dba72");
|
||||
* //_result:
|
||||
*
|
||||
* getIcapAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
|
||||
* //_result:
|
||||
*
|
||||
* // Throws an error if the ICAP checksum is wrong
|
||||
* getIcapAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK37");
|
||||
* //_error:
|
||||
*/
|
||||
export function getIcapAddress(address) {
|
||||
//let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();
|
||||
let base36 = BigInt(getAddress(address)).toString(36).toUpperCase();
|
||||
while (base36.length < 30) {
|
||||
base36 = "0" + base36;
|
||||
}
|
||||
return "XE" + ibanChecksum("XE00" + base36) + base36;
|
||||
}
|
||||
//# sourceMappingURL=address.js.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/address.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/address.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../src.ts/address/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAEzB,SAAS,kBAAkB,CAAC,OAAe;IAC3C,sCAAsC;IACtC,2EAA2E;IAC3E,OAAO;IAEH,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QACzB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,C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,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE;YAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;SAAE;QACrD,OAAQ,kBAAkB,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;KAC7C;IAED,cAAc,CAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC1C,2EAA2E;IAC3E,IAAI,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACpE,OAAO,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;KAAE;IACrD,OAAO,IAAI,GAAG,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;AACzD,CAAC"}
|
||||
81
dev/env/node_modules/ethers/lib.esm/address/checks.d.ts
generated
vendored
Executable file
81
dev/env/node_modules/ethers/lib.esm/address/checks.d.ts
generated
vendored
Executable file
@@ -0,0 +1,81 @@
|
||||
import type { Addressable, AddressLike, NameResolver } from "./index.js";
|
||||
/**
|
||||
* Returns true if %%value%% is an object which implements the
|
||||
* [[Addressable]] interface.
|
||||
*
|
||||
* @example:
|
||||
* // Wallets and AbstractSigner sub-classes
|
||||
* isAddressable(Wallet.createRandom())
|
||||
* //_result:
|
||||
*
|
||||
* // Contracts
|
||||
* contract = new Contract("dai.tokens.ethers.eth", [ ], provider)
|
||||
* isAddressable(contract)
|
||||
* //_result:
|
||||
*/
|
||||
export declare function isAddressable(value: any): value is Addressable;
|
||||
/**
|
||||
* Returns true if %%value%% is a valid address.
|
||||
*
|
||||
* @example:
|
||||
* // Valid address
|
||||
* isAddress("0x8ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_result:
|
||||
*
|
||||
* // Valid ICAP address
|
||||
* isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36")
|
||||
* //_result:
|
||||
*
|
||||
* // Invalid checksum
|
||||
* isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBa72")
|
||||
* //_result:
|
||||
*
|
||||
* // Invalid ICAP checksum
|
||||
* isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_result:
|
||||
*
|
||||
* // Not an address (an ENS name requires a provided and an
|
||||
* // asynchronous API to access)
|
||||
* isAddress("ricmoo.eth")
|
||||
* //_result:
|
||||
*/
|
||||
export declare function isAddress(value: any): value is string;
|
||||
/**
|
||||
* Resolves to an address for the %%target%%, which may be any
|
||||
* supported address type, an [[Addressable]] or a Promise which
|
||||
* resolves to an address.
|
||||
*
|
||||
* If an ENS name is provided, but that name has not been correctly
|
||||
* configured a [[UnconfiguredNameError]] is thrown.
|
||||
*
|
||||
* @example:
|
||||
* addr = "0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
||||
*
|
||||
* // Addresses are return synchronously
|
||||
* resolveAddress(addr, provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Address promises are resolved asynchronously
|
||||
* resolveAddress(Promise.resolve(addr))
|
||||
* //_result:
|
||||
*
|
||||
* // ENS names are resolved asynchronously
|
||||
* resolveAddress("dai.tokens.ethers.eth", provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Addressable objects are resolved asynchronously
|
||||
* contract = new Contract(addr, [ ])
|
||||
* resolveAddress(contract, provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Unconfigured ENS names reject
|
||||
* resolveAddress("nothing-here.ricmoo.eth", provider)
|
||||
* //_error:
|
||||
*
|
||||
* // ENS names require a NameResolver object passed in
|
||||
* // (notice the provider was omitted)
|
||||
* resolveAddress("nothing-here.ricmoo.eth")
|
||||
* //_error:
|
||||
*/
|
||||
export declare function resolveAddress(target: AddressLike, resolver?: null | NameResolver): string | Promise<string>;
|
||||
//# sourceMappingURL=checks.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/checks.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/checks.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src.ts/address/checks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGzE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAE9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAMrD;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkB5G"}
|
||||
114
dev/env/node_modules/ethers/lib.esm/address/checks.js
generated
vendored
Executable file
114
dev/env/node_modules/ethers/lib.esm/address/checks.js
generated
vendored
Executable file
@@ -0,0 +1,114 @@
|
||||
import { assert, assertArgument } from "../utils/index.js";
|
||||
import { getAddress } from "./address.js";
|
||||
/**
|
||||
* Returns true if %%value%% is an object which implements the
|
||||
* [[Addressable]] interface.
|
||||
*
|
||||
* @example:
|
||||
* // Wallets and AbstractSigner sub-classes
|
||||
* isAddressable(Wallet.createRandom())
|
||||
* //_result:
|
||||
*
|
||||
* // Contracts
|
||||
* contract = new Contract("dai.tokens.ethers.eth", [ ], provider)
|
||||
* isAddressable(contract)
|
||||
* //_result:
|
||||
*/
|
||||
export function isAddressable(value) {
|
||||
return (value && typeof (value.getAddress) === "function");
|
||||
}
|
||||
/**
|
||||
* Returns true if %%value%% is a valid address.
|
||||
*
|
||||
* @example:
|
||||
* // Valid address
|
||||
* isAddress("0x8ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_result:
|
||||
*
|
||||
* // Valid ICAP address
|
||||
* isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36")
|
||||
* //_result:
|
||||
*
|
||||
* // Invalid checksum
|
||||
* isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBa72")
|
||||
* //_result:
|
||||
*
|
||||
* // Invalid ICAP checksum
|
||||
* isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
|
||||
* //_result:
|
||||
*
|
||||
* // Not an address (an ENS name requires a provided and an
|
||||
* // asynchronous API to access)
|
||||
* isAddress("ricmoo.eth")
|
||||
* //_result:
|
||||
*/
|
||||
export function isAddress(value) {
|
||||
try {
|
||||
getAddress(value);
|
||||
return true;
|
||||
}
|
||||
catch (error) { }
|
||||
return false;
|
||||
}
|
||||
async function checkAddress(target, promise) {
|
||||
const result = await promise;
|
||||
if (result == null || result === "0x0000000000000000000000000000000000000000") {
|
||||
assert(typeof (target) !== "string", "unconfigured name", "UNCONFIGURED_NAME", { value: target });
|
||||
assertArgument(false, "invalid AddressLike value; did not resolve to a value address", "target", target);
|
||||
}
|
||||
return getAddress(result);
|
||||
}
|
||||
/**
|
||||
* Resolves to an address for the %%target%%, which may be any
|
||||
* supported address type, an [[Addressable]] or a Promise which
|
||||
* resolves to an address.
|
||||
*
|
||||
* If an ENS name is provided, but that name has not been correctly
|
||||
* configured a [[UnconfiguredNameError]] is thrown.
|
||||
*
|
||||
* @example:
|
||||
* addr = "0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
||||
*
|
||||
* // Addresses are return synchronously
|
||||
* resolveAddress(addr, provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Address promises are resolved asynchronously
|
||||
* resolveAddress(Promise.resolve(addr))
|
||||
* //_result:
|
||||
*
|
||||
* // ENS names are resolved asynchronously
|
||||
* resolveAddress("dai.tokens.ethers.eth", provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Addressable objects are resolved asynchronously
|
||||
* contract = new Contract(addr, [ ])
|
||||
* resolveAddress(contract, provider)
|
||||
* //_result:
|
||||
*
|
||||
* // Unconfigured ENS names reject
|
||||
* resolveAddress("nothing-here.ricmoo.eth", provider)
|
||||
* //_error:
|
||||
*
|
||||
* // ENS names require a NameResolver object passed in
|
||||
* // (notice the provider was omitted)
|
||||
* resolveAddress("nothing-here.ricmoo.eth")
|
||||
* //_error:
|
||||
*/
|
||||
export function resolveAddress(target, resolver) {
|
||||
if (typeof (target) === "string") {
|
||||
if (target.match(/^0x[0-9a-f]{40}$/i)) {
|
||||
return getAddress(target);
|
||||
}
|
||||
assert(resolver != null, "ENS resolution requires a provider", "UNSUPPORTED_OPERATION", { operation: "resolveName" });
|
||||
return checkAddress(target, resolver.resolveName(target));
|
||||
}
|
||||
else if (isAddressable(target)) {
|
||||
return checkAddress(target, target.getAddress());
|
||||
}
|
||||
else if (target && typeof (target.then) === "function") {
|
||||
return checkAddress(target, target);
|
||||
}
|
||||
assertArgument(false, "unsupported addressable value", "target", target);
|
||||
}
|
||||
//# sourceMappingURL=checks.js.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/checks.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/checks.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src.ts/address/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aA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D;SAAM,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;QAC9B,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;KAEpD;SAAM,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE;QACrD,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACvC;IAED,cAAc,CAAC,KAAK,EAAE,+BAA+B,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC"}
|
||||
48
dev/env/node_modules/ethers/lib.esm/address/contract-address.d.ts
generated
vendored
Executable file
48
dev/env/node_modules/ethers/lib.esm/address/contract-address.d.ts
generated
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
import type { BigNumberish, BytesLike } from "../utils/index.js";
|
||||
/**
|
||||
* Returns the address that would result from a ``CREATE`` for %%tx%%.
|
||||
*
|
||||
* This can be used to compute the address a contract will be
|
||||
* deployed to by an EOA when sending a deployment transaction (i.e.
|
||||
* when the ``to`` address is ``null``).
|
||||
*
|
||||
* This can also be used to compute the address a contract will be
|
||||
* deployed to by a contract, by using the contract's address as the
|
||||
* ``to`` and the contract's nonce.
|
||||
*
|
||||
* @example
|
||||
* from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
|
||||
* nonce = 5;
|
||||
*
|
||||
* getCreateAddress({ from, nonce });
|
||||
* //_result:
|
||||
*/
|
||||
export declare function getCreateAddress(tx: {
|
||||
from: string;
|
||||
nonce: BigNumberish;
|
||||
}): string;
|
||||
/**
|
||||
* Returns the address that would result from a ``CREATE2`` operation
|
||||
* with the given %%from%%, %%salt%% and %%initCodeHash%%.
|
||||
*
|
||||
* To compute the %%initCodeHash%% from a contract's init code, use
|
||||
* the [[keccak256]] function.
|
||||
*
|
||||
* For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].
|
||||
*
|
||||
* @example
|
||||
* // The address of the contract
|
||||
* from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"
|
||||
*
|
||||
* // The salt
|
||||
* salt = id("HelloWorld")
|
||||
*
|
||||
* // The hash of the initCode
|
||||
* initCode = "0x6394198df16000526103ff60206004601c335afa6040516060f3";
|
||||
* initCodeHash = keccak256(initCode)
|
||||
*
|
||||
* getCreate2Address(from, salt, initCodeHash)
|
||||
* //_result:
|
||||
*/
|
||||
export declare function getCreate2Address(_from: string, _salt: BytesLike, _initCodeHash: BytesLike): string;
|
||||
//# sourceMappingURL=contract-address.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/contract-address.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/contract-address.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"contract-address.d.ts","sourceRoot":"","sources":["../../src.ts/address/contract-address.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKjE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG,MAAM,CAclF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,GAAG,MAAM,CAUnG"}
|
||||
69
dev/env/node_modules/ethers/lib.esm/address/contract-address.js
generated
vendored
Executable file
69
dev/env/node_modules/ethers/lib.esm/address/contract-address.js
generated
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
import { keccak256 } from "../crypto/index.js";
|
||||
import { concat, dataSlice, getBigInt, getBytes, encodeRlp, assertArgument } from "../utils/index.js";
|
||||
import { getAddress } from "./address.js";
|
||||
// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed
|
||||
/**
|
||||
* Returns the address that would result from a ``CREATE`` for %%tx%%.
|
||||
*
|
||||
* This can be used to compute the address a contract will be
|
||||
* deployed to by an EOA when sending a deployment transaction (i.e.
|
||||
* when the ``to`` address is ``null``).
|
||||
*
|
||||
* This can also be used to compute the address a contract will be
|
||||
* deployed to by a contract, by using the contract's address as the
|
||||
* ``to`` and the contract's nonce.
|
||||
*
|
||||
* @example
|
||||
* from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
|
||||
* nonce = 5;
|
||||
*
|
||||
* getCreateAddress({ from, nonce });
|
||||
* //_result:
|
||||
*/
|
||||
export function getCreateAddress(tx) {
|
||||
const from = getAddress(tx.from);
|
||||
const nonce = getBigInt(tx.nonce, "tx.nonce");
|
||||
let nonceHex = nonce.toString(16);
|
||||
if (nonceHex === "0") {
|
||||
nonceHex = "0x";
|
||||
}
|
||||
else if (nonceHex.length % 2) {
|
||||
nonceHex = "0x0" + nonceHex;
|
||||
}
|
||||
else {
|
||||
nonceHex = "0x" + nonceHex;
|
||||
}
|
||||
return getAddress(dataSlice(keccak256(encodeRlp([from, nonceHex])), 12));
|
||||
}
|
||||
/**
|
||||
* Returns the address that would result from a ``CREATE2`` operation
|
||||
* with the given %%from%%, %%salt%% and %%initCodeHash%%.
|
||||
*
|
||||
* To compute the %%initCodeHash%% from a contract's init code, use
|
||||
* the [[keccak256]] function.
|
||||
*
|
||||
* For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].
|
||||
*
|
||||
* @example
|
||||
* // The address of the contract
|
||||
* from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"
|
||||
*
|
||||
* // The salt
|
||||
* salt = id("HelloWorld")
|
||||
*
|
||||
* // The hash of the initCode
|
||||
* initCode = "0x6394198df16000526103ff60206004601c335afa6040516060f3";
|
||||
* initCodeHash = keccak256(initCode)
|
||||
*
|
||||
* getCreate2Address(from, salt, initCodeHash)
|
||||
* //_result:
|
||||
*/
|
||||
export function getCreate2Address(_from, _salt, _initCodeHash) {
|
||||
const from = getAddress(_from);
|
||||
const salt = getBytes(_salt, "salt");
|
||||
const initCodeHash = getBytes(_initCodeHash, "initCodeHash");
|
||||
assertArgument(salt.length === 32, "salt must be 32 bytes", "salt", _salt);
|
||||
assertArgument(initCodeHash.length === 32, "initCodeHash must be 32 bytes", "initCodeHash", _initCodeHash);
|
||||
return getAddress(dataSlice(keccak256(concat(["0xff", from, salt, initCodeHash])), 12));
|
||||
}
|
||||
//# sourceMappingURL=contract-address.js.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/contract-address.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/contract-address.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"contract-address.js","sourceRoot":"","sources":["../../src.ts/address/contract-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EACpE,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,sGAAsG;AAEtG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAyC;IACtE,MAAM,IAAI,GAAG,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAE9C,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,IAAI,QAAQ,KAAK,GAAG,EAAE;QAClB,QAAQ,GAAG,IAAI,CAAC;KACnB;SAAM,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QAC5B,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;KAC/B;SAAM;QACH,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;KAC9B;IAED,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAE,IAAI,EAAE,QAAQ,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,KAAgB,EAAE,aAAwB;IACvF,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAE7D,cAAc,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE,uBAAuB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAE3E,cAAc,CAAC,YAAY,CAAC,MAAM,KAAK,EAAE,EAAE,+BAA+B,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;IAE3G,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC7F,CAAC"}
|
||||
49
dev/env/node_modules/ethers/lib.esm/address/index.d.ts
generated
vendored
Executable file
49
dev/env/node_modules/ethers/lib.esm/address/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Addresses are a fundamental part of interacting with Ethereum. They
|
||||
* represent the global identity of Externally Owned Accounts (accounts
|
||||
* backed by a private key) and contracts.
|
||||
*
|
||||
* The Ethereum Naming Service (ENS) provides an interconnected ecosystem
|
||||
* of contracts, standards and libraries which enable looking up an
|
||||
* address for an ENS name.
|
||||
*
|
||||
* These functions help convert between various formats, validate
|
||||
* addresses and safely resolve ENS names.
|
||||
*
|
||||
* @_section: api/address:Addresses [about-addresses]
|
||||
*/
|
||||
/**
|
||||
* An interface for objects which have an address, and can
|
||||
* resolve it asyncronously.
|
||||
*
|
||||
* This allows objects such as [[Signer]] or [[Contract]] to
|
||||
* be used most places an address can be, for example getting
|
||||
* the [balance](Provider-getBalance).
|
||||
*/
|
||||
export interface Addressable {
|
||||
/**
|
||||
* Get the object address.
|
||||
*/
|
||||
getAddress(): Promise<string>;
|
||||
}
|
||||
/**
|
||||
* Anything that can be used to return or resolve an address.
|
||||
*/
|
||||
export type AddressLike = string | Promise<string> | Addressable;
|
||||
/**
|
||||
* An interface for any object which can resolve an ENS name.
|
||||
*/
|
||||
export interface NameResolver {
|
||||
/**
|
||||
* Resolve to the address for the ENS %%name%%.
|
||||
*
|
||||
* Resolves to ``null`` if the name is unconfigued. Use
|
||||
* [[resolveAddress]] (passing this object as %%resolver%%) to
|
||||
* throw for names that are unconfigured.
|
||||
*/
|
||||
resolveName(name: string): Promise<null | string>;
|
||||
}
|
||||
export { getAddress, getIcapAddress } from "./address.js";
|
||||
export { getCreateAddress, getCreate2Address } from "./contract-address.js";
|
||||
export { isAddressable, isAddress, resolveAddress } from "./checks.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/index.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/index.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/address/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;CACrD;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
||||
19
dev/env/node_modules/ethers/lib.esm/address/index.js
generated
vendored
Executable file
19
dev/env/node_modules/ethers/lib.esm/address/index.js
generated
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Addresses are a fundamental part of interacting with Ethereum. They
|
||||
* represent the global identity of Externally Owned Accounts (accounts
|
||||
* backed by a private key) and contracts.
|
||||
*
|
||||
* The Ethereum Naming Service (ENS) provides an interconnected ecosystem
|
||||
* of contracts, standards and libraries which enable looking up an
|
||||
* address for an ENS name.
|
||||
*
|
||||
* These functions help convert between various formats, validate
|
||||
* addresses and safely resolve ENS names.
|
||||
*
|
||||
* @_section: api/address:Addresses [about-addresses]
|
||||
*/
|
||||
null;
|
||||
export { getAddress, getIcapAddress } from "./address.js";
|
||||
export { getCreateAddress, getCreate2Address } from "./contract-address.js";
|
||||
export { isAddressable, isAddress, resolveAddress } from "./checks.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dev/env/node_modules/ethers/lib.esm/address/index.js.map
generated
vendored
Executable file
1
dev/env/node_modules/ethers/lib.esm/address/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/address/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,IAAI,CAAC;AAoCL,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
||||
Reference in New Issue
Block a user