Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Thirdweb Splitter
copy icon
thirdweb
• version 1.0.0
Utility
Splitter
Finance
Audited

Thirdweb Splitter

Audited

The Split contract lets you specify multiple wallet addresses that are recipients of any revenue or royalty split. You define what percentage of any funds that get sent to the split contract address is sent to each recipient. For example, you could define 0x1 and 0x2 as recipients, and configure them to receive 50% of the funds sent to the split contract. The split contract will store the funds, and when any user calls the distribute function, the funds will be distributed to the recipients according to the percentages you define.

*Visit desktop site to download or deploy

Version

1.0.0

Creator

thirdweb

Recent Use

🍞 0x34aA downloaded

Last Publish

10/23/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
initialize(address,string,uint256[]) :
This function initializes the PaymentSplitter contract. It sets the contractURI, the default admin, the trusted forwarders, the payees, and the shares. It also calls two internal functions, __ERC2771Context_init and __PaymentSplitter_init, which set up the trusted forwarders and the payees and shares, respectively. (autogenerated documentation)
contractType() :
This function returns a bytes32 value that represents the type of the contract. It does this by simply returning the value of the MODULE_TYPE constant, which is set when the contract is deployed. (autogenerated documentation)
contractVersion() :
This function is a getter function that returns the version of the contract. It is a pure function, meaning that it does not modify the state of the contract and does not interact with the blockchain. It simply returns the value of the constant variable VERSION, which is a uint8 (unsigned 8-bit integer) that stores the version of the contract. (autogenerated documentation)
release(address) :
This function releases a payment to an address payable account. It first calls the _release() function, which checks if the account is due a payment, and if so, returns the amount due. If the amount due is not 0, the payment is released to the account. (autogenerated documentation)
_release(address) :
This function is used to release a payment to an account. It requires that the account has shares, and calculates the payment amount based on the total amount received, and the amount already released to the account. If the payment amount is not 0, the payment is sent to the account, the amount released to the account is updated, and an event is emitted. (autogenerated documentation)
distribute() :
This function distributes funds to all payees registered in the contract. It does this by looping through the list of payees and calling the _release() function for each payee, passing in the amount of funds to be released. The _release() function then sends the funds to the payee. (autogenerated documentation)
_msgSender() :
This function is used to retrieve the address of the sender of the current message. It works by calling the _msgSender() function from the ERC2771ContextUpgradeable contract, which returns the address of the sender. (autogenerated documentation)
_msgData() :
This function is used to retrieve the data associated with a given message call. It works by calling the _msgData() function from the ERC2771ContextUpgradeable contract, which returns the data associated with the message call as a byte array. (autogenerated documentation)
setContractURI(string) :
This function sets the contractURI variable to the value of the _uri parameter. It can only be called by an account with the DEFAULT_ADMIN_ROLE. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i thirdweb-split
copy icon

Recent Use

🍞 0x34aA downloaded

Last Publish

10/23/2022

Version

1.0.0

Creator

thirdweb

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.