Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
4 changes: 4 additions & 0 deletions mm2src/coins/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,13 @@ pub const ERC20_ABI: &str = include_str!("eth/erc20_abi.json");
const ERC721_ABI: &str = include_str!("eth/erc721_abi.json");
/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md
const ERC1155_ABI: &str = include_str!("eth/erc1155_abi.json");
/// https://github.com/KomodoPlatform/etomic-swap/blob/7d4eafd4a408188a95aee78a41f0bf5f9116ffa2/contracts/EtomicSwapNft.sol
const NFT_SWAP_CONTRACT_ABI: &str = include_str!("eth/nft_swap_contract_abi.json");
/// https://github.com/KomodoPlatform/etomic-swap/blob/7d4eafd4a408188a95aee78a41f0bf5f9116ffa2/contracts/EtomicSwapMakerNftV2.sol
const NFT_MAKER_SWAP_V2_ABI: &str = include_str!("eth/nft_maker_swap_v2_abi.json");
/// https://github.com/KomodoPlatform/etomic-swap/blob/7d4eafd4a408188a95aee78a41f0bf5f9116ffa2/contracts/EtomicSwapMakerV2.sol
const MAKER_SWAP_V2_ABI: &str = include_str!("eth/maker_swap_v2_abi.json");
/// https://github.com/KomodoPlatform/etomic-swap/blob/7d4eafd4a408188a95aee78a41f0bf5f9116ffa2/contracts/EtomicSwapTakerV2.sol
const TAKER_SWAP_V2_ABI: &str = include_str!("eth/taker_swap_v2_abi.json");

/// Payment states from etomic swap smart contract: https://github.com/artemii235/etomic-swap/blob/master/contracts/EtomicSwap.sol#L5
Expand Down
285 changes: 284 additions & 1 deletion mm2src/coins/eth/maker_swap_v2_abi.json
Original file line number Diff line number Diff line change
@@ -1 +1,284 @@
[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"MakerPaymentRefundedSecret","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"MakerPaymentRefundedTimelock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"MakerPaymentSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"MakerPaymentSpent","type":"event"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"bytes32","name":"takerSecretHash","type":"bytes32"},{"internalType":"bytes32","name":"makerSecretHash","type":"bytes32"},{"internalType":"uint32","name":"paymentLockTime","type":"uint32"}],"name":"erc20MakerPayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"bytes32","name":"takerSecretHash","type":"bytes32"},{"internalType":"bytes32","name":"makerSecretHash","type":"bytes32"},{"internalType":"uint32","name":"paymentLockTime","type":"uint32"}],"name":"ethMakerPayment","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"makerPayments","outputs":[{"internalType":"bytes20","name":"paymentHash","type":"bytes20"},{"internalType":"uint32","name":"paymentLockTime","type":"uint32"},{"internalType":"enum EtomicSwapMakerV2.MakerPaymentState","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"bytes32","name":"takerSecret","type":"bytes32"},{"internalType":"bytes32","name":"makerSecretHash","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"refundMakerPaymentSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"bytes32","name":"takerSecretHash","type":"bytes32"},{"internalType":"bytes32","name":"makerSecretHash","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"refundMakerPaymentTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"bytes32","name":"takerSecretHash","type":"bytes32"},{"internalType":"bytes32","name":"makerSecret","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"spendMakerPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}]
[
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
}
],
"name": "MakerPaymentRefundedSecret",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
}
],
"name": "MakerPaymentRefundedTimelock",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
}
],
"name": "MakerPaymentSent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
}
],
"name": "MakerPaymentSpent",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "bytes32",
"name": "takerSecretHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "makerSecretHash",
"type": "bytes32"
},
{
"internalType": "uint32",
"name": "paymentLockTime",
"type": "uint32"
}
],
"name": "erc20MakerPayment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "bytes32",
"name": "takerSecretHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "makerSecretHash",
"type": "bytes32"
},
{
"internalType": "uint32",
"name": "paymentLockTime",
"type": "uint32"
}
],
"name": "ethMakerPayment",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "makerPayments",
"outputs": [
{
"internalType": "bytes20",
"name": "paymentHash",
"type": "bytes20"
},
{
"internalType": "uint32",
"name": "paymentLockTime",
"type": "uint32"
},
{
"internalType": "enum EtomicSwapMakerV2.MakerPaymentState",
"name": "state",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "bytes32",
"name": "takerSecret",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "makerSecretHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
}
],
"name": "refundMakerPaymentSecret",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "bytes32",
"name": "takerSecretHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "makerSecretHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
}
],
"name": "refundMakerPaymentTimelock",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "maker",
"type": "address"
},
{
"internalType": "bytes32",
"name": "takerSecretHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "makerSecret",
"type": "bytes32"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
}
],
"name": "spendMakerPayment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading
Loading