StrategERC3525

ERC3525 contract to manage vaults ownership and creator fee distribution

Methods

MAX_CLAIM_DELAY

function MAX_CLAIM_DELAY() external view returns (uint256)

Returns

Name
Type
Description

_0

uint256

undefined

TREASURY

function TREASURY() external view returns (address)

Returns

Name
Type
Description

_0

address

undefined

addRewards

function addRewards(uint256 _amount) external nonpayable

Adds rewards to the contract.

Parameters

Name
Type
Description

_amount

uint256

The amount of tokens to add as rewards.

allowance

Parameters

Name
Type
Description

tokenId_

uint256

undefined

operator_

address

undefined

Returns

Name
Type
Description

_0

uint256

undefined

approve

Parameters

Name
Type
Description

to_

address

undefined

tokenId_

uint256

undefined

approve

Parameters

Name
Type
Description

tokenId_

uint256

undefined

to_

address

undefined

value_

uint256

undefined

balanceOf

Parameters

Name
Type
Description

owner_

address

undefined

Returns

Name
Type
Description

balance

uint256

undefined

balanceOf

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

contractURI

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

Name
Type
Description

_0

string

The JSON formatted URI of the current ERC3525 contract

factory

Returns

Name
Type
Description

_0

contract IStrategVaultFactory

undefined

getApproved

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_0

address

undefined

initialize

Initializes the contract with the specified vault, owner, tokenFee and treasury.

Parameters

Name
Type
Description

_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

Parameters

Name
Type
Description

owner_

address

undefined

operator_

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

isTrustedForwarder

Indicates whether any particular address is the trusted forwarder.

Parameters

Name
Type
Description

forwarder

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

metadataDescriptor

Returns

Name
Type
Description

_0

contract IERC3525MetadataDescriptorUpgradeable

undefined

name

Returns the token collection name.

Returns

Name
Type
Description

_0

string

undefined

ownerOf

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

owner_

address

undefined

pullUnclaimedToken

Redeems tokens in the treseaury address if token ID not claimed after 6 months.

Parameters

Name
Type
Description

_tokenId

uint256

The ID of the token to redeem.

redeem

Redeems tokens in the specified token ID.

Parameters

Name
Type
Description

_tokenId

uint256

The ID of the token to redeem.

safeTransferFrom

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

safeTransferFrom

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

data_

bytes

undefined

setApprovalForAll

Parameters

Name
Type
Description

operator_

address

undefined

approved_

bool

undefined

slotOf

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

slotURI

Parameters

Name
Type
Description

slot_

uint256

undefined

Returns

Name
Type
Description

_0

string

undefined

supportsInterface

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

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_0

bool

undefined

symbol

Returns the token collection symbol.

Returns

Name
Type
Description

_0

string

undefined

tokenByIndex

Parameters

Name
Type
Description

index_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

tokenFee

The token used to pay the creator

Returns

Name
Type
Description

_0

contract IERC20

undefined

tokenIdInfo

Parameters

Name
Type
Description

_0

uint256

undefined

Returns

Name
Type
Description

timeClaimed

uint256

undefined

lastClaimTotalRewards

uint256

undefined

tokenOfOwnerByIndex

Parameters

Name
Type
Description

owner_

address

undefined

index_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

tokenURI

Returns the URI for a specific token ID.

Parameters

Name
Type
Description

_tokenId

uint256

The ID of the token to return the URI for.

Returns

Name
Type
Description

_0

string

The URI for the specified token ID.

totalRewards

Returns

Name
Type
Description

_0

uint256

undefined

totalSupply

Returns the total amount of tokens stored by the contract.

Returns

Name
Type
Description

_0

uint256

undefined

transferFrom

Parameters

Name
Type
Description

fromTokenId_

uint256

undefined

to_

address

undefined

value_

uint256

undefined

Returns

Name
Type
Description

newTokenId

uint256

undefined

transferFrom

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

transferFrom

Parameters

Name
Type
Description

fromTokenId_

uint256

undefined

toTokenId_

uint256

undefined

value_

uint256

undefined

trustedForwarder

Returns the address of the trusted forwarder

Returns

Name
Type
Description

_0

address

undefined

valueDecimals

Returns the number of decimals the token uses for value.

Returns

Name
Type
Description

_0

uint8

undefined

vault

Returns

Name
Type
Description

_0

address

undefined

Events

Approval

Emitted when owner enables approved to manage the tokenId token.

Parameters

Name
Type
Description

owner indexed

address

undefined

approved indexed

address

undefined

tokenId indexed

uint256

undefined

ApprovalForAll

Emitted when owner enables or disables (approved) operator to manage all of its assets.

Parameters

Name
Type
Description

owner indexed

address

undefined

operator indexed

address

undefined

approved

bool

undefined

ApprovalValue

MUST emits when the approval value of a token is set or changed.

Parameters

Name
Type
Description

_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

Triggered when the contract has been initialized or reinitialized.

Parameters

Name
Type
Description

version

uint64

undefined

SetMetadataDescriptor

Parameters

Name
Type
Description

metadataDescriptor indexed

address

undefined

SlotChanged

MUST emit when the slot of a token is set or changed.

Parameters

Name
Type
Description

_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

Parameters

Name
Type
Description

update indexed

enum StrategERC3525UpdateType

The type of update

data

bytes

The data of the update

Transfer

Emitted when tokenId token is transferred from from to to.

Parameters

Name
Type
Description

from indexed

address

undefined

to indexed

address

undefined

tokenId indexed

uint256

undefined

TransferValue

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

Name
Type
Description

_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

There's no code at target (it is not a contract).

Parameters

Name
Type
Description

target

address

undefined

AddressInsufficientBalance

The ETH balance of the account is not enough to perform the operation.

Parameters

Name
Type
Description

account

address

undefined

ClaimDelayNotReached

ERC721InvalidReceiver

Indicates a failure with the token receiver. Used in transfers.

Parameters

Name
Type
Description

receiver

address

Address to which tokens are being transferred.

FailedInnerCall

A call to an address target failed. The target may have reverted.

InvalidInitialization

The contract is already initialized.

NotInitializing

The contract is not initializing.

NotTokenOwner

NotVault

ReentrancyGuardReentrantCall

Unauthorized reentrant call.

SafeERC20FailedOperation

An operation with an ERC20 token failed.

Parameters

Name
Type
Description

token

address

undefined

StringsInsufficientHexLength

The value string doesn't fit in the specified length.

Parameters

Name
Type
Description

value

uint256

undefined

length

uint256

undefined

ZeroBalanceToken

Last updated