@@ -522,7 +522,7 @@ const deployWithEthersJs = `
522
522
523
523
// Note that the script needs the ABI which is generated from the compilation artifact.
524
524
// Make sure contract is compiled and artifacts are generated
525
- const artifactsPath = 'contracts/ artifacts/Owner.json' // Change this for different path
525
+ const artifactsPath = 'artifacts/Owner.json' // Change this for different path
526
526
527
527
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
528
528
// 'web3Provider' is a remix global variable object
@@ -555,7 +555,7 @@ const { expect } = require("chai");
555
555
describe("Storage with lib", function () {
556
556
it("test initial value", async function () {
557
557
// Make sure contract is compiled and artifacts are generated
558
- const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/ artifacts/Storage.json'))
558
+ const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'artifacts/Storage.json'))
559
559
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
560
560
let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer)
561
561
let storage = await Storage.deploy();
@@ -565,7 +565,7 @@ describe("Storage with lib", function () {
565
565
});
566
566
567
567
it("test updating and retrieving updated value", async function () {
568
- const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/ artifacts/Storage.json'))
568
+ const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'artifacts/Storage.json'))
569
569
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
570
570
let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer)
571
571
let storage = await Storage.deploy();
@@ -576,7 +576,7 @@ describe("Storage with lib", function () {
576
576
});
577
577
578
578
it("fail test updating and retrieving updated value", async function () {
579
- const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/ artifacts/Storage.json'))
579
+ const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'artifacts/Storage.json'))
580
580
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
581
581
let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer)
582
582
let storage = await Storage.deploy();
@@ -633,7 +633,7 @@ const { ethers } = require("hardhat");
633
633
634
634
describe("Storage", function () {
635
635
it("test library integration by calling a lib method", async function () {
636
- const metadataLib = JSON.parse(await remix.call('fileManager', 'readFile', 'contracts/ artifacts/Lib.json'))
636
+ const metadataLib = JSON.parse(await remix.call('fileManager', 'readFile', 'artifacts/Lib.json'))
637
637
console.log('deploying lib:')
638
638
const artifactLib = {
639
639
contractName: 'Lib',
@@ -650,7 +650,7 @@ describe("Storage", function () {
650
650
const lib = await factoryLib.deploy();
651
651
await lib.deployed()
652
652
653
- const metadata = JSON.parse(await remix.call('fileManager', 'readFile', 'contracts/ artifacts/StorageWithLib.json'))
653
+ const metadata = JSON.parse(await remix.call('fileManager', 'readFile', 'artifacts/StorageWithLib.json'))
654
654
const artifact = {
655
655
contractName: 'StorageWithLib',
656
656
sourceName: 'contracts/StorageWithLib.sol',
@@ -786,7 +786,7 @@ const scriptAutoExec = {
786
786
787
787
// function getContractFactoryFromArtifact(artifact: Artifact, factoryOptions: FactoryOptions): Promise<ethers.ContractFactory>;
788
788
789
- const metadataLib = JSON.parse(await remix.call('fileManager', 'readFile', 'contracts/ artifacts/lib.json'))
789
+ const metadataLib = JSON.parse(await remix.call('fileManager', 'readFile', 'artifacts/lib.json'))
790
790
console.log('deploying lib:')
791
791
792
792
const artifactLib = {
@@ -808,7 +808,7 @@ const scriptAutoExec = {
808
808
809
809
console.log('lib deployed', lib.address)
810
810
811
- const metadata = JSON.parse(await remix.call('fileManager', 'readFile', 'contracts/ artifacts/Storage.json'))
811
+ const metadata = JSON.parse(await remix.call('fileManager', 'readFile', 'artifacts/Storage.json'))
812
812
const artifact = {
813
813
contractName: 'Storage',
814
814
sourceName: 'contracts/1_Storage.sol',
0 commit comments