def perform_post_actions(chain, runtime_data: dict, contracts: dict):
    """Make contracts to set up call chains."""

    web3 = chain.web3

    post_actions = runtime_data.get("post_actions")
    if post_actions:
        context = get_post_actions_context(post_actions, runtime_data, contracts, web3)
        post_actions = textwrap.dedent(post_actions)

        print("Performing post-deployment contract actions")
        exec_lines(post_actions, context, print_prefix="Action:")
    else:
        print("No post-deployment actions defined")
示例#2
0
文件: deploy.py 项目: adamssillva/ico
def perform_post_actions(chain, runtime_data: dict, contracts: dict):
    """Make contracts to set up call chains."""

    web3 = chain.web3

    post_actions = runtime_data.get("post_actions")
    if post_actions:
        context = get_post_actions_context(post_actions, runtime_data, contracts, web3)
        post_actions = textwrap.dedent(post_actions)

        print("Performing post-deployment contract actions")
        exec_lines(post_actions, context, print_prefix="Action:")
    else:
        print("No post-deployment actions defined")
示例#3
0
def perform_verify_actions(chain, runtime_data: dict, contracts: dict):
    """Check out deployment was solid."""

    web3 = chain.web3

    verify_actions = runtime_data.get("verify_actions")
    if verify_actions:
        context = get_post_actions_context(verify_actions, runtime_data,
                                           contracts, web3)

        verify_actions = textwrap.dedent(verify_actions)
        print("Performing deployment verification")
        exec_lines(verify_actions, context, print_prefix="Verification:")
    else:
        print("No verify defined")
def perform_verify_actions(chain, runtime_data: dict, contracts: dict):
    """Check out deployment was solid."""

    web3 = chain.web3

    verify_actions = runtime_data.get("verify_actions")
    if verify_actions:
        context = get_post_actions_context(verify_actions, runtime_data, contracts, web3)

        verify_actions = textwrap.dedent(verify_actions)
        print("Performing deployment verification")

        # Allow some time for post_actions to be mined
        time.sleep(60)

        exec_lines(verify_actions, context, print_prefix="Verification:")
    else:
        print("No verify defined")