setPortraitHash()
/**
* Set the Collective Portrait's hash.
*
* @remarks
* Setting the Collective Portrait's hash will update the Collective Portrait's hash to the new hash.
* Setting the Collective Portrait's hash requires to own the minimum number of shares required to control the Collective Portrait.
*
* @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to set the hash for.
* @param {string} hash - The new hash to set the Collective Portrait's hash to.
* @returns {ethers.ContractTransaction} - The transaction object of the transaction that sets the Collective Portrait's hash.
* @beta
* @async
*/
setPortraitHash(
identity: CollectivePortraitName | number,
hash: string,
): ethers.ContractTransaction {
const id =
typeof identity === 'number' ? identity : this.getTokenIdByName(identity);
return this.portrait.portraitCollectiveContract.setPortraitHash(id, hash);
}
Last updated