RWA Technical
CrossChainMigrator
Key Methods
All migrate methods contain an extra parameter, `_airdropData`. This argument is used in the event the migrator wants to receive an airdrop of native ETH on the destination chain. For more info on how to use this param: https://layerzero.gitbook.io/docs/evm-guides/advanced/relayer-adapter-parameters
msg.value for each migrate method must not be 0. It is used to specify (and pay) an amount of gas for consumption on the destination chain. You can get a gas quote from `endpoint::estimateFees()`.
migrateNFT
Used to migrate a single PassiveIncome NFT from Polygon to Real chain. This method will take a user's PI NFT specified and send a message to the Polygon LayerZero endpoint to be later passed to the destination chain.
migrateNFTBatch
This method is used to migrate a batch of PassiveIncome NFTs from Polygon to Real chain. This method will take a user's PI NFTs specified and send a message to the Polygon LayerZero endpoint to be later passed to the destination chain for a batch migration.
migrateTokens
This method is used to migrate TNGBL tokens from Polygon to RWA on Real chain. This method will burn TNGBL tokens from the migrator then send a mintFor message to the RWA contract on Real chain.
RealReceiver
Key Methods
lzReceive
LayerZero endpoint will invoke this function to deliver the message on the destination.
RevenueDistributor
Key Methods
convertRewardToken
Converts a specific revenue token to ETH and distributes it to the revenue stream.
convertRewardTokenBatch
Converts a batch of revenue tokens to ETH and distribute to the revenue stream.
addRevenueToken
This method is used to add a new supported revenue token.
removeRevenueToken
This method is used to remove an existing revenue token.
setSelectorForTarget
This method sets the verified function call for a `_target`.
Calldata cannot be used in conversion calls unless it’s added here.
distributeStreamETH
This method distributes an ETH revenue stream to the RevenueStreamETH contract.
RevenueStreamETH
Key Methods
depositETH
This method is used to deposit ETH into the contract to be claimed by shareholders.
claimETH
This method allows eligible VE shareholders to claim their ETH revenue rewards by account.
claimable
View method that returns an amount of ETH revenue that is claimable, given a specific `account`.
claimWithSignature
This method allows a user to perform a claim with data that has been verified via a signature from the dedicated signer
address.
How is the signature
generated?
The arguments given to the claimWithSignature
function must be verified and signed by our designated signer wallet before that data can be passed into the method. When a claim is initiated by a user, the function params are first obtained via the claimable
method and lastClaimIndex
. This data is then signed by our node and passed back to the application so the user can complete the claim with the verified arguments.
RWAVotingEscrow
Key Methods
mint
Mints a new VotingEscrow token representing a locked token position. The minting process locks a specified amount of tokens for a given vesting duration, assigning voting power accordingly.
migrate
This method is called by the RealReceiverNFT contract to fulfill the cross-chain migration from 3,3+ to veRWA.
migrateBatch
This method is called by the RealReceiverNFT contract to fulfill the cross-chain migration of a batch of 3,3+ NFTs to veRWA NFTs.
burn
Burns a VotingEscrow token, releasing the locked tokens to the specified receiver. The burning process can only be done once the vesting duration has finished.
If the lock duration remaining on lock is not 0, a penalty will be applied to the release of locked tokens.
merge
Merges two VotingEscrow tokens into one, combining their locked balances and vesting durations. The merge process adjusts the voting power based on the new combined balance and vesting duration.
split
Splits a VotingEscrow token into multiple tokens based on specified shares. The split process divides the locked balance and retains the original vesting duration for each new token.
getPastTotalVotingPower
Returns the most recent checkpoint (given a timestamp) for total voting power.
getPastVotingPower
Returns the most recent voting power checkpoint (given a timestamp) for a specific tokenId.
VotingEscrowVesting
Key Methods
deposit
Deposits a VotingEscrow token to start it's vesting schedule. The function records the vesting schedule, removes the token's voting power, and transfers the token to this contract for vesting.
withdraw
Withdraws a VotingEscrow token back to the depositor after the vesting period. The function restores the remaining vesting duration and transfers the token back to the depositor.
claim
Claims the underlying locked tokens of a vested VotingEscrow token, effectively burning the VotingEscrow token. The function can only be called once the vesting period has completed.
If the remaining lock duration was not 0, will apply the early-burn penalty.
DelegateFactory
Key Methods
deployDelegator
This method allows a permissioned address to create a delegator contract.
revokeExpiredDelegators
This method is used to fetch any expired Delegators, withdraw the delegated token from the Delegator, and delete its instance from the factory contract.
expiredDelegatorExists
This view method is used to fetch whether there exists any expired delegators.
Delegator
Key Methods
depositDelegatorToken
This method is used to deposit a delegated veRWA NFT into this contract.
withdrawDelegatedToken
This method is used to transfer the `delegatedToken` back to the `creator`.
Last updated