# Clubs Utilities for: SimpleCollections Utilities to query to SimpleCollections src/plugins/membership/utils ``` ├── example.ts ├── simpleCollections.ts └── types └── setImageArg.ts ``` ### Method to call ```ts import { callSimpleCollections } from './simpleCollections' import { BaseProvider } from '@ethersproject/providers' import { setImagesProps } from './types/setImageArg' import { ClubsConfiguration, setConfig } from '@devprotocol/clubs-core' export const example = async (provider: BaseProvider) => { const setImage = await callSimpleCollections(provider, 'function_Name', [arg1, arg2,...]) } ``` Now as UI goes live, arguments needs to be taken for `setImage` from ClubsConfiguration #### Structure of function for arg for `setImage` ```solidity function setImages( address _propertyAddress, Image[] memory _images, bytes32[] memory _keys ) external onlyPropertyAuthor(_propertyAddress) ``` ```solidity struct Image { string src; uint256 requiredETHAmount; uint256 requiredETHFee; address gateway; } ``` ### Example Respective Types are imported from ./types ```ts import { callSimpleCollections } from './simpleCollections' import { BaseProvider } from '@ethersproject/providers' import { Image, propertyAddressType, keysType } from './types/setImageArg' import { ClubsConfiguration, setConfig } from '@devprotocol/clubs-core' // const config: ClubsConfiguration const propertyAddress: propertyAddressType = { // const { propertyAddress } = config propertyAddress: '0x0000000000000000000000000000000000000000', } const image: Image[] = [ { // const { imageSrc, requiredETHAmount, requiredETHFee, gateway } = config imageSrc: 'https://example.com', requiredETHAmount: 0, requiredETHFee: 0, gateway: '0x0000000000000000000000000000000000000000', }, ] const keys: keysType[] = [ // const { key } = config { key: '0x000', }, ] export const example = async (provider: BaseProvider) => { const setImage = await callSimpleCollections(provider, 'setImage', [ propertyAddress, image, keys ]) } ```