Skip to main content

IStrategyRegistry.sol

Methods

addressToString(address)

Solidity

function addressToString(address _address) external pure returns (string)

Parameters

NameTypeDescription
_addressaddressundefined

Returns

NameTypeDescription
_0stringundefined

approve(address,uint256)

Solidity

function approve(address to, uint256 tokenId) external nonpayable
Details

Gives permission to to to transfer tokenId token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - tokenId must exist. Emits an {Approval} event.

Parameters

NameTypeDescription
toaddressundefined
tokenIduint256undefined

balanceOf(address)

Solidity

function balanceOf(address owner) external view returns (uint256 balance)
Details

Returns the number of tokens in owner's account.

Parameters

NameTypeDescription
owneraddressundefined

Returns

NameTypeDescription
balanceuint256undefined

baseURI()

Solidity

function baseURI() external view returns (string)

Returns

NameTypeDescription
_0stringundefined

burn(uint256)

Solidity

function burn(uint256 tokenId) external nonpayable

Parameters

NameTypeDescription
tokenIduint256undefined

createStrategy(address,string,string,uint128,uint128)

Solidity

function createStrategy(address strategyCreator, string name, string execBundle, uint128 maxGasCost, uint128 maxGasPerAction) external nonpayable returns (uint256 newStrategyTokenId)
Details

Create NFT for execution bundle.

Parameters

NameTypeDescription
strategyCreatoraddressundefined
namestringThe name of the strategy.
execBundlestringThe IPFS reference of the execution bundle.
maxGasCostuint128undefined
maxGasPerActionuint128undefined

Returns

NameTypeDescription
newStrategyTokenIduint256The token ID of the NFT.

getApproved(uint256)

Solidity

function getApproved(uint256 tokenId) external view returns (address operator)
Details

Returns the account approved for tokenId token. Requirements: - tokenId must exist.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
operatoraddressundefined

getRegisteredStrategy(uint256)

Solidity

function getRegisteredStrategy(uint256 tokenId) external view returns (struct IStrategyRegistry.RegisteredStrategy)

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0IStrategyRegistry.RegisteredStrategyundefined

getStrategyAddress(uint256)

Solidity

function getStrategyAddress(uint256 tokenId) external view returns (address)

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0addressundefined

getStrategyOwner(uint256)

Solidity

function getStrategyOwner(uint256 tokenId) external view returns (address)

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0addressundefined

isApprovedForAll(address,address)

Solidity

function isApprovedForAll(address owner, address operator) external view returns (bool)
Details

Returns if the operator is allowed to manage all of the assets of owner. See {setApprovalForAll}

Parameters

NameTypeDescription
owneraddressundefined
operatoraddressundefined

Returns

NameTypeDescription
_0boolundefined

ownerOf(uint256)

Solidity

function ownerOf(uint256 tokenId) external view returns (address owner)
Details

Returns the owner of the tokenId token. Requirements: - tokenId must exist.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
owneraddressundefined

pause()

Solidity

function pause() external nonpayable
Details

Pauses all token transfers. See {ERC721Pausable} and {Pausable-_pause}. Requirements: - the caller must have the PAUSER_ROLE.

safeTransferFrom(address,address,uint256)

Solidity

function safeTransferFrom(address from, address to, uint256 tokenId) external nonpayable
Details

Safely transfers tokenId token from from to to, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - from cannot be the zero address. - to cannot be the zero address. - tokenId token must exist and be owned by from. - If the caller is not from, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. - If to refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined

safeTransferFrom(address,address,uint256,bytes)

Solidity

function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) external nonpayable
Details

Safely transfers tokenId token from from to to. Requirements: - from cannot be the zero address. - to cannot be the zero address. - tokenId token must exist and be owned by from. - If the caller is not from, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If to refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined
databytesundefined

setApprovalForAll(address,bool)

Solidity

function setApprovalForAll(address operator, bool _approved) external nonpayable
Details

Approve or remove operator as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The operator cannot be the caller. Emits an {ApprovalForAll} event.

Parameters

NameTypeDescription
operatoraddressundefined
_approvedboolundefined

setGasParameters(uint256,uint128,uint128,uint16)

Solidity

function setGasParameters(uint256 _tokenId, uint128 _maxGasCost, uint128 _maxGasPerMethod, uint16 _maxMethods) external nonpayable
Details

parameters users set for what constitutes an acceptable use of their funds. Can only be set by NFT owner.

Parameters

NameTypeDescription
_tokenIduint256is the token ID of the execution bundle.
_maxGasCostuint128is highest acceptable price to pay per gas, in terms of gwei.
_maxGasPerMethoduint128is max amount of gas to be sent in one method.
_maxMethodsuint16is the maximum number of methods that can be executed in one action.

supportsInterface(bytes4)

Solidity

function supportsInterface(bytes4 interfaceId) external view returns (bool)
Details

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

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

tokenByIndex(uint256)

Solidity

function tokenByIndex(uint256 index) external view returns (uint256)
Details

Returns a token ID at a given index of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens.

Parameters

NameTypeDescription
indexuint256undefined

Returns

NameTypeDescription
_0uint256undefined

tokenOfOwnerByIndex(address,uint256)

Solidity

function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId)
Details

Returns a token ID owned by owner at a given index of its token list. Use along with {balanceOf} to enumerate all of owner's tokens.

Parameters

NameTypeDescription
owneraddressundefined
indexuint256undefined

Returns

NameTypeDescription
tokenIduint256undefined

tokenURI(uint256)

Solidity

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

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0stringundefined

totalSupply()

Solidity

function totalSupply() external view returns (uint256)
Details

Returns the total amount of tokens stored by the contract.

Returns

NameTypeDescription
_0uint256undefined

transferFrom(address,address,uint256)

Solidity

function transferFrom(address from, address to, uint256 tokenId) external nonpayable
Details

Transfers tokenId token from from to to. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - from cannot be the zero address. - to cannot be the zero address. - tokenId token must be owned by from. - If the caller is not from, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined

unpause()

Solidity

function unpause() external nonpayable
Details

Unpauses all token transfers. See {ERC721Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the PAUSER_ROLE.

Events

Approval

Solidity

event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)

Parameters

NameTypeDescription
owner indexedaddressundefined
approved indexedaddressundefined
tokenId indexeduint256undefined

ApprovalForAll

Solidity

event ApprovalForAll(address indexed owner, address indexed operator, bool approved)

Parameters

NameTypeDescription
owner indexedaddressundefined
operator indexedaddressundefined
approvedboolundefined

Transfer

Solidity

event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)

Parameters

NameTypeDescription
from indexedaddressundefined
to indexedaddressundefined
tokenId indexeduint256undefined