Talent Match
This contract can perform tasks of create, update, delete, payout, and confirm for the talent matching system.
gtAddress
treasuryAddress
coachShare
sponsorShare
teacherShare
matchRegistry
admins
xEmitEvent
onlyAdmin
constructor
initialize
Initializer function for contract deployment.
Parameters
_tokenAddr
address
ONGAESHI Token Address.
_coachShare
uint64
Percentage share for the coach.
_sponsorShare
uint64
Percentage share for the sponsor.
_teacherShare
uint64
Percentage share for the teachers.
_emitEventAddr
address
Event emitter contract address.
_treasuryAddress
address
Treasury address to receive token payments.
updateShareScheme
Percentage values have 2 decimal padding, e.g. 2100 = 21%, 300 = 3%. Share total must be 10000, which represents 100%.
addTalentMatch
Adds a new talent match record into the smart contract, caller must be admin wallet.
Parameters
_Id
bytes20
Talent UUID, used as key for smart contract hashmap storage.
_talent
address
Talent wallet address, may be empty if talent wallet is unavailable.
_coach
address
Coach wallet address to receive coach share reward, may be empty if talent did not have a coach.
_sponsor
address
Sponsor wallet to receive sponsor share reward.
_nftAddress
address
Address of ONGAESHI Education NFT loaned and returned to talent.
_tokenId
uint256
NFT ID.
_amount
uint256
Talent matching payment reward amount.
_matchDate
uint256
Date of talent matching.
_payDate
uint256
Expected payment date of talent matching.
updateTalentMatch
Updates existing talent match record, caller must be admin wallet.
Parameters
_Id
bytes20
Talent UUID.
_talent
address
Talent wallet address, may be empty if talent wallet is unavailable.
_coach
address
Coach wallet address to receive coach share reward, may be empty if talent did not have a coach.
_sponsor
address
Sponsor wallet to receive sponsor share reward.
_nftAddress
address
Address of ONGAESHI Education NFT loaned and returned to talent.
_tokenId
uint256
NFT ID.
_amount
uint256
Talent matching payment reward amount.
_matchDate
uint256
Date of talent matching.
_payDate
uint256
Expected payment date of talent matching.
deleteTalentMatch
Deletes existing talent match record, caller must be admin wallet.
Parameters
_Id
bytes20
Talent UUID
confirmTalentMatch
_Caller needs to have sufficient ONGAESHI tokens and has given spending approval to this contract. Teacher's reward will be distributed based on the teacher share scheme of the original ONGAESHI Education NFT in the talent matching. Supported edge case:
If talent is their own sponsor, talent shares are given to the treasury instead.
If talent completed their education without a coach, coach address will be empty, and coach shares are given to the treasury._
setGTAddress
Updates the ONGAESHI token address of this smart contract. Caller must be admin.
Parameters
_gtAddress
address
New ONGAESHI token address.
setTreasuryAddress
Updates recipient address of treasury fees. Caller must be admin.
Parameters
_treasuryAddress
address
New address of treasury.
setEmitEvent
Updates the contract address for event emitter. Caller must be admin.
Ensure that this contract has access to emit events on the new event emitter.
Parameters
_emitEventAddr
address
New event emitter contract address.
setAdmin
Set admin status to any wallet, caller must be contract owner.
Parameters
_address
address
Address to set admin status.
_allow
bool
Admin status, true to give admin access, false to revoke.
Last updated