setEnsNamePartsFor
Contract: JBProjectHandles
Interface: IJBProjectHandles
- Step by step
- Code
- Errors
- Bug bounty
Associate an ENS name with a project.
["jbx", "dao", "foo"] represents foo.dao.jbx.eth.
Only a project's owner or a designated operator can set its ENS name parts.
Definition
function setEnsNamePartsFor(uint256 _projectId, string[] memory _parts)
external
override
requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations2.SET_ENS_NAME_FOR) { ... }
- Arguments:
_projectId
is the ID of the project to set an ENS handle for._parts
is t
- The function can be accessed externally by anyone.
- Through the
requirePermission
modifier, the function is only accessible by the token holder, or from an operator that has been given theJBOperations2.SET_ENS_NAME_FOR
permission by the token holder. - The resulting function overrides a function definition from the
IJBProjectHandles
interface. - The function doesn't return anything.
Body
-
Get a reference to the number of parts there are in the name.
// Get a reference to the number of parts are in the ENS name.
uint256 _partsLength = _parts.length;