MoCVendors

View Source: contracts/MoCVendors.sol

↗ Extends: MoCVendorsEvents, MoCBase, MoCLibConnection, Governed, IMoCVendors

MoCVendors - version: 0.1.12

Structs

VendorDetails

struct VendorDetails {
 bool isActive,
 uint256 markup,
 uint256 totalPaidInMoC,
 uint256 staking
}

Contract Members

Constants & Variables

contract IMoC internal moc;

contract IMoCState internal mocState;








VendorRegistered

Parameters

Name
Type
Description

account

address

markup

uint256

VendorUpdated

Parameters

Name
Type
Description

account

address

markup

uint256

VendorUnregistered

Parameters

Name
Type
Description

account

address

VendorStakeAdded

Parameters

Name
Type
Description

account

address

staking

uint256

VendorStakeRemoved

Parameters

Name
Type
Description

account

address

staking

uint256

TotalPaidInMoCReset

Parameters

Name
Type
Description

account

address

VendorGuardianAddressChanged

Parameters

Name
Type
Description

vendorGuardianAddress

address

VendorReceivedMarkup

Parameters

Name
Type
Description

vendorAdress

address

paidMoC

uint256

paidRBTC

uint256

Modifiers

onlyActiveVendor

Checks if vendor (msg.sender) is active

Arguments

onlyVendorGuardian

Checks if address is allowed to call function

Arguments

Functions

initialize

Initializes the contract

Arguments

Name
Type
Description

connectorAddress

address

MoCConnector contract address

_governor

address

Governor contract address

_vendorGuardianAddress

address

Address which will be authorized to register and unregister vendors.

getVendorsCount

Gets the count of active registered vendors

Returns

Amount of active registered vendors

Arguments

registerVendor

Allows to register a vendor

Returns

true if vendor was registered successfully; otherwise false

Arguments

Name
Type
Description

account

address

Vendor address

markup

uint256

Markup which vendor will perceive from mint/redeem operations

unregisterVendor

Allows to unregister a vendor

Returns

false if vendor was unregistered successfully; otherwise false

Arguments

Name
Type
Description

account

address

Vendor address

addStake

Allows an active vendor (msg.sender) to add staking

Arguments

Name
Type
Description

staking

uint256

Staking the vendor wants to add

removeStake

Allows an active vendor (msg.sender) to remove staking

Arguments

Name
Type
Description

staking

uint256

Staking the vendor wants to remove

updatePaidMarkup

⤾ overrides IMoCVendors.updatePaidMarkup

Allows to update paid markup to vendor

Arguments

Name
Type
Description

account

address

Vendor address

mocAmount

uint256

paid markup in MoC

rbtcAmount

uint256

paid markup in RBTC

getIsActive

⤾ overrides IMoCVendors.getIsActive

Gets if a vendor is active

Returns

true if vendor is active; false otherwise

Arguments

Name
Type
Description

account

address

Vendor address

getMarkup

⤾ overrides IMoCVendors.getMarkup

Gets vendor markup

Returns

Vendor markup

Arguments

Name
Type
Description

account

address

Vendor address

getTotalPaidInMoC

⤾ overrides IMoCVendors.getTotalPaidInMoC

Gets vendor total paid in MoC

Returns

Vendor total paid in MoC

Arguments

Name
Type
Description

account

address

Vendor address

getStaking

⤾ overrides IMoCVendors.getStaking

Gets vendor staking

Returns

Vendor staking

Arguments

Name
Type
Description

account

address

Vendor address

resetTotalPaidInMoC

⤾ overrides IMoCVendors.resetTotalPaidInMoC

Allows to reset all active vendor's total paid in MoC during settlement

Arguments

getVendorGuardianAddress

Returns the address is authorized to register and unregister vendors.

Arguments

setVendorGuardianAddress

Sets the address which will be authorized to register and unregister vendors.

Arguments

Name
Type
Description

_vendorGuardianAddress

address

Address which will be authorized to register and unregister vendors.

initializeContracts

Arguments

initializeValues

Arguments

Name
Type
Description

_governor

address

_vendorGuardianAddress

address

setVendorGuardianAddressInternal

Sets the address which will be authorized to register and unregister vendors.

Arguments

Name
Type
Description

_vendorGuardianAddress

address

Address which will be authorized to register and unregister vendors.

Last updated