Skip to content

Commit

Permalink
[stylebot] Fixes for code style
Browse files Browse the repository at this point in the history
  • Loading branch information
robotoer authored and github-actions[bot] committed Oct 25, 2024
1 parent f6a0491 commit f678a58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/compat/waffle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ class Stub<T extends AbiFunction> implements StubInterface {
if (!this.func.outputs)
this.err("Cannot mock return values from a void function");

if (this.func.stateMutability === "pure" || this.func.stateMutability === "view") {
if (
this.func.stateMutability === "pure" ||
this.func.stateMutability === "view"
) {
this.calls.push({
kind: "read",
abi: this.func,
Expand Down
12 changes: 7 additions & 5 deletions src/mock-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ export const deployMock = async (
}
case "write": {
const fnSigHash = calculateFnSigHash(call);
const encodedOutputs = call.outputs ? encodeFunctionResult({
abi: [call.abi as AbiFunction],
functionName: call.abi.name,
result: call.outputs,
}) : "0x";
const encodedOutputs = call.outputs
? encodeFunctionResult({
abi: [call.abi as AbiFunction],
functionName: call.abi.name,
result: call.outputs,
})
: "0x";
// Use a mock function to return the expected return value
if (firstCall) {
await signer.writeContract({
Expand Down

0 comments on commit f678a58

Please sign in to comment.