StrategERC3525
ERC3525 contract to manage vaults ownership and creator fee distribution
Methods
MAX_CLAIM_DELAY
function MAX_CLAIM_DELAY() external view returns (uint256)
Returns
_0
uint256
undefined
TREASURY
function TREASURY() external view returns (address)
Returns
_0
address
undefined
addRewards
function addRewards(uint256 _amount) external nonpayable
Adds rewards to the contract.
Parameters
_amount
uint256
The amount of tokens to add as rewards.
allowance
function allowance(uint256 tokenId_, address operator_) external view returns (uint256)
Parameters
tokenId_
uint256
undefined
operator_
address
undefined
Returns
_0
uint256
undefined
approve
function approve(address to_, uint256 tokenId_) external nonpayable
Parameters
to_
address
undefined
tokenId_
uint256
undefined
approve
function approve(uint256 tokenId_, address to_, uint256 value_) external payable
Parameters
tokenId_
uint256
undefined
to_
address
undefined
value_
uint256
undefined
balanceOf
function balanceOf(address owner_) external view returns (uint256 balance)
Parameters
owner_
address
undefined
Returns
balance
uint256
undefined
balanceOf
function balanceOf(uint256 tokenId_) external view returns (uint256)
Parameters
tokenId_
uint256
undefined
Returns
_0
uint256
undefined
contractURI
function contractURI() external view returns (string)
Returns the Uniform Resource Identifier (URI) for the current ERC3525 contract.
This function SHOULD return the URI for this contract in JSON format, starting with header data:application/json;
. See https://eips.ethereum.org/EIPS/eip-3525 for the JSON schema for contract URI.
Returns
_0
string
The JSON formatted URI of the current ERC3525 contract
factory
function factory() external view returns (contract IStrategVaultFactory)
Returns
_0
contract IStrategVaultFactory
undefined
getApproved
function getApproved(uint256 tokenId_) external view returns (address)
Parameters
tokenId_
uint256
undefined
Returns
_0
address
undefined
initialize
function initialize(address _vault, address _owner, address _tokenFee, address _treasury) external nonpayable
Initializes the contract with the specified vault, owner, tokenFee and treasury.
Parameters
_vault
address
The address of the vault.
_owner
address
The address of the contract owner.
_tokenFee
address
The address of the ERC20 token to redeem for a proportional share.
_treasury
address
The address of the treasury
isApprovedForAll
function isApprovedForAll(address owner_, address operator_) external view returns (bool)
Parameters
owner_
address
undefined
operator_
address
undefined
Returns
_0
bool
undefined
isTrustedForwarder
function isTrustedForwarder(address forwarder) external view returns (bool)
Indicates whether any particular address is the trusted forwarder.
Parameters
forwarder
address
undefined
Returns
_0
bool
undefined
metadataDescriptor
function metadataDescriptor() external view returns (contract IERC3525MetadataDescriptorUpgradeable)
Returns
_0
contract IERC3525MetadataDescriptorUpgradeable
undefined
name
function name() external view returns (string)
Returns the token collection name.
Returns
_0
string
undefined
ownerOf
function ownerOf(uint256 tokenId_) external view returns (address owner_)
Parameters
tokenId_
uint256
undefined
Returns
owner_
address
undefined
pullUnclaimedToken
function pullUnclaimedToken(uint256 _tokenId) external nonpayable
Redeems tokens in the treseaury address if token ID not claimed after 6 months.
Parameters
_tokenId
uint256
The ID of the token to redeem.
redeem
function redeem(uint256 _tokenId) external nonpayable
Redeems tokens in the specified token ID.
Parameters
_tokenId
uint256
The ID of the token to redeem.
safeTransferFrom
function safeTransferFrom(address from_, address to_, uint256 tokenId_) external nonpayable
Parameters
from_
address
undefined
to_
address
undefined
tokenId_
uint256
undefined
safeTransferFrom
function safeTransferFrom(address from_, address to_, uint256 tokenId_, bytes data_) external nonpayable
Parameters
from_
address
undefined
to_
address
undefined
tokenId_
uint256
undefined
data_
bytes
undefined
setApprovalForAll
function setApprovalForAll(address operator_, bool approved_) external nonpayable
Parameters
operator_
address
undefined
approved_
bool
undefined
slotOf
function slotOf(uint256 tokenId_) external view returns (uint256)
Parameters
tokenId_
uint256
undefined
Returns
_0
uint256
undefined
slotURI
function slotURI(uint256 slot_) external view returns (string)
Parameters
slot_
uint256
undefined
Returns
_0
string
undefined
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
Returns true if this contract implements the interface defined by interfaceId
. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
symbol
function symbol() external view returns (string)
Returns the token collection symbol.
Returns
_0
string
undefined
tokenByIndex
function tokenByIndex(uint256 index_) external view returns (uint256)
Parameters
index_
uint256
undefined
Returns
_0
uint256
undefined
tokenFee
function tokenFee() external view returns (contract IERC20)
The token used to pay the creator
Returns
_0
contract IERC20
undefined
tokenIdInfo
function tokenIdInfo(uint256) external view returns (uint256 timeClaimed, uint256 lastClaimTotalRewards)
Parameters
_0
uint256
undefined
Returns
timeClaimed
uint256
undefined
lastClaimTotalRewards
uint256
undefined
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner_, uint256 index_) external view returns (uint256)
Parameters
owner_
address
undefined
index_
uint256
undefined
Returns
_0
uint256
undefined
tokenURI
function tokenURI(uint256 _tokenId) external view returns (string)
Returns the URI for a specific token ID.
Parameters
_tokenId
uint256
The ID of the token to return the URI for.
Returns
_0
string
The URI for the specified token ID.
totalRewards
function totalRewards() external view returns (uint256)
Returns
_0
uint256
undefined
totalSupply
function totalSupply() external view returns (uint256)
Returns the total amount of tokens stored by the contract.
Returns
_0
uint256
undefined
transferFrom
function transferFrom(uint256 fromTokenId_, address to_, uint256 value_) external payable returns (uint256 newTokenId)
Parameters
fromTokenId_
uint256
undefined
to_
address
undefined
value_
uint256
undefined
Returns
newTokenId
uint256
undefined
transferFrom
function transferFrom(address from_, address to_, uint256 tokenId_) external nonpayable
Parameters
from_
address
undefined
to_
address
undefined
tokenId_
uint256
undefined
transferFrom
function transferFrom(uint256 fromTokenId_, uint256 toTokenId_, uint256 value_) external payable
Parameters
fromTokenId_
uint256
undefined
toTokenId_
uint256
undefined
value_
uint256
undefined
trustedForwarder
function trustedForwarder() external view returns (address)
Returns the address of the trusted forwarder
Returns
_0
address
undefined
valueDecimals
function valueDecimals() external view returns (uint8)
Returns the number of decimals the token uses for value.
Returns
_0
uint8
undefined
vault
function vault() external view returns (address)
Returns
_0
address
undefined
Events
Approval
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)
Emitted when owner
enables approved
to manage the tokenId
token.
Parameters
owner indexed
address
undefined
approved indexed
address
undefined
tokenId indexed
uint256
undefined
ApprovalForAll
event ApprovalForAll(address indexed owner, address indexed operator, bool approved)
Emitted when owner
enables or disables (approved
) operator
to manage all of its assets.
Parameters
owner indexed
address
undefined
operator indexed
address
undefined
approved
bool
undefined
ApprovalValue
event ApprovalValue(uint256 indexed _tokenId, address indexed _operator, uint256 _value)
MUST emits when the approval value of a token is set or changed.
Parameters
_tokenId indexed
uint256
The token to approve
_operator indexed
address
The operator to approve for
_value
uint256
The maximum value that _operator
is allowed to manage
Initialized
event Initialized(uint64 version)
Triggered when the contract has been initialized or reinitialized.
Parameters
version
uint64
undefined
SetMetadataDescriptor
event SetMetadataDescriptor(address indexed metadataDescriptor)
Parameters
metadataDescriptor indexed
address
undefined
SlotChanged
event SlotChanged(uint256 indexed _tokenId, uint256 indexed _oldSlot, uint256 indexed _newSlot)
MUST emit when the slot of a token is set or changed.
Parameters
_tokenId indexed
uint256
The token of which slot is set or changed
_oldSlot indexed
uint256
The previous slot of the token
_newSlot indexed
uint256
The updated slot of the token
StrategERC3525Update
event StrategERC3525Update(enum StrategERC3525UpdateType indexed update, bytes data)
Parameters
update indexed
enum StrategERC3525UpdateType
The type of update
data
bytes
The data of the update
Transfer
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)
Emitted when tokenId
token is transferred from from
to to
.
Parameters
from indexed
address
undefined
to indexed
address
undefined
tokenId indexed
uint256
undefined
TransferValue
event TransferValue(uint256 indexed _fromTokenId, uint256 indexed _toTokenId, uint256 _value)
MUST emit when value of a token is transferred to another token with the same slot, including zero value transfers (_value == 0) as well as transfers when tokens are created (_fromTokenId
== 0) or destroyed (_toTokenId
== 0).
Parameters
_fromTokenId indexed
uint256
The token id to transfer value from
_toTokenId indexed
uint256
The token id to transfer value to
_value
uint256
The transferred value
Errors
AddressEmptyCode
error AddressEmptyCode(address target)
There's no code at target
(it is not a contract).
Parameters
target
address
undefined
AddressInsufficientBalance
error AddressInsufficientBalance(address account)
The ETH balance of the account is not enough to perform the operation.
Parameters
account
address
undefined
ClaimDelayNotReached
error ClaimDelayNotReached()
ERC721InvalidReceiver
error ERC721InvalidReceiver(address receiver)
Indicates a failure with the token receiver
. Used in transfers.
Parameters
receiver
address
Address to which tokens are being transferred.
FailedInnerCall
error FailedInnerCall()
A call to an address target failed. The target may have reverted.
InvalidInitialization
error InvalidInitialization()
The contract is already initialized.
NotInitializing
error NotInitializing()
The contract is not initializing.
NotTokenOwner
error NotTokenOwner()
NotVault
error NotVault()
ReentrancyGuardReentrantCall
error ReentrancyGuardReentrantCall()
Unauthorized reentrant call.
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
An operation with an ERC20 token failed.
Parameters
token
address
undefined
StringsInsufficientHexLength
error StringsInsufficientHexLength(uint256 value, uint256 length)
The value
string doesn't fit in the specified length
.
Parameters
value
uint256
undefined
length
uint256
undefined
ZeroBalanceToken
error ZeroBalanceToken()
Last updated