Created
December 9, 2020 11:43
-
-
Save xeroc/01c680fe60bea80bde5e0c3ebccab723 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from getpass import getpass | |
from pprint import pprint | |
from bitshares import BitShares | |
from bitshares.account import Account | |
from bitshares.amount import Amount | |
from bitsharesbase import operations | |
bitshares = BitShares("wss://eu.nodes.bitshares.ws") | |
bitshares.wallet.unlock(getpass()) | |
ops = list() | |
from_account = Account("xeroc") | |
to_account = Account("init0") | |
amount = Amount(1000000, "BTS") | |
ops.append( | |
operations.Transfer( | |
**{ | |
"fee": {"amount": 0, "asset_id": "1.3.0"}, | |
"from": from_account["id"], | |
"to": to_account["id"], | |
"amount": amount.json(), | |
} | |
) | |
) | |
ops.append( | |
operations.Transfer( | |
**{ | |
"fee": {"amount": 0, "asset_id": "1.3.0"}, | |
"from": from_account["id"], | |
"to": to_account["id"], | |
"amount": amount.json(), | |
} | |
) | |
) | |
ops.append( | |
operations.Transfer( | |
**{ | |
"fee": {"amount": 0, "asset_id": "1.3.0"}, | |
"from": from_account["id"], | |
"to": to_account["id"], | |
"amount": amount.json(), | |
} | |
) | |
) | |
ops.append( | |
operations.Transfer( | |
**{ | |
"fee": {"amount": 0, "asset_id": "1.3.0"}, | |
"from": from_account["id"], | |
"to": to_account["id"], | |
"amount": amount.json(), | |
} | |
) | |
) | |
pprint(bitshares.finalizeOp(ops, from_account, "active")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment