def get_contract():
    """
    获得交易协约的对象，用于调用pycontractsdk的函数
    :return:
    """
    from pycontractsdk.contracts import Contract
    from oracle.setting import VAR
    provider = VAR['ETH_PROVIDER']
    contract_address = VAR['CONTRACT_ADDRESS']
    abi = VAR['CONTRACT_ABI']
    army_private_key = VAR['ARMY_PRIVATEKEY']
    operator_private_key = VAR['OPERATOR_PRIVATEKEY']
    delegate_private_key = VAR['DELEGATE_PRIVATEKEY']
    contract = Contract(provider=provider, timeout=60, contract_address=
        contract_address, abi=abi, private_key=operator_private_key, gas=
        VAR['GAS'], gas_prise=VAR['GAS_PRISE'])
    return contract
