Skip to content

Commit

Permalink
Goldsky config
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Dec 11, 2023
1 parent 64d877d commit 9c5b1e1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions omnichain/swap/contracts/Swap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ contract Swap is zContract {
error WrongGasContract();
error NotEnoughToPayGasFee();

// Define the SwapCompleted event
event SwapCompleted(
address indexed zrc20,
address indexed targetToken,
uint256 amount,
bytes recipient
);

constructor(address systemContractAddress) {
systemContract = SystemContract(systemContractAddress);
}
Expand Down Expand Up @@ -68,5 +76,13 @@ contract Swap is zContract {
recipientAddress,
outputAmount - gasFee
);

// Emit the SwapCompleted event
emit SwapCompleted(
zrc20,
targetTokenAddress,
outputAmount,
recipientAddress
);
}
}
20 changes: 20 additions & 0 deletions omnichain/swap/goldsky.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "1",
"name": "swap",
"abis": {
"swap": {
"path": "artifacts/contracts/Swap.sol/Swap.json"
}
},
"chains": [
"zetachain-testnet"
],
"instances": [
{
"abi": "swap",
"address": "0x507D87b4Ce1Afd0C33C3AF2Ff0963d2d29BeE642",
"chain": "zetachain-testnet",
"startBlock": 2773831
}
]
}

0 comments on commit 9c5b1e1

Please sign in to comment.