Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 5706855

Browse files
committed
Use encodeCreation() in encoder test
1 parent d0b9122 commit 5706855

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/encoder/test/constructor.test.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as Encoder from "..";
99
import * as Codec from "@truffle/codec";
1010
import { Shims } from "@truffle/compile-common";
1111
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
12-
import * as Abi from "@truffle/abi-utils";
1312
import Ganache from "ganache";
1413
import type { Provider } from "web3/providers";
1514

@@ -61,23 +60,17 @@ beforeAll(async () => {
6160
describe("Encoding", () => {
6261
describe("Constructors", () => {
6362
let encoder: Encoder.ContractEncoder;
64-
let abi: Abi.ConstructorEntry;
6563
let bytecode: string;
6664

6765
beforeAll(async () => {
6866
encoder = await Encoder.forArtifact(artifacts.TestContract, {
6967
projectInfo: { compilations }
7068
});
71-
abi = <Abi.ConstructorEntry>(
72-
Abi.normalize(artifacts.TestContract.abi).find(
73-
entry => entry.type === "constructor"
74-
)
75-
);
7669
bytecode = Shims.NewToLegacy.forBytecode(artifacts.TestContract.bytecode);
7770
});
7871

7972
it("Encodes constructors", async () => {
80-
const { data } = await encoder.encodeTxNoResolution(abi, [1]);
73+
const { data } = await encoder.encodeCreation([1]);
8174
assert.strictEqual(
8275
data,
8376
bytecode +

0 commit comments

Comments
 (0)