Hi everyone, I’m new to PyTeal and Algorand and I would like to bring to Algorand a project written in Solidity concerning a voting system.
In short words, a smart contract allows admins to create surveys and add a certain number of participants to the survey vote.
An NFT representing the voting form of that survey is minted and transferred to each user account.
To keep track of individual votes when a user votes, the voting data is saved in the NFT metadata.
Problem n.1: Users do not need to have algos in order to use the system.
My solution: I will use a central account to make transactions and hold NFTs and will insert a proxy system so that votes are only accepted if previously signed by the user’s private wallet key.
Please tell me if you know other solutions and if my idea is feasible, thank you!
Problem n.2: In Solidity it is easy to save the associations between accounts, nft and survey with the smart contract but in PyTeal I don’t understand how could that be possible. Having only unsigned int and bytes as data types to store, how could I use a struct, a mapping, an array and a combination of them like in Solidity?
I would also like to know what are the reasons that led the Algorand team to only support uint and bytes for the data to be stored.