Optimize Address.functionCall removing redundant isContract check (#3469)

Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
Mikhail Melnik
2022-06-28 04:02:33 +08:00
committed by GitHub
parent e8c60f92e3
commit 6f88199db9
4 changed files with 48 additions and 25 deletions

View File

@ -143,7 +143,7 @@ contract('Address', function (accounts) {
}, []);
await expectRevert(
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall, { gas: '100000' }),
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall, { gas: '120000' }),
'Address: low-level call failed',
);
});
@ -329,7 +329,7 @@ contract('Address', function (accounts) {
}, []);
await expectRevert(
this.mock.functionStaticCall(recipient, abiEncodedCall),
'Address: static call to non-contract',
'Address: call to non-contract',
);
});
});
@ -375,7 +375,7 @@ contract('Address', function (accounts) {
}, []);
await expectRevert(
this.mock.functionDelegateCall(recipient, abiEncodedCall),
'Address: delegate call to non-contract',
'Address: call to non-contract',
);
});
});