Skip to main content

Payment Manager

Endemic supports a multi-token payment system and this contract manages which methods are supported by Endemic and provides fees for each of them accordingly.

The endemic team is using this contract to whitelist new ERC-20 tokens for payments, blacklist, or modify fees for supported ones.

Ether payments are supported by default.

New contracts are deployed using the beacon proxy pattern.

Methods

getPaymentMethodFees

function getPaymentMethodFees(address paymentMethodAddress)
external
view
returns (uint256 takerFee, uint256 makerFee)

Returns fees for provided ERC-20 token address. Ether fees are tracked by default zero address (0x0000000000000000000000000000000000000000)

Parameters

NameTypeDescription
paymentMethodAddressaddressERC-20 contract adddress

Returns

NameTypeDescription
takerFeeuint256Percentage of sale that Endemic takes from buyer
makerFeeuint256Percentage of sale that Endemic takes from seller

isPaymentMethodSupported

function isPaymentMethodSupported(address paymentMethodAddress)
external
view
returns (bool)

Returns if provided ERC20 is supported for payments in Endemic Marketplace.

Parameters

NameTypeDescription
paymentMethodAddressaddressERC-20 contract adddress

Returns

TypeDescription
boolBoolean that indicates is ERC-20 token supported

updateSupportedPaymentMethod

function updateSupportedPaymentMethod(
address paymentMethodAddress,
bool isEnabled
) external onlyOwner

Provides ability to dynamicaly whitelist/blacklist specific ERC20 token.

Parameters

NameTypeDescription
paymentMethodAddressaddressERC-20 contract adddress
isEnabledboolBoolean that indicates if provided payment method is supported

updatePaymentMethodFees

function updatePaymentMethodFees(
address paymentMethodAddress,
uint256 makerFee,
uint256 takerFee
) external onlyOwner

It is used to dynamicaly update fees for the provided payment method.

Parameters

NameTypeDescription
paymentMethodAddressaddressERC-20 contract adddress
takerFeeuint256Percentage of sale that Endemic takes from buyer
makerFeeuint256Percentage of sale that Endemic takes from seller