ethers#VoidSigner TypeScript Examples
The following examples show how to use
ethers#VoidSigner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: util.spec.ts From noether with Apache License 2.0 | 7 votes |
describe("util contracts test suite", () => {
it("should create mainnet contract", async () => {
const network: Network = {
chainId: 1,
name: "mainnet",
};
const signer: Signer = new VoidSigner(
"0x569369A96be963B7ef2bA01dA792EF95fDcCD5b0"
);
const workerManager = await createWorkerManager(network, signer);
expect(workerManager.address).to.equal(
mainnet.contracts.WorkerManagerAuthManagerImpl.address
);
expect(workerManager.signer).to.equal(signer);
});
it("should create goerli contract", async () => {
const network: Network = {
chainId: 5,
name: "goerli",
};
const signer: Signer = new VoidSigner(
"0x569369A96be963B7ef2bA01dA792EF95fDcCD5b0"
);
const workerManager = await createWorkerManager(network, signer);
expect(workerManager.address).to.equal(
goerli.contracts.WorkerManagerAuthManagerImpl.address
);
expect(workerManager.signer).to.equal(signer);
});
});
Example #2
Source File: pos.spec.ts From noether with Apache License 2.0 | 6 votes |
describe("pos contracts test suite", () => {
it("should create PoS mainnet contract", async () => {
const network: Network = {
chainId: 1,
name: "homestead",
};
const signer: Signer = new VoidSigner(
"0x569369A96be963B7ef2bA01dA792EF95fDcCD5b0"
);
const pos = await createPoS(network, signer);
expect(pos.address).to.equal(mainnet.contracts.PoS.address);
expect(pos.signer).to.equal(signer);
});
it("should create PoS goerli contract", async () => {
const network: Network = {
chainId: 5,
name: "goerli",
};
const signer: Signer = new VoidSigner(
"0x569369A96be963B7ef2bA01dA792EF95fDcCD5b0"
);
const pos = await createPoS(network, signer);
expect(pos.address).to.equal(goerli.contracts.PoS.address);
expect(pos.signer).to.equal(signer);
});
});