From e316a1e0868b26cf3b102b0790d07b52ecb9e06f Mon Sep 17 00:00:00 2001 From: solidoracle <105349716+solidoracle@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:41:34 +0700 Subject: [PATCH] update swap contract (#66) --- bulla-contracts/abis/BullaSwap.json | 150 +++++++++++++++++++--------- bulla-contracts/config/sepolia.json | 2 +- 2 files changed, 104 insertions(+), 48 deletions(-) diff --git a/bulla-contracts/abis/BullaSwap.json b/bulla-contracts/abis/BullaSwap.json index 2ebb307..1b05592 100644 --- a/bulla-contracts/abis/BullaSwap.json +++ b/bulla-contracts/abis/BullaSwap.json @@ -122,6 +122,73 @@ "name": "OrderCreated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "signerWallet", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "address", + "name": "signerWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "signerToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "signerAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "senderWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "senderToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "senderAmount", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IBullaSwap.OrderERC20", + "name": "order", + "type": "tuple" + } + ], + "name": "OrderDeleted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -283,11 +350,6 @@ "inputs": [ { "components": [ - { - "internalType": "uint256", - "name": "orderId", - "type": "uint256" - }, { "internalType": "uint256", "name": "expiry", @@ -324,8 +386,8 @@ "type": "uint256" } ], - "internalType": "struct IBullaSwap.OrderERC20", - "name": "order", + "internalType": "struct IBullaSwap.CreateOrderParams", + "name": "params", "type": "tuple" } ], @@ -340,6 +402,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + } + ], + "name": "deleteOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -366,20 +441,33 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "name": "orderExecuted", + "name": "ownershipHandoverExpiresAt", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "result", + "type": "uint256" } ], "stateMutability": "view", @@ -393,7 +481,7 @@ "type": "uint256" } ], - "name": "orders", + "name": "pendingOrders", "outputs": [ { "internalType": "uint256", @@ -439,38 +527,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "result", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pendingOwner", - "type": "address" - } - ], - "name": "ownershipHandoverExpiresAt", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "renounceOwnership", diff --git a/bulla-contracts/config/sepolia.json b/bulla-contracts/config/sepolia.json index 981925c..59ce1c5 100644 --- a/bulla-contracts/config/sepolia.json +++ b/bulla-contracts/config/sepolia.json @@ -10,5 +10,5 @@ "instantPayment": { "address": "0x1cD1A83C2965CB7aD55d60551877Eb390e9C3d7A", "startBlock": 5096555 }, "bullaFactoring": { "address": "0x0000000000000000000000000000000000000000", "startBlock": 6631476 }, "bullaFactoringv2": { "address": "0xDF0fCe31285dcAB9124bF763AB9E5466723BeF35", "startBlock": 6812207 }, - "bullaSwap": { "address": "0xdf30BE5964a7E26b49551a430e85B51148A7b95E", "startBlock": 6982025 } + "bullaSwap": { "address": "0x8bE513f12DA334273e30b0eC30c1b5e9fE3c6daD", "startBlock": 7059406 } }