Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/N3/N3ProxyWrapper/ProxyWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.ComponentModel;
using System.Numerics;
using Neo;
using Neo.SmartContract;
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Attributes;
using Neo.SmartContract.Framework.Native;
using Neo.SmartContract.Framework.Services;

Expand All @@ -26,7 +28,7 @@ public class ProxyWrapper : SmartContract
private static readonly StorageMap PauseMap = new StorageMap(Storage.CurrentContext, "pause");

public static event Action<object> notify;
public static event Action<UInt160, UInt160, BigInteger, byte[], BigInteger, BigInteger, object> polyWrapperLock;
public static event Action<UInt160, UInt160, BigInteger, byte[], BigInteger, BigInteger, object> PolyWrapperLock;
public static void _deploy(object data, bool update)
{
OwnerMap.Put("superOwner", superOwner);
Expand Down Expand Up @@ -116,10 +118,10 @@ public static bool Lock(UInt160 fromAsset, UInt160 fromAddress, BigInteger toCha
Assert(Runtime.CheckWitness(fromAddress), "Forbidden");
if (fee != 0)
{
Contract.Call(fromAsset, "transfer", CallFlags.All, fromAddress, Runtime.ExecutingScriptHash, fee, null);
GAS.Transfer(fromAddress, Runtime.ExecutingScriptHash, fee, null);
}
Contract.Call(Proxy(), "lock", CallFlags.All, fromAsset, fromAddress, toChainId, toAddress, amount - fee);
polyWrapperLock(fromAsset, fromAddress, toChainId, toAddress, amount - fee, fee, id);
Contract.Call(Proxy(), "lock", CallFlags.All, fromAsset, fromAddress, toChainId, toAddress, amount);
polyWrapperLock(fromAsset, fromAddress, toChainId, toAddress, amount, fee, id);
return true;
}

Expand Down