Exemplo n.º 1
0
def get_fallback_func_abi(contract_abi: ABI) -> ABIFunction:
    fallback_abis = filter_by_type('fallback', contract_abi)
    if fallback_abis:
        return cast(ABIFunction, fallback_abis[0])
    else:
        raise FallbackNotFound(
            "No fallback function was found in the contract ABI.")
Exemplo n.º 2
0
def get_fallback_func_abi(contract_abi):
    fallback_abis = filter_by_type('fallback', contract_abi)
    if fallback_abis:
        return fallback_abis[0]
    else:
        raise FallbackNotFound(
            "No fallback function was found in the contract ABI.")
Exemplo n.º 3
0
def get_receive_func_abi(contract_abi: ABI) -> ABIFunction:
    receive_abis = filter_by_type('receive', contract_abi)
    if receive_abis:
        return cast(ABIFunction, receive_abis[0])
    else:
        raise FallbackNotFound(
            "No receive function was found in the contract ABI.")
Exemplo n.º 4
0
 def _raise_exception():
     raise FallbackNotFound(
         "No fallback function was found in the contract ABI.")