Contract con_enviar_1


Contract Code


  
1 @export
2 def tranferir(amount: int, to: str):
3 assert amount > 0, 'Cannot send negative balances!'
4 sender = ctx.caller
5 assert balances[sender] >= amount, 'Not enough coins to send!'
6 balances[sender] -= amount
7 balances[to] += amount
8

Byte Code

e30000000000000000000000000400000040000000731c0000006500640083016501650264019c0264026403840483015a03640453002905da0c636f6e5f656e766961725f312902da06616d6f756e74da02746f630200000000000000030000000400000043000000734e0000007c0064016b047310740064028301820174016a027d0274037c0219007c006b05732a740064038301820174037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029044ee9000000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e64212904da0e417373657274696f6e4572726f72da03637478da0663616c6c6572da0862616c616e636573290372020000007203000000da0673656e646572a900720a000000da00da097472616e666572697201000000730a00000000021001060114011001720c0000004e2904da085f5f6578706f7274da03696e74da03737472720c000000720a000000720a000000720a000000720b000000da083c6d6f64756c653e0100000073020000000601