From 368844ad2a28ec07848e3c0169cf2b83b579a2e8 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Mon, 23 Nov 2020 20:46:35 -0500 Subject: Add native asset precompiled contracts for apricot release --- plugin/evm/export_tx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugin/evm/export_tx.go') diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index 2735573..2ebfeff 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -240,8 +240,8 @@ func (vm *VM) newExportTx( func (tx *UnsignedExportTx) EVMStateTransfer(vm *VM, state *state.StateDB) error { addrs := map[[20]byte]uint64{} for _, from := range tx.Ins { - log.Info("crosschain C->X", "addr", from.Address, "amount", from.Amount) if from.AssetID == vm.ctx.AVAXAssetID { + log.Info("crosschain C->X", "from", from.Address, "amount", from.Amount, "assetID", "AVAX") amount := new(big.Int).Mul( new(big.Int).SetUint64(from.Amount), x2cRate) if state.GetBalance(from.Address).Cmp(amount) < 0 { @@ -250,6 +250,7 @@ func (tx *UnsignedExportTx) EVMStateTransfer(vm *VM, state *state.StateDB) error state.SubBalance(from.Address, amount) } else { amount := new(big.Int).SetUint64(from.Amount) + log.Info("crosschain C->X", "from", from.Address, "amount", from.Amount, "assetID", from.AssetID) if state.GetBalanceMultiCoin(from.Address, common.Hash(from.AssetID)).Cmp(amount) < 0 { return errInsufficientFunds } -- cgit v1.2.3