Skip to content

Commit

Permalink
tests: mint multiple tokens to an address (#1779)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar authored Feb 24, 2023
1 parent 9a9cbb5 commit 2f16f83
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/functional/feature_consortium.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def run_test(self):

symbolBTC = "BTC"
symbolDOGE = "DOGE"
symbolLTC = "LTC"

self.nodes[0].createtoken({
"symbol": symbolBTC,
Expand Down Expand Up @@ -604,6 +605,21 @@ def run_test(self):
self.nodes[0].generate(1)
assert_equal(self.nodes[0].getaccount(newAddress), ['2.00000000@BTC'])

# Create another token
self.nodes[0].createtoken({
"symbol": symbolLTC,
"name": symbolLTC,
"isDAT": True,
"collateralAddress": account0
})
self.nodes[0].generate(1)

# Mint multiple tokens to an address
newAddress = self.nodes[0].getnewaddress("", "legacy")
self.nodes[0].minttokens({"amounts": ["2@" + symbolBTC, "2@" + symbolDOGE, '2@' + symbolLTC], "to": newAddress})
self.nodes[0].generate(1)
assert_equal(self.nodes[0].getaccount(newAddress), ['2.00000000@' + symbolBTC, '2.00000000@' + symbolDOGE, '2.00000000@' + symbolLTC])

assert_raises_rpc_error(-5, "recipient (NOTANADDRESS) does not refer to any valid address",
self.nodes[0].minttokens, {"amounts": ["2@" + symbolBTC], "to": "NOTANADDRESS"})

Expand Down

0 comments on commit 2f16f83

Please sign in to comment.