admin: updated dist files
This commit is contained in:
parent
631aa1d91f
commit
b553b1bc43
@ -3,7 +3,7 @@ Change Log
|
||||
|
||||
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
|
||||
|
||||
ethers/v6.12.0 (2024-04-16 21:49)
|
||||
ethers/v6.12.0 (2024-04-17 01:09)
|
||||
---------------------------------
|
||||
|
||||
- Added Linea Sepolia network and Infura endpoint ([#4655](https://github.com/ethers-io/ethers.js/issues/4655); [b4aaab8](https://github.com/ethers-io/ethers.js/commit/b4aaab8d39fe47f8a1a296fa442f0856f84faf03)).
|
||||
|
@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.connect = exports.checkProvider = exports.getProvider = exports.getProviderNetworks = exports.providerNames = exports.setupProviders = void 0;
|
||||
const index_js_1 = require("../index.js");
|
||||
;
|
||||
const ethNetworks = ["default", "mainnet", "goerli"];
|
||||
const ethNetworks = ["default", "mainnet", "sepolia"];
|
||||
//const maticNetworks = [ "matic", "maticmum" ];
|
||||
const ProviderCreators = [
|
||||
{
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":";;;AAAA,0CAYqB;AAQpB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAE,CAAC;AACvD,gDAAgD;AAEhD,MAAM,gBAAgB,GAA2B;IAC7C;QACI,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,0BAAe,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC5E,CAAC;KACJ;IACD;;;;;;;;MAQE;IACF;;;;;;;;MAQE;IACF;QACI,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,CAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,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AQ,CAAC;AACpB,CAAC;AAJD,0BAIC"}
|
@ -6,7 +6,8 @@ const create_provider_js_1 = require("./create-provider.js");
|
||||
const index_js_1 = require("../index.js");
|
||||
(0, create_provider_js_1.setupProviders)();
|
||||
describe("Test Contract", function () {
|
||||
const addr = "0x99417252Aad7B065940eBdF50d665Fb8879c5958";
|
||||
const addr = "0x24264C81146c23bbF83Db1d3F87d2111C2935Ffa";
|
||||
const networkName = "sepolia";
|
||||
const abi = [
|
||||
"error CustomError1(uint256 code, string message)",
|
||||
"event EventUint256(uint256 indexed value)",
|
||||
@ -21,20 +22,20 @@ describe("Test Contract", function () {
|
||||
];
|
||||
it("tests contract calls", async function () {
|
||||
this.timeout(10000);
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||
assert_1.default.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
||||
assert_1.default.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
||||
});
|
||||
it("tests events", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
||||
assert_1.default.ok(provider);
|
||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||
const signer = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
||||
const contractSigner = contract.connect(signer);
|
||||
const vUint256 = 42;
|
||||
const vAddrName = "ethers.eth";
|
||||
const vAddrName = "tests.eth";
|
||||
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
||||
const vString = "Hello";
|
||||
const vBytes = "0x12345678";
|
||||
@ -215,8 +216,9 @@ describe("Test Typed Contract Interaction", function () {
|
||||
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
||||
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
||||
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
||||
const addr = "0x838f41545DA5e18AA0e1ab391085d22E172B7B02";
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||
const addr = "0xf20ba47c47a32fc2d9ad846ff06f2fa6e89eec74";
|
||||
const networkName = "sepolia";
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||
for (const { types, valueFunc } of tests) {
|
||||
for (const type of types) {
|
||||
@ -305,7 +307,8 @@ describe("Test Contract Fallback", function () {
|
||||
sendDataAndValue: { error: "overrides" },
|
||||
},
|
||||
];
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||
const networkName = "sepolia";
|
||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
||||
const testGroups = [
|
||||
{
|
||||
group: "sendNone",
|
||||
|
File diff suppressed because one or more lines are too long
@ -6,13 +6,13 @@ const create_provider_js_1 = require("./create-provider.js");
|
||||
(0, create_provider_js_1.setupProviders)();
|
||||
describe("Resolve ENS avatar", function () {
|
||||
[
|
||||
{ title: "data", name: "data-avatar.tests.ethers.eth", value: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8xMC0yMjowNjo1MyAgICAgICAgIj4g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ODQ1MEM1NTZEOTU1MDk3OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1RDg1MTI1QTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbM0uMAAAAGUExURQAA/wAAAHtivz4AAAAOSURBVHjaYmDABAABBgAAFAABaEkyYwAAAABJRU5ErkJggg==" },
|
||||
{ title: "ipfs", name: "ipfs-avatar.tests.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
||||
{ title: "url", name: "url-avatar.tests.eth", value: "https:/\/ethers.org/static/logo.png" },
|
||||
].forEach((test) => {
|
||||
it(`Resolves avatar for ${test.title}`, async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)("sepolia");
|
||||
const avatar = await provider.getAvatar(test.name);
|
||||
assert_1.default.equal(test.value, avatar, "avatar url");
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,6DAA+D;AAE/D,IAAA,mCAAc,GAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,owCAAowC,EAAE;QACp0C,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,8EAA8E,EAAE;QAC9I,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,qCAAqC,EAAE;KACtG,CAAC,OAAO,CAAC,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,CAAC;YACnD,gBAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
@ -15,11 +15,12 @@ describe("Test CCIP execution", function () {
|
||||
]);
|
||||
assert_1.default.equal(result, (0, index_js_1.keccak256)(check), "response is equal");
|
||||
};
|
||||
const address = "0x6C5ed35574a9b4d163f75bBf0595F7540D8FCc2d";
|
||||
const address = "0xaeaa06a37e6421ac63120d6daddee0ffa04b43e8";
|
||||
const networkName = "sepolia";
|
||||
const calldata = "0x1234";
|
||||
it("testGet passes under normal operation", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGet(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -30,7 +31,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGet(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address,
|
||||
@ -40,13 +41,17 @@ describe("Test CCIP execution", function () {
|
||||
const result = await provider.call(tx);
|
||||
console.log(result);
|
||||
}, (error) => {
|
||||
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||
const offchainErrorData = (0, index_js_1.concat)([
|
||||
"0x556f1830000000000000000000000000",
|
||||
address,
|
||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
||||
]);
|
||||
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
||||
});
|
||||
});
|
||||
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
provider.disableCcipRead = true;
|
||||
// testGetFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
@ -57,13 +62,17 @@ describe("Test CCIP execution", function () {
|
||||
const result = await provider.call(tx);
|
||||
console.log(result);
|
||||
}, (error) => {
|
||||
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||
const offchainErrorData = (0, index_js_1.concat)([
|
||||
"0x556f1830000000000000000000000000",
|
||||
address,
|
||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
||||
]);
|
||||
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
||||
});
|
||||
});
|
||||
it("testGetFail should fail if all URLs 5xx", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGetFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -80,7 +89,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetSenderFail should fail if sender does not match", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGetSenderFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -100,7 +109,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetMissing should fail if early URL 4xx", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGetMissing(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -117,7 +126,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetFallback passes if any URL returns correctly", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testGetFallback(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -128,7 +137,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testPost passes under normal operation", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
||||
// testPost(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
|
File diff suppressed because one or more lines are too long
@ -218,13 +218,13 @@ describe("Test Provider Transaction operations", function () {
|
||||
});
|
||||
describe("Test Networks", function () {
|
||||
const networks = [
|
||||
"mainnet", "goerli", "sepolia", "holesky",
|
||||
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
|
||||
"base", "base-goerli", "base-sepolia",
|
||||
"mainnet", "sepolia", "holesky",
|
||||
"arbitrum", "arbitrum-sepolia",
|
||||
"base", "base-sepolia",
|
||||
"bnb", "bnbt",
|
||||
"linea", "linea-goerli",
|
||||
"matic", "matic-mumbai",
|
||||
"optimism", "optimism-goerli", "optimism-sepolia",
|
||||
"linea", "linea-sepolia",
|
||||
"matic", "matic-mumbai", "matic-amoy",
|
||||
"optimism", "optimism-sepolia",
|
||||
"xdai",
|
||||
];
|
||||
const providerNames = [
|
||||
|
File diff suppressed because one or more lines are too long
@ -19,8 +19,8 @@ describe("Tests Provider Call Exception", function () {
|
||||
//{ code: 0x41, reason: "OUT_OF_MEMORY" },
|
||||
//{ code: 0x51, reason: "UNINITIALIZED_FUNCTION_CALL" },
|
||||
];
|
||||
const testAddr = "0xF20Ba47c47a32fc2d9ad846fF06f2fa6e89eeC74";
|
||||
const networkName = "goerli";
|
||||
const testAddr = "0x86d19fF4b2EB0D451511B5B930b01DC71fD9a2Ee";
|
||||
const networkName = "sepolia";
|
||||
for (const { code, reason } of panics) {
|
||||
for (const method of ["call", "estimateGas"]) {
|
||||
for (const providerName of create_provider_js_1.providerNames) {
|
||||
@ -132,7 +132,7 @@ describe("Tests Provider Call Exception", function () {
|
||||
});
|
||||
describe("Test Provider Blockchain Errors", function () {
|
||||
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||
const networkName = "goerli";
|
||||
const networkName = "sepolia";
|
||||
for (const providerName of create_provider_js_1.providerNames) {
|
||||
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
||||
if (provider == null) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -11,7 +11,7 @@ function stall(duration) {
|
||||
describe("Sends Transactions", function () {
|
||||
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||
console.log("Faucet Address:", wallet.address);
|
||||
const networkName = "goerli";
|
||||
const networkName = "sepolia";
|
||||
for (const providerName of create_provider_js_1.providerNames) {
|
||||
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
||||
if (provider == null) {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test-providers-send.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-send.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,0CAA8C;AAE9C,6DAAkF;AAIlF,SAAS,KAAK,CAAC,QAAgB;IAC3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,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 = tslib_1.__importDefault(require("assert"));
|
||||
const create_provider_js_1 = require("./create-provider.js");
|
||||
(0, create_provider_js_1.setupProviders)();
|
||||
describe("Test EIP-2544 ENS wildcards", function () {
|
||||
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||
const provider = (0, create_provider_js_1.connect)("sepolia");
|
||||
it("Resolves recursively", async function () {
|
||||
this.timeout(10000);
|
||||
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
||||
assert_1.default.ok(resolver, "failed to get resolver");
|
||||
assert_1.default.equal(resolver.address, "0x15abA1fa74Bfdecd63A71218DC632d4328Db8168", "address");
|
||||
assert_1.default.equal(resolver.address, "0x657D81B1E647A56457ff035Af22898411673f7FD", "address");
|
||||
assert_1.default.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
||||
// Test pass-through avatar
|
||||
assert_1.default.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
||||
assert_1.default.equal(await resolver.getAddress(), "0x4B711A377B1b3534749FBe5e59Bcf7F94d92EA98", "getAddress()");
|
||||
assert_1.default.equal(await resolver.getAddress(), "0xF0d6e3fC0f5A23aAAA4933700438b6313Dd331bD", "getAddress()");
|
||||
});
|
||||
});
|
||||
describe("Test ENS-DNS gasless resolver", function () {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test-providers-wildcard.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-wildcard.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,6DAA+D;AAE/D,IAAA,mCAAc,GAAE,CAAC;AAEjB,QAAQ,CAAC,6BAA6B,EAAE;IACpC,MAAM,QAAQ,GAAG,IAAA,4BAAO,EAAC,QAAQ,CAAC,CAAC;IAEnC,EAAE,CAAC,sBAAsB,EAAE,KAAK;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,WAAW,C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AC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAClE,gBAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;QAE9C,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,4CAA4C,EAAE,SAAS,CAAC,CAAC;QACxF,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAE5E,2BAA2B;QAC3B,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,SAAS,EAAE,EAAE,6DAA6D,EAAE,aAAa,CAAC,CAAC;QAEvH,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,EAAE,4CAA4C,EAAE,cAAc,CAAC,CAAC;IAC5G,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,+BAA+B,EAAE;IACtC,EAAE,CAAC,sBAAsB,EAAE,KAAK;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,IAAA,4BAAO,EAAC,SAAS,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACvD,gBAAM,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,EAAE,MAAM,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
@ -5,7 +5,7 @@ ChainstackProvider, EtherscanProvider, InfuraProvider,
|
||||
// PocketProvider,
|
||||
QuickNodeProvider, FallbackProvider, isError, } from "../index.js";
|
||||
;
|
||||
const ethNetworks = ["default", "mainnet", "goerli"];
|
||||
const ethNetworks = ["default", "mainnet", "sepolia"];
|
||||
//const maticNetworks = [ "matic", "maticmum" ];
|
||||
const ProviderCreators = [
|
||||
{
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe;AACnB,mBAAmB;AACnB,yBAAyB;AACrB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc;AAClB,qBAAqB;AACjB,iBAAiB,EAEjB,gBAAgB,EAChB,OAAO,GACV,MAAM,aAAa,CAAC;AAQpB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAE,CAAC;AACvD,gDAAgD;AAEhD,MAAM,gBAAgB,GAA2B;IAC7C;QACI,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC5E,CAAC;KACJ;IACD;;;;;;;;MAQE;IACF;;;;;;;;MAQE;IACF;QACI,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,CAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAE;QAC9D,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;KACJ;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC;QAChF,CAAC;KACJ;IACD;QACI,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC3E,CAAC;KACJ;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OAAO,EAAE;YACT,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACzC,IAAI,QAAQ,EAAE;gBACV,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAC/C;YACD,OAAO,QAAQ,CAAC;SACnB;KACJ;IAAC,OAAO,KAAK,EAAE;QACZ,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAE;YAAE,MAAM,KAAK,CAAC;SAAE;KAC5D;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,OAAe;IAC3D,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxD,IAAI,QAAQ,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAyB,OAAQ,EAAE,CAAC,CAAC;KAAE;IAC/E,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
@ -3,7 +3,8 @@ import { getProvider, setupProviders } from "./create-provider.js";
|
||||
import { Contract, EventLog, isError, Typed, Wallet } from "../index.js";
|
||||
setupProviders();
|
||||
describe("Test Contract", function () {
|
||||
const addr = "0x99417252Aad7B065940eBdF50d665Fb8879c5958";
|
||||
const addr = "0x24264C81146c23bbF83Db1d3F87d2111C2935Ffa";
|
||||
const networkName = "sepolia";
|
||||
const abi = [
|
||||
"error CustomError1(uint256 code, string message)",
|
||||
"event EventUint256(uint256 indexed value)",
|
||||
@ -18,20 +19,20 @@ describe("Test Contract", function () {
|
||||
];
|
||||
it("tests contract calls", async function () {
|
||||
this.timeout(10000);
|
||||
const provider = getProvider("InfuraProvider", "goerli");
|
||||
const provider = getProvider("InfuraProvider", networkName);
|
||||
const contract = new Contract(addr, abi, provider);
|
||||
assert.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
||||
assert.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
||||
});
|
||||
it("tests events", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = getProvider("InfuraProvider", "goerli");
|
||||
const provider = getProvider("InfuraProvider", networkName);
|
||||
assert.ok(provider);
|
||||
const contract = new Contract(addr, abi, provider);
|
||||
const signer = new Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
||||
const contractSigner = contract.connect(signer);
|
||||
const vUint256 = 42;
|
||||
const vAddrName = "ethers.eth";
|
||||
const vAddrName = "tests.eth";
|
||||
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
||||
const vString = "Hello";
|
||||
const vBytes = "0x12345678";
|
||||
@ -212,8 +213,9 @@ describe("Test Typed Contract Interaction", function () {
|
||||
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
||||
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
||||
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
||||
const addr = "0x838f41545DA5e18AA0e1ab391085d22E172B7B02";
|
||||
const provider = getProvider("InfuraProvider", "goerli");
|
||||
const addr = "0xf20ba47c47a32fc2d9ad846ff06f2fa6e89eec74";
|
||||
const networkName = "sepolia";
|
||||
const provider = getProvider("InfuraProvider", networkName);
|
||||
const contract = new Contract(addr, abi, provider);
|
||||
for (const { types, valueFunc } of tests) {
|
||||
for (const type of types) {
|
||||
@ -302,7 +304,8 @@ describe("Test Contract Fallback", function () {
|
||||
sendDataAndValue: { error: "overrides" },
|
||||
},
|
||||
];
|
||||
const provider = getProvider("InfuraProvider", "goerli");
|
||||
const networkName = "sepolia";
|
||||
const provider = getProvider("InfuraProvider", networkName);
|
||||
const testGroups = [
|
||||
{
|
||||
group: "sendNone",
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,13 +3,13 @@ import { connect, setupProviders } from "./create-provider.js";
|
||||
setupProviders();
|
||||
describe("Resolve ENS avatar", function () {
|
||||
[
|
||||
{ title: "data", name: "data-avatar.tests.ethers.eth", value: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8xMC0yMjowNjo1MyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUQ4NTEyNUIyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUQ4NTEyNUMyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1RDg1MTI1OTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1RDg1MTI1QTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbM0uMAAAAGUExURQAA/wAAAHtivz4AAAAOSURBVHjaYmDABAABBgAAFAABaEkyYwAAAABJRU5ErkJggg==" },
|
||||
{ title: "ipfs", name: "ipfs-avatar.tests.ethers.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
||||
{ title: "url", name: "url-avatar.tests.ethers.eth", value: "https:/\/ethers.org/static/logo.png" },
|
||||
{ title: "data", name: "data-avatar.tests.eth", value: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8xMC0yMjowNjo1MyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUQ4NTEyNUIyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUQ4NTEyNUMyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1RDg1MTI1OTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1RDg1MTI1QTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbM0uMAAAAGUExURQAA/wAAAHtivz4AAAAOSURBVHjaYmDABAABBgAAFAABaEkyYwAAAABJRU5ErkJggg==" },
|
||||
{ title: "ipfs", name: "ipfs-avatar.tests.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
||||
{ title: "url", name: "url-avatar.tests.eth", value: "https:/\/ethers.org/static/logo.png" },
|
||||
].forEach((test) => {
|
||||
it(`Resolves avatar for ${test.title}`, async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect("sepolia");
|
||||
const avatar = await provider.getAvatar(test.name);
|
||||
assert.equal(test.value, avatar, "avatar url");
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,EAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,owCAAowC,EAAE;QACp0C,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,8EAA8E,EAAE;QAC9I,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,qCAAqC,EAAE;KACtG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,EAAE,CAAC,uBAAwB,IAAI,CAAC,KAAM,EAAE,EAAE,KAAK;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
||||
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,EAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,owCAAowC,EAAE;QAC7zC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,8EAA8E,EAAE;QACvI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,qCAAqC,EAAE;KAC/F,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,EAAE,CAAC,uBAAwB,IAAI,CAAC,KAAM,EAAE,EAAE,KAAK;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;YACpC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
@ -12,11 +12,12 @@ describe("Test CCIP execution", function () {
|
||||
]);
|
||||
assert.equal(result, keccak256(check), "response is equal");
|
||||
};
|
||||
const address = "0x6C5ed35574a9b4d163f75bBf0595F7540D8FCc2d";
|
||||
const address = "0xaeaa06a37e6421ac63120d6daddee0ffa04b43e8";
|
||||
const networkName = "sepolia";
|
||||
const calldata = "0x1234";
|
||||
it("testGet passes under normal operation", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGet(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -27,7 +28,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGet(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address,
|
||||
@ -37,13 +38,17 @@ describe("Test CCIP execution", function () {
|
||||
const result = await provider.call(tx);
|
||||
console.log(result);
|
||||
}, (error) => {
|
||||
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||
const offchainErrorData = concat([
|
||||
"0x556f1830000000000000000000000000",
|
||||
address,
|
||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
||||
]);
|
||||
return (isCallException(error) && error.data === offchainErrorData);
|
||||
});
|
||||
});
|
||||
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
provider.disableCcipRead = true;
|
||||
// testGetFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
@ -54,13 +59,17 @@ describe("Test CCIP execution", function () {
|
||||
const result = await provider.call(tx);
|
||||
console.log(result);
|
||||
}, (error) => {
|
||||
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||
const offchainErrorData = concat([
|
||||
"0x556f1830000000000000000000000000",
|
||||
address,
|
||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
||||
]);
|
||||
return (isCallException(error) && error.data === offchainErrorData);
|
||||
});
|
||||
});
|
||||
it("testGetFail should fail if all URLs 5xx", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGetFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -77,7 +86,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetSenderFail should fail if sender does not match", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGetSenderFail(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -97,7 +106,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetMissing should fail if early URL 4xx", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGetMissing(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -114,7 +123,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testGetFallback passes if any URL returns correctly", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testGetFallback(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
@ -125,7 +134,7 @@ describe("Test CCIP execution", function () {
|
||||
});
|
||||
it("testPost passes under normal operation", async function () {
|
||||
this.timeout(60000);
|
||||
const provider = connect("goerli");
|
||||
const provider = connect(networkName);
|
||||
// testPost(bytes callData = "0x1234")
|
||||
const tx = {
|
||||
to: address, enableCcipRead: true,
|
||||
|
File diff suppressed because one or more lines are too long
@ -215,13 +215,13 @@ describe("Test Provider Transaction operations", function () {
|
||||
});
|
||||
describe("Test Networks", function () {
|
||||
const networks = [
|
||||
"mainnet", "goerli", "sepolia", "holesky",
|
||||
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
|
||||
"base", "base-goerli", "base-sepolia",
|
||||
"mainnet", "sepolia", "holesky",
|
||||
"arbitrum", "arbitrum-sepolia",
|
||||
"base", "base-sepolia",
|
||||
"bnb", "bnbt",
|
||||
"linea", "linea-goerli",
|
||||
"matic", "matic-mumbai",
|
||||
"optimism", "optimism-goerli", "optimism-sepolia",
|
||||
"linea", "linea-sepolia",
|
||||
"matic", "matic-mumbai", "matic-amoy",
|
||||
"optimism", "optimism-sepolia",
|
||||
"xdai",
|
||||
];
|
||||
const providerNames = [
|
||||
|
File diff suppressed because one or more lines are too long
@ -16,8 +16,8 @@ describe("Tests Provider Call Exception", function () {
|
||||
//{ code: 0x41, reason: "OUT_OF_MEMORY" },
|
||||
//{ code: 0x51, reason: "UNINITIALIZED_FUNCTION_CALL" },
|
||||
];
|
||||
const testAddr = "0xF20Ba47c47a32fc2d9ad846fF06f2fa6e89eeC74";
|
||||
const networkName = "goerli";
|
||||
const testAddr = "0x86d19fF4b2EB0D451511B5B930b01DC71fD9a2Ee";
|
||||
const networkName = "sepolia";
|
||||
for (const { code, reason } of panics) {
|
||||
for (const method of ["call", "estimateGas"]) {
|
||||
for (const providerName of providerNames) {
|
||||
@ -129,7 +129,7 @@ describe("Tests Provider Call Exception", function () {
|
||||
});
|
||||
describe("Test Provider Blockchain Errors", function () {
|
||||
const wallet = new Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||
const networkName = "goerli";
|
||||
const networkName = "sepolia";
|
||||
for (const providerName of providerNames) {
|
||||
const provider = getProvider(providerName, networkName);
|
||||
if (provider == null) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@ setupProviders();
|
||||
describe("Sends Transactions", function () {
|
||||
const wallet = new Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||
console.log("Faucet Address:", wallet.address);
|
||||
const networkName = "goerli";
|
||||
const networkName = "sepolia";
|
||||
for (const providerName of providerNames) {
|
||||
const provider = getProvider(providerName, networkName);
|
||||
if (provider == null) {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test-providers-send.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-send.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIlF,SAAS,KAAK,CAAC,QAAgB;IAC3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,cAAc,EAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAE3B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAS,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAE/C,MAAM,WAAW,GAAG,QAAQ,CAAC;IAC7B,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACtC,MAAM,QAAQ,GAAG,WAAW,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QACxD,IAAI,QAAQ,IAAI,IAAI,EAAE;YAAE,SAAS;SAAE;QAEnC,EAAE,CAAC,kBAAmB,YAAa,EAAE,EAAE,KAAK;YACxC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAErB,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAEnC,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC;YAE/C,8CAA8C;YAC9C,IAAI,EAAE,GAA+B,IAAI,CAAC;YAC1C,KAAK,IAAI,CAA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AAI,CAAC,CAAC;wBAClB,SAAS;qBACZ;oBACD,MAAM,KAAK,CAAC;iBACf;aACJ;YACD,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;YAEpC,kBAAkB;YAClB,MAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY;YACrE,uBAAuB;YAEvB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACpD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;KACN;AAGL,CAAC,CAAC,CAAC"}
|
@ -2,16 +2,16 @@ import assert from "assert";
|
||||
import { connect, setupProviders } from "./create-provider.js";
|
||||
setupProviders();
|
||||
describe("Test EIP-2544 ENS wildcards", function () {
|
||||
const provider = connect("goerli");
|
||||
const provider = connect("sepolia");
|
||||
it("Resolves recursively", async function () {
|
||||
this.timeout(10000);
|
||||
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
||||
assert.ok(resolver, "failed to get resolver");
|
||||
assert.equal(resolver.address, "0x15abA1fa74Bfdecd63A71218DC632d4328Db8168", "address");
|
||||
assert.equal(resolver.address, "0x657D81B1E647A56457ff035Af22898411673f7FD", "address");
|
||||
assert.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
||||
// Test pass-through avatar
|
||||
assert.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
||||
assert.equal(await resolver.getAddress(), "0x4B711A377B1b3534749FBe5e59Bcf7F94d92EA98", "getAddress()");
|
||||
assert.equal(await resolver.getAddress(), "0xF0d6e3fC0f5A23aAAA4933700438b6313Dd331bD", "getAddress()");
|
||||
});
|
||||
});
|
||||
describe("Test ENS-DNS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