Developers Documentation
  • Overview
    • Contracts Overview
    • Public Repositories
    • Smart Contract Addresses
      • Polygon PoS
  • Core protocol
    • Architecture Overview
    • Blocks
    • Vault Strategy
    • Vault Configuration
    • Vault Deployment
    • Vault Operations
    • Access Manager
    • Contracts
      • StrategVault
      • StrategERC3525
      • StrategVaultFactory
      • StrategAssetBuffer
      • StrategBlockRegistry
      • StrategUserInteractions
      • StrategOperatorProxy
      • StrategOperatorDataAggregator
  • Borrow module
    • Architecture Overview
    • Aave V3 Position manager
    • Smart Contract Docs
      • StrategPositionManagerFactory
      • StrategAaveV3PositionManager
      • StrategAaveV3PositionManagerInfo
  • Portal Module
    • Architecture Overview
    • Swap
      • Features
      • Functions
    • Oracle
      • Architecture design
      • Functions
  • Tools
    • Developer kit
Powered by GitBook
On this page
  • Methods
  • MAX_CLAIM_DELAY
  • TREASURY
  • addRewards
  • allowance
  • approve
  • approve
  • balanceOf
  • balanceOf
  • contractURI
  • factory
  • getApproved
  • initialize
  • isApprovedForAll
  • isTrustedForwarder
  • metadataDescriptor
  • name
  • ownerOf
  • pullUnclaimedToken
  • redeem
  • safeTransferFrom
  • safeTransferFrom
  • setApprovalForAll
  • slotOf
  • slotURI
  • supportsInterface
  • symbol
  • tokenByIndex
  • tokenFee
  • tokenIdInfo
  • tokenOfOwnerByIndex
  • tokenURI
  • totalRewards
  • totalSupply
  • transferFrom
  • transferFrom
  • transferFrom
  • trustedForwarder
  • valueDecimals
  • vault
  • Events
  • Approval
  • ApprovalForAll
  • ApprovalValue
  • Initialized
  • SetMetadataDescriptor
  • SlotChanged
  • StrategERC3525Update
  • Transfer
  • TransferValue
  • Errors
  • AddressEmptyCode
  • AddressInsufficientBalance
  • ClaimDelayNotReached
  • ERC721InvalidReceiver
  • FailedInnerCall
  • InvalidInitialization
  • NotInitializing
  • NotTokenOwner
  • NotVault
  • ReentrancyGuardReentrantCall
  • SafeERC20FailedOperation
  • StringsInsufficientHexLength
  • ZeroBalanceToken
  1. Core protocol
  2. Contracts

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

function allowance(uint256 tokenId_, address operator_) external view returns (uint256)

Parameters

Name
Type
Description

tokenId_

uint256

undefined

operator_

address

undefined

Returns

Name
Type
Description

_0

uint256

undefined

approve

function approve(address to_, uint256 tokenId_) external nonpayable

Parameters

Name
Type
Description

to_

address

undefined

tokenId_

uint256

undefined

approve

function approve(uint256 tokenId_, address to_, uint256 value_) external payable

Parameters

Name
Type
Description

tokenId_

uint256

undefined

to_

address

undefined

value_

uint256

undefined

balanceOf

function balanceOf(address owner_) external view returns (uint256 balance)

Parameters

Name
Type
Description

owner_

address

undefined

Returns

Name
Type
Description

balance

uint256

undefined

balanceOf

function balanceOf(uint256 tokenId_) external view returns (uint256)

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

_0

string

The JSON formatted URI of the current ERC3525 contract

factory

function factory() external view returns (contract IStrategVaultFactory)

Returns

Name
Type
Description

_0

contract IStrategVaultFactory

undefined

getApproved

function getApproved(uint256 tokenId_) external view returns (address)

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_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

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

function isApprovedForAll(address owner_, address operator_) external view returns (bool)

Parameters

Name
Type
Description

owner_

address

undefined

operator_

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

isTrustedForwarder

function isTrustedForwarder(address forwarder) external view returns (bool)

Indicates whether any particular address is the trusted forwarder.

Parameters

Name
Type
Description

forwarder

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

metadataDescriptor

function metadataDescriptor() external view returns (contract IERC3525MetadataDescriptorUpgradeable)

Returns

Name
Type
Description

_0

contract IERC3525MetadataDescriptorUpgradeable

undefined

name

function name() external view returns (string)

Returns the token collection name.

Returns

Name
Type
Description

_0

string

undefined

ownerOf

function ownerOf(uint256 tokenId_) external view returns (address owner_)

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

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

Name
Type
Description

_tokenId

uint256

The ID of the token to redeem.

redeem

function redeem(uint256 _tokenId) external nonpayable

Redeems tokens in the specified token ID.

Parameters

Name
Type
Description

_tokenId

uint256

The ID of the token to redeem.

safeTransferFrom

function safeTransferFrom(address from_, address to_, uint256 tokenId_) external nonpayable

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

safeTransferFrom

function safeTransferFrom(address from_, address to_, uint256 tokenId_, bytes data_) external nonpayable

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

data_

bytes

undefined

setApprovalForAll

function setApprovalForAll(address operator_, bool approved_) external nonpayable

Parameters

Name
Type
Description

operator_

address

undefined

approved_

bool

undefined

slotOf

function slotOf(uint256 tokenId_) external view returns (uint256)

Parameters

Name
Type
Description

tokenId_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

slotURI

function slotURI(uint256 slot_) external view returns (string)

Parameters

Name
Type
Description

slot_

uint256

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_0

bool

undefined

symbol

function symbol() external view returns (string)

Returns the token collection symbol.

Returns

Name
Type
Description

_0

string

undefined

tokenByIndex

function tokenByIndex(uint256 index_) external view returns (uint256)

Parameters

Name
Type
Description

index_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

tokenFee

function tokenFee() external view returns (contract IERC20)

The token used to pay the creator

Returns

Name
Type
Description

_0

contract IERC20

undefined

tokenIdInfo

function tokenIdInfo(uint256) external view returns (uint256 timeClaimed, uint256 lastClaimTotalRewards)

Parameters

Name
Type
Description

_0

uint256

undefined

Returns

Name
Type
Description

timeClaimed

uint256

undefined

lastClaimTotalRewards

uint256

undefined

tokenOfOwnerByIndex

function tokenOfOwnerByIndex(address owner_, uint256 index_) external view returns (uint256)

Parameters

Name
Type
Description

owner_

address

undefined

index_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

tokenURI

function tokenURI(uint256 _tokenId) external view returns (string)

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

function totalRewards() external view returns (uint256)

Returns

Name
Type
Description

_0

uint256

undefined

totalSupply

function totalSupply() external view returns (uint256)

Returns the total amount of tokens stored by the contract.

Returns

Name
Type
Description

_0

uint256

undefined

transferFrom

function transferFrom(uint256 fromTokenId_, address to_, uint256 value_) external payable returns (uint256 newTokenId)

Parameters

Name
Type
Description

fromTokenId_

uint256

undefined

to_

address

undefined

value_

uint256

undefined

Returns

Name
Type
Description

newTokenId

uint256

undefined

transferFrom

function transferFrom(address from_, address to_, uint256 tokenId_) external nonpayable

Parameters

Name
Type
Description

from_

address

undefined

to_

address

undefined

tokenId_

uint256

undefined

transferFrom

function transferFrom(uint256 fromTokenId_, uint256 toTokenId_, uint256 value_) external payable

Parameters

Name
Type
Description

fromTokenId_

uint256

undefined

toTokenId_

uint256

undefined

value_

uint256

undefined

trustedForwarder

function trustedForwarder() external view returns (address)

Returns the address of the trusted forwarder

Returns

Name
Type
Description

_0

address

undefined

valueDecimals

function valueDecimals() external view returns (uint8)

Returns the number of decimals the token uses for value.

Returns

Name
Type
Description

_0

uint8

undefined

vault

function vault() external view returns (address)

Returns

Name
Type
Description

_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

Name
Type
Description

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

Name
Type
Description

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

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

event Initialized(uint64 version)

Triggered when the contract has been initialized or reinitialized.

Parameters

Name
Type
Description

version

uint64

undefined

SetMetadataDescriptor

event SetMetadataDescriptor(address indexed metadataDescriptor)

Parameters

Name
Type
Description

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

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

event StrategERC3525Update(enum StrategERC3525UpdateType indexed update, bytes data)

Parameters

Name
Type
Description

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

Name
Type
Description

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

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

error AddressEmptyCode(address target)

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

Parameters

Name
Type
Description

target

address

undefined

AddressInsufficientBalance

error AddressInsufficientBalance(address account)

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

Parameters

Name
Type
Description

account

address

undefined

ClaimDelayNotReached

error ClaimDelayNotReached()

ERC721InvalidReceiver

error ERC721InvalidReceiver(address receiver)

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

Parameters

Name
Type
Description

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

Name
Type
Description

token

address

undefined

StringsInsufficientHexLength

error StringsInsufficientHexLength(uint256 value, uint256 length)

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

Parameters

Name
Type
Description

value

uint256

undefined

length

uint256

undefined

ZeroBalanceToken

error ZeroBalanceToken()
PreviousStrategVaultNextStrategVaultFactory

Last updated 1 year ago