Skip to content

Commit

Permalink
fix: contract wrapper, abi path resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
seinmyung25 committed Sep 9, 2024
1 parent ffbc5ac commit 5d30659
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions helper/eco-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class EcoProxyFactory extends AsyncConstructor {

logic.address = await logic.getAddress();
logic.deployedBlockNumber = logic.deploymentTransaction()!.blockNumber!;
return logic as EcoCT<CF>;
return logic;
}

async deployWithImpl<CF extends EcoCF<CF>>(
Expand All @@ -137,7 +137,7 @@ export class EcoProxyFactory extends AsyncConstructor {
const _deployer = deployer ?? this.deployer;
const logic = await this._deployLogic(implFactory, implConstructArgs, _deployer);
const inst = await this._deployProxy(logic, proxyInitData, _deployer);
return inst as EcoCT<CF>;
return inst;
}

async getLogicAddress(inst: AddressLike) {
Expand Down Expand Up @@ -294,7 +294,7 @@ export class EcoUUPS<CF extends EcoCF<CF>> extends EcoInstanceBase {
await this.deployLogic(implArgs);

const input = inputBuilder ? await inputBuilder() : "0x";
await this.inst.upgradeToAndCall!(this.logic, input);
await this.inst.upgradeToAndCall(this.logic, input);
}

async attach(address: AddressLike) {
Expand All @@ -316,7 +316,7 @@ export class EcoUUPS<CF extends EcoCF<CF>> extends EcoInstanceBase {

async load(address?: AddressLike) {
if (address) {
this.attach(address);
await this.attach(address);
} else {
await this.attachFromInfo(await this.importEcoContractInfo());
}
Expand All @@ -336,7 +336,7 @@ export class EcoUUPS<CF extends EcoCF<CF>> extends EcoInstanceBase {
async exportEcoContractInfo() {
this.checkBind();

const contractPaths = filesInDirectory(__dirname + "/../artifacts/contracts/");
const contractPaths = filesInDirectory(process.cwd() + "/artifacts/contracts/");
for (const contractPath of contractPaths) {
const baseName = path.basename(contractPath, ".json");
if (!baseName.startsWith("I") && baseName.endsWith(this.label)) {
Expand Down

0 comments on commit 5d30659

Please sign in to comment.