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

Commit

Permalink
Revert "Allow importing ABI JSON files in Solidity"
Browse files Browse the repository at this point in the history
  • Loading branch information
gnidan authored Oct 29, 2020
1 parent 333b6bd commit e7c5529
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 460 deletions.
3 changes: 1 addition & 2 deletions packages/resolver/lib/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const expect = require("@truffle/expect");
const provision = require("@truffle/provisioner");

import { ResolverSource } from "./source";
import { EthPMv1, NPM, GlobalNPM, FS, Truffle, ABI } from "./sources";
import { EthPMv1, NPM, GlobalNPM, FS, Truffle } from "./sources";

export class Resolver {
options: any;
Expand All @@ -17,7 +17,6 @@ export class Resolver {
new EthPMv1(options.working_directory),
new NPM(options.working_directory),
new GlobalNPM(),
new ABI(options.working_directory, options.contracts_build_directory),
new FS(options.working_directory, options.contracts_build_directory)
];

Expand Down
49 changes: 0 additions & 49 deletions packages/resolver/lib/sources/abi.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/resolver/lib/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export { NPM } from "./npm";
export { GlobalNPM } from "./globalnpm";
export { FS } from "./fs";
export { Truffle } from "./truffle";
export { ABI } from "./abi";
1 change: 0 additions & 1 deletion packages/resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@truffle/contract-sources": "^0.1.8",
"@truffle/expect": "^0.0.15",
"@truffle/provisioner": "^0.2.9",
"abi-to-sol": "^0.2.0",
"debug": "^4.1.1",
"detect-installed": "^2.0.4",
"get-installed-path": "^4.0.8",
Expand Down
12 changes: 5 additions & 7 deletions packages/truffle/test/scenarios/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("truffle build [ @standalone ]", () => {
let config, project;

describe("when there is no build script in config", () => {
beforeEach("set up sandbox", function () {
beforeEach("set up sandbox", function() {
this.timeout(10000);
project = path.join(
__dirname,
Expand Down Expand Up @@ -37,7 +37,7 @@ describe("truffle build [ @standalone ]", () => {
});

describe("when there is a proper build config", () => {
beforeEach("set up sandbox", function () {
beforeEach("set up sandbox", function() {
this.timeout(10000);
project = path.join(
__dirname,
Expand All @@ -48,16 +48,15 @@ describe("truffle build [ @standalone ]", () => {
config.logger = logger;
});
});
it("runs the build script", async function () {
this.timeout(10000);
it("runs the build script", async () => {
await CommandRunner.run("build", config);
const output = logger.contents();
assert(output.includes("'this is the build script'"));
});
});

describe("when there is an object in the build config", () => {
beforeEach("set up sandbox", function () {
beforeEach("set up sandbox", function() {
this.timeout(10000);
project = path.join(
__dirname,
Expand All @@ -68,8 +67,7 @@ describe("truffle build [ @standalone ]", () => {
config.logger = logger;
});
});
it("tells the user it shouldn't use an object", async function () {
this.timeout(10000);
it("tells the user it shouldn't use an object", async () => {
try {
await CommandRunner.run("build", config);
assert(false, "The process should have exited with code 1");
Expand Down
Loading

0 comments on commit e7c5529

Please sign in to comment.