Address review comments and regenerate contract-wrappers
This commit is contained in:
@@ -130,12 +130,9 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
txDefaults
|
||||
);
|
||||
const bytecode = linkLibrariesInBytecode(
|
||||
artifact.compilerOutput.evm.bytecode,
|
||||
artifact,
|
||||
libraryAddresses,
|
||||
);
|
||||
if (!hexUtils.isHex(bytecode)) {
|
||||
throw new Error(`Bytecode for "${artifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly, {{> params inputs=ctor.inputs}});
|
||||
}
|
||||
|
||||
@@ -236,12 +233,9 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
);
|
||||
// Deploy this library.
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(
|
||||
libraryArtifact.compilerOutput.evm.bytecode,
|
||||
libraryArtifact,
|
||||
libraryAddresses,
|
||||
);
|
||||
if (!hexUtils.isHex(linkedLibraryBytecode)) {
|
||||
throw new Error(`Bytecode for library "${libraryArtifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
|
||||
{
|
||||
data: linkedLibraryBytecode,
|
||||
|
||||
@@ -119,10 +119,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
new Web3Wrapper(provider),
|
||||
txDefaults,
|
||||
);
|
||||
const bytecode = linkLibrariesInBytecode(artifact.compilerOutput.evm.bytecode, libraryAddresses);
|
||||
if (!hexUtils.isHex(bytecode)) {
|
||||
throw new Error(`Bytecode for "${artifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const bytecode = linkLibrariesInBytecode(artifact, libraryAddresses);
|
||||
return AbiGenDummyContract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly);
|
||||
}
|
||||
|
||||
@@ -933,13 +930,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
libraryAddresses,
|
||||
);
|
||||
// Deploy this library.
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(
|
||||
libraryArtifact.compilerOutput.evm.bytecode,
|
||||
libraryAddresses,
|
||||
);
|
||||
if (!hexUtils.isHex(linkedLibraryBytecode)) {
|
||||
throw new Error(`Bytecode for library "${libraryArtifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(libraryArtifact, libraryAddresses);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
|
||||
{
|
||||
data: linkedLibraryBytecode,
|
||||
|
||||
@@ -98,10 +98,7 @@ export class LibDummyContract extends BaseContract {
|
||||
new Web3Wrapper(provider),
|
||||
txDefaults,
|
||||
);
|
||||
const bytecode = linkLibrariesInBytecode(artifact.compilerOutput.evm.bytecode, libraryAddresses);
|
||||
if (!hexUtils.isHex(bytecode)) {
|
||||
throw new Error(`Bytecode for "${artifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const bytecode = linkLibrariesInBytecode(artifact, libraryAddresses);
|
||||
return LibDummyContract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly);
|
||||
}
|
||||
|
||||
@@ -180,13 +177,7 @@ export class LibDummyContract extends BaseContract {
|
||||
libraryAddresses,
|
||||
);
|
||||
// Deploy this library.
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(
|
||||
libraryArtifact.compilerOutput.evm.bytecode,
|
||||
libraryAddresses,
|
||||
);
|
||||
if (!hexUtils.isHex(linkedLibraryBytecode)) {
|
||||
throw new Error(`Bytecode for library "${libraryArtifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(libraryArtifact, libraryAddresses);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
|
||||
{
|
||||
data: linkedLibraryBytecode,
|
||||
|
||||
@@ -99,10 +99,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
new Web3Wrapper(provider),
|
||||
txDefaults,
|
||||
);
|
||||
const bytecode = linkLibrariesInBytecode(artifact.compilerOutput.evm.bytecode, libraryAddresses);
|
||||
if (!hexUtils.isHex(bytecode)) {
|
||||
throw new Error(`Bytecode for "${artifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const bytecode = linkLibrariesInBytecode(artifact, libraryAddresses);
|
||||
return TestLibDummyContract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly);
|
||||
}
|
||||
|
||||
@@ -220,13 +217,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
libraryAddresses,
|
||||
);
|
||||
// Deploy this library.
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(
|
||||
libraryArtifact.compilerOutput.evm.bytecode,
|
||||
libraryAddresses,
|
||||
);
|
||||
if (!hexUtils.isHex(linkedLibraryBytecode)) {
|
||||
throw new Error(`Bytecode for library "${libraryArtifact.contractName}" was not fully linked.`);
|
||||
}
|
||||
const linkedLibraryBytecode = linkLibrariesInBytecode(libraryArtifact, libraryAddresses);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToContractTxDataAsync(
|
||||
{
|
||||
data: linkedLibraryBytecode,
|
||||
|
||||
Reference in New Issue
Block a user