2
0
mirror of synced 2025-02-23 19:48:28 +00:00

Update CLI to use new Fragment.format style.

This commit is contained in:
Richard Moore 2019-07-20 20:03:50 -03:00
parent a05027c744
commit 9a4119910b
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
2 changed files with 3 additions and 3 deletions

View File

@ -634,7 +634,7 @@ class CompilePlugin extends Plugin {
output[contract.name] = {
bytecode: contract.bytecode,
runtime: contract.runtime,
interface: contract.interface.fragments.map((f) => f.format(true))
interface: contract.interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full))
};
});
@ -715,7 +715,7 @@ class DeployPlugin extends Plugin {
Contract: codes[0].name,
Address: contract.address,
Bytecode: codes[0].bytecode,
Interface: codes[0].interface.fragments.map((f) => f.format(true))
Interface: codes[0].interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full))
});
}
}

View File

@ -115,7 +115,7 @@ export function generate(contract: ContractCode, bytecode?: string): string {
lines.push(" static ABI(): Array<string> {");
lines.push(" return [");
contract.interface.fragments.forEach((fragment) => {
lines.push(` "${fragment.format(true)}",`);
lines.push(` "${fragment.format(ethers.utils.FormatTypes.full)}",`);
});
lines.push(" ];");
lines.push(" }");