Onyx Protocol
Search
⌃K

Claim XCN

Every Onyx user accrues XCN for each block they are supplying to or borrowing from the protocol. Users may call the Comptroller's claimXcn method at any time to transfer XCN accrued to their address.
Comptroller
// Claim all the XCN accrued by holder in all markets
function claimXcn(address holder) public
​
// Claim all the XCN accrued by holder in specific markets
function claimXcn(address holder, OToken[] memory oTokens) public
​
// Claim all the XCN accrued by specific holders in specific markets for their supplies and/or borrows
function claimXcn(address[] memory holders, OToken[] memory oTokens, bool borrowers, bool suppliers) public
Solidity
Comptroller troll = Comptroller(0xABCD...);
troll.claimXcn(0x1234...);
Web3 1.2.6
const comptroller = new web3.eth.Contract(comptrollerAbi, comptrollerAddress);
await comptroller.methods.claimXcn("0x1234...").send({ from: sender });