Instead of collecting pre-generated assets, with Flovatar you can unleash your creativity - no more trade-off between rarity and your own individuality.
You can decide if you want to build a Flovatar that looks just like you, or even better, something that speaks to you with the rarest traits combination! With 11 components, there are over 100 billion unique variations!
Check https://flovatar.com/! 💪
This repository contains code for contracts, scripts and transaction associated with Flovatar project. Take a look around and if you have ideas how to make it better - we welcome it with open heart!
Our contracts are deployed to both networks:
Mainnet
- 0x921ea449dffec68a - Flow View Source - Flovatar AccountTestnet
- 0x9392a4a7c3f49a0b - Flow View Source - Flovatar Account
You can use code in get_flovatars.cdc file to get a list of Flovatars living in account's storage.
/// Fetch a List of Flovatars on address - Mainnet
import Flovatar from 0x921ea449dffec68a
pub fun main(address:Address) : [Flovatar.FlovatarData] {
return Flovatar.getFlovatars(address: address)
}
import { query, config } from "@onflow/fcl";
config().put("accessNode.api", "https://rest-mainnet.onflow.org");
(async()=>{
const getFlovatars = async (address) => {
// We will inline code from above here
const cadence = `
import Flovatar from 0x921ea449dffec68a
pub fun main(address:Address) : [Flovatar.FlovatarData] {
return Flovatar.getFlovatars(address: address)
}
`;
// script expects single argument of type Address
const args = (arg, t) => [arg(address, t.Address)];
// ...and we are ready to query the network! :)
const flovatars = await query({ cadence, args });
console.log({ flovatars })
}
const user = "0x2a0eccae942667be"
await getFlovatars(user)
})()
Example code on how it could be used together with FCL-JS library can be found on CodeSandbox