Contract con_multipletransfert_contract

Disperse Tau


Txn 24h/Total
0
7
Users 24h/Total
0
8
Stamps 24h/Total
0
189

Created On
144 days ago - 10/15/2020, 7:05:11 AM UTC+0


Contract Code
1 import currency
2 S = Hash(default_value='', contract='con_multipletransfert_contract',
3 name='S')
4
5
6 def ():
7 S['name'] = 'Disperse Tau'
8 S['description'] = 'Send Tau easily'
9
10
11 @export('con_multipletransfert_contract')
12 def transferMultipletau(adress_amounts: dict):
13 total_balance_to_Send = 0
14 sender = ctx.caller
15 for receiverAdress in adress_amounts:
16 total_balance_to_Send += int(adress_amounts[receiverAdress])
17 assertBalanceEnougth(total_balance_to_Send)
18 for receiverAdress in adress_amounts:
19 price_amount = int(adress_amounts[receiverAdress])
20 currency.transfer_from(amount=price_amount, to=receiverAdress,
21 main_account=ctx.caller)
22
23
24 def assertBalanceEnougth(totalBalance: int):
25 sender = ctx.caller
26 balanceSender = currency.balance_of(sender)
27 assert balanceSender >= totalBalance, 'Transfer amount exceeds available token balance'
28

Byte Code
e300000000000000000000000005000000400000007346000000640064016c005a00650164026403640464058d035a026406640784005a03650464038301650564089c016409640a840483015a066507640b9c01640c640d84045a0864015300290ee9000000004eda00da1e636f6e5f6d756c7469706c657472616e73666572745f636f6e7472616374da01532903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d6563000000000000000000000000030000004300000073140000006401740064023c006403740064043c006400530029054e7a0c44697370657273652054617572070000007a0f53656e642054617520656173696c79da0b6465736372697074696f6e2901da035f5f53a900720a000000720a0000007202000000da045f5f5f5f06000000730400000000010801720b0000002901da0e6164726573735f616d6f756e7473630100000000000000050000000600000043000000736000000064017d0174006a017d02781c7c0044005d147d037c0174027c007c031900830137007d017110570074037c0183010100782a7c0044005d227d0374027c007c03190083017d0474046a057c047c0374006a0164028d030100713657006400530029034e72010000002903da06616d6f756e74da02746fda0c6d61696e5f6163636f756e742906da03637478da0663616c6c6572da03696e74da165f5f61737365727442616c616e6365456e6f75677468da0863757272656e6379da0d7472616e736665725f66726f6d2905720c000000da15746f74616c5f62616c616e63655f746f5f53656e64da0673656e646572da0e7265636569766572416472657373da0c70726963655f616d6f756e74720a000000720a0000007202000000da137472616e736665724d756c7469706c657461750b00000073120000000002040106010a01140108010a010c010801721a0000002901da0c746f74616c42616c616e6365630100000000000000030000000200000043000000732400000074006a017d0174026a037c0183017d027c027c006b05732074046401830182016400530029024e7a2f5472616e7366657220616d6f756e74206578636565647320617661696c61626c6520746f6b656e2062616c616e63652905721000000072110000007214000000da0a62616c616e63655f6f66da0e417373657274696f6e4572726f722903721b0000007217000000da0d62616c616e636553656e646572720a000000720a00000072020000007213000000180000007306000000000106010a01721300000029097214000000da04486173687209000000720b000000da085f5f6578706f7274da0464696374721a00000072120000007213000000720a000000720a000000720a0000007202000000da083c6d6f64756c653e01000000730c00000008010601080308050601100c
Twitter @tauhq_com