mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2026-04-30 14:11:04 +02:00
Upgrade signer
This commit is contained in:
@@ -15,6 +15,7 @@ import argparse
|
||||
import logging
|
||||
import time
|
||||
from enum import Enum
|
||||
import uuid
|
||||
|
||||
# third-party imports
|
||||
import web3
|
||||
@@ -88,9 +89,15 @@ def main():
|
||||
f.close()
|
||||
|
||||
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||
tx = c.constructor(args.n, args.s, args.d).buildTransaction
|
||||
uu = str(uuid.uuid4())
|
||||
f = open(os.path.join('txs', uu), 'w')
|
||||
f.write(str(tx()))
|
||||
f.close()
|
||||
logg.info('saved to {}'.format(uu))
|
||||
(tx_hash, rcpt) = helper.sign_and_send(
|
||||
[
|
||||
c.constructor(args.n, args.s, args.d).buildTransaction
|
||||
tx,
|
||||
],
|
||||
force_wait=True,
|
||||
)
|
||||
|
||||
@@ -95,6 +95,7 @@ def main():
|
||||
[
|
||||
c.functions.mint(args.amount).buildTransaction,
|
||||
],
|
||||
force_wait=True,
|
||||
)
|
||||
|
||||
logg.info('mint to {} tx {}'.format(signer_address, tx_hash)) #.hex()))
|
||||
|
||||
Reference in New Issue
Block a user