I'm using anchor, so I define the space attribute in the Accounts struct, is there a way to make it depend on the instruction arg ?
It's for a PDA storing a string, and I don't know string length before the instruction is called. I can define a max length and allocate space for the max length but it's not very clean