public async Task SendOneHundredTokensFromUserMarginToMargin() { ContractCall contractCall = new ContractCall(opts); var result = await contractCall.TransferMargin(RopstenAccount.Chris, RopstenAccount.Chris, 100, (int)MarginMove.BalanceToMargin, opts.GasAmount); var result2 = await contractCall.TransferMargin(RopstenAccount.Chris, RopstenAccount.Mark, 50, (int)MarginMove.MarginToMargin, opts.GasAmount); var balance = await contractCall.GetUserMarginBalanceAsync(RopstenAccount.Chris); var balance2 = await contractCall.GetUserMarginBalanceAsync(RopstenAccount.Mark); Assert.True(balance == 50); Assert.True(balance2 == 50); }
public async Task RetrieveUserAccountMarginBalance() { string user = "******"; ContractCall contractCall = new ContractCall(opts); var result = await contractCall.GetUserMarginBalanceAsync(user); Assert.True(result > 0); }
public async Task SendOneHundredTokensFromUserMarginToBalance() { ContractCall contractCall = new ContractCall(opts); var result = await contractCall.TransferMargin(RopstenAccount.Chris, RopstenAccount.Chris, 100, (int)MarginMove.MarginToBalance, opts.GasAmount); var swayBal = await contractCall.GetUserBalanceAsync(RopstenAccount.Chris); var balance = await contractCall.GetUserMarginBalanceAsync(RopstenAccount.Chris); Assert.True(swayBal == 1000); Assert.True(balance == 0); }