Exemplo n.º 1
0
def transfercheck(ctx, _acct, _txhash):
    w3 = ctx['web3instance']
    if 'transfercheck' not in ctx['deployedcontracts'][_acct.address].keys():
        try:
            tx_receipt = w3.eth.waitForTransactionReceipt(_txhash, timeout=120)
        except:
            return False
        _from = tx_receipt['from']
        _to = tx_receipt['to']

        if _to != _acct.address:
            return False

        try:
            balance = w3.eth.getBalance(_acct.address)
        except:
            return False

        if balance < MINSTARTBALANCE:
            p.pln(
                p.in_fg_color(
                    "contructor Balance Not Enough, Please Send More ETH...",
                    r.red4))

        update_user_deploy_contracts(ctx, _acct.address, 'transfercheck',
                                     _from)
        return True
    else:
        return True
Exemplo n.º 2
0
def check_if_has_topic(ctx, _acct, montagy_addr):
    acc_nonce = get_acc_nonce(ctx, _acct)
    err, balance = balanceofflagtoken(ctx, montagy_addr, _acct, acc_nonce)

    if err:
        p.pln(p.in_fg_color(str(err), r.red4))

    if balance == TOPIC:
        return True
    else:
        return False
Exemplo n.º 3
0
def register2_review(ctx, _acct, _txhash):
	w3 = ctx['web3instance']
	#p.ppln("[*] Checking for registerCode2 status... ")
	try:
		tx_receipt = w3.eth.waitForTransactionReceipt(_txhash, timeout=720)
	except Exception as err:
		p.ppln(str(err))
		exit(0)
	addr = tx_receipt['transactionHash'].hex()

	if not addr:
		p.pln(p.in_fg_color("[!] registerCode Broken down", r.red5))
	else:
		p.ppln("[+] registerCode " + p.in_fg_color("success", r.green1) + ", transaction hash: " + p.in_fg_color(addr, r.blue1))
def check_if_has_topic(ctx, _acct):
    acc_nonce = get_acc_nonce(ctx, _acct)
    flagtoken_addr = ctx['deployedcontracts'][_acct.address]['flagtoken']
    gamer_account = ctx['deployedcontracts'][_acct.address]['transfercheck']
    err, balance = balanceofflagtoken(ctx, flagtoken_addr, gamer_account,
                                      _acct, acc_nonce)

    if err:
        p.pln(p.in_fg_color(str(err), r.red4))

    if (TOPIC < balance or TOPIC == balance) and balance < ONEHUNDRED:
        return True
    else:
        return False
Exemplo n.º 5
0
def mint_review(ctx, _acct, _txhash):
    w3 = ctx['web3instance']
    p.ppln("[-] Check for mintflagtoken successful... ")
    try:
        tx_receipt = w3.eth.waitForTransactionReceipt(_txhash, timeout=720)
    except Exception as err:
        p.ppln(str(err))
        exit(0)
    addr = tx_receipt['transactionHash'].hex()

    if not addr:
        p.pln(p.in_fg_color("[!] mintflagtoken Broken down", r.red5))
    else:
        p.ppln("[+] mintflagtoken " + p.in_fg_color("success", r.green1))
        p.ppln("[!] mintflagtoken transaction hash is " +
               p.in_fg_color(addr, r.blue1))
Exemplo n.º 6
0
def review(ctx, _acct, _txhash):
    w3 = ctx['web3instance']
    #p.ppln("[*] checking deployment statue... ")
    try:
        tx_receipt = w3.eth.waitForTransactionReceipt(_txhash, timeout=720)
    except Exception as err:
        p.p(str(err))
        exit(0)
    addr = tx_receipt['contractAddress']

    if not addr:
        p.pln(p.in_fg_color("[!] contract montagy deploy Broken down", r.red5))
        exit(0)
    else:
        p.ppln("[+] contract Montagy deploy " +
               p.in_fg_color("success", r.green1) + ", address: " +
               p.in_fg_color(addr, r.blue1))
        return addr
def review(ctx, _acct, _txhash):
    w3 = ctx['web3instance']
    p.ppln("[-] Check for feitoken contract successful deployment... ")
    if 'feitoken' not in ctx['deployedcontracts'][_acct.address].keys():
        try:
            tx_receipt = w3.eth.waitForTransactionReceipt(_txhash, timeout=720)
        except Exception as err:
            p.p(str(err))
            exit(0)
        addr = tx_receipt['contractAddress']
        update_user_deploy_contracts(ctx, _acct.address, 'feitoken', addr)
    else:
        addr = ctx['deployedcontracts'][_acct.address]['feitoken']

    if not addr:
        p.pln(p.in_fg_color("[!] contract feitoken deploy Broken down", r.red5))
    else:
        p.ppln("[+] contract feitoken deploy " + p.in_fg_color("success", r.green1))
        p.ppln("[!] feitoken contract address is " + p.in_fg_color(addr, r.blue1))