Fix: Do use actual ABI signatures for events also in libraries instead of internal signature.

This commit is contained in:
chriseth 2019-02-19 17:35:38 +01:00
parent b14d22d11e
commit fb07462d82
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Bugfixes:
* ABIEncoderV2: Fix internal error related to bare delegatecall.
* ABIEncoderV2: Fix internal error related to ecrecover.
* ABIEncoderV2: Fix internal error related to mappings as library parameters.
* ABIEncoderV2: Fix invalid signature for events containing structs emitted in libraries.
* Inline Assembly: Proper error message for missing variables.
* SMTChecker: Fixed crash when used with fixed-sized arrays.
* Yul: Properly detect name clashes with functions before their declaration.

View File

@ -3062,7 +3062,8 @@ string FunctionType::externalSignature() const
solAssert(false, "Invalid function type for requesting external signature.");
}
bool const inLibrary = dynamic_cast<ContractDefinition const&>(*m_declaration->scope()).isLibrary();
// "inLibrary" is only relevant if this is not an event.
bool const inLibrary = kind() != Kind::Event && dynamic_cast<ContractDefinition const&>(*m_declaration->scope()).isLibrary();
FunctionTypePointer external = interfaceFunctionType();
solAssert(!!external, "External function type requested.");
auto parameterTypes = external->parameterTypes();