-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIPaymentProcessor.sol
73 lines (67 loc) · 2.32 KB
/
IPaymentProcessor.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.7;
/**
* SC for handling payments outside of the marketplace SC.
*
* Provides flexibility for handling new payment methods in future.
* Handles payments now in BNB, ADA, ETH & StableCoins.
*
* All prices are handles as 8-decimal irrespective of oracle source.
*/
interface IPaymentProcessor {
/**
* @dev sets the address of the oracle for the token ticker for the first time.
*
* Requirements:
* `_oracleAddress` is the chainlink oracle address for price.
* `_ticker` is the TICKER for the asset. Eg., BTC for Bitcoin.
*/
function setOracle(address _oracleAddress, string memory _ticker)
external
returns (bool);
/**
* @dev sets the address of the contract for token ticker.
*
* Requirements:
* `_ticker` is the TICKER of the asset.
* `_contractAddress` is the address of the token smart contract.
* `_contractAddress` should follow BEP20/ERC20 standards.
*
* @return bool representing the status of the transaction.
*/
function setContract(address _contractAddress, string memory _ticker)
external
returns (bool);
/**
* @dev replace the address of the oracle for the token ticker.
*
* Requirements:
* `_newOracle` is the chainlink oracle address for price.
* `_ticker` is the TICKER for the asset. Eg., BTC for Bitcoin.
*/
function replaceOracle(address _newOracle, string memory _ticker)
external
returns (bool);
/**
* @dev replaces the address of an existing contract for token ticker.
*
* Requirements:
* `_ticker` is the TICKER of the asset.
* `_contractAddress` is the address of the token smart contract.
* `_contractAddress` should follow BEP20/ERC20 standards.
*
* @return bool representing the status of the transaction.
*/
function replaceContract(address _newAddress, string memory _ticker)
external
returns (bool);
/**
* @dev marks a specific asset as stablecoin.
*
* Requirements:
* `_ticker` - TICKER of the token that's contract address is already configured.
*
* @return bool representing the status of the transaction.
*/
function markAsStablecoin(string memory _ticker) external returns (bool);
}