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/import_tx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugin/evm/import_tx.go') diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go index 1ec394c..d6b4b7d 100644 --- a/plugin/evm/import_tx.go +++ b/plugin/evm/import_tx.go @@ -270,12 +270,13 @@ func (vm *VM) newImportTx( // accounts accordingly with the imported EVMOutputs func (tx *UnsignedImportTx) EVMStateTransfer(vm *VM, state *state.StateDB) error { for _, to := range tx.Outs { - log.Info("crosschain X->C", "addr", to.Address, "amount", to.Amount) if to.AssetID == vm.ctx.AVAXAssetID { + log.Info("crosschain X->C", "to", to.Address, "amount", to.Amount, "assetID", "AVAX") amount := new(big.Int).Mul( new(big.Int).SetUint64(to.Amount), x2cRate) state.AddBalance(to.Address, amount) } else { + log.Info("crosschain X->C", "to", to.Address, "amount", to.Amount, "assetID", to.AssetID) amount := new(big.Int).SetUint64(to.Amount) state.AddBalanceMultiCoin(to.Address, common.Hash(to.AssetID), amount) } -- cgit v1.2.3