Q:

Solidity

// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0 <0.8.0;

contract SimpleAuction {
    function bid() public payable { // Function
        // ...
    }
}

// Helper function defined outside of a contract
function helper(uint x) pure returns (uint) {
    return x * 2;
}
0

New to Communities?

Join the community