示例#1
0
文件: abi.py 项目: pratik-vii/web3.py
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.")
示例#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.")
示例#3
0
文件: abi.py 项目: pratik-vii/web3.py
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.")
示例#4
0
 def _raise_exception():
     raise FallbackNotFound(
         "No fallback function was found in the contract ABI.")