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.")
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.")
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.")
def _raise_exception(): raise FallbackNotFound( "No fallback function was found in the contract ABI.")