CRYPTO NEWS

Can I save structs in a Mapping?

Is it possible to store structs in a Mapping or any dynamic memory structure in my Solidity SmartContract?

How would I link multiple tokens to a single token?

So I’m trying to allow a user to stake a token and have users stake their tokens from a different collection within that token if that makes sense. Kind of like storing cars in a garage. The contract I’ve got right now allows for tokens from different contracts but I’m not sure how to store::Listen

So I’m trying to allow a user to stake a token and have users stake their tokens from a different collection within that token if that makes sense. Kind of like storing cars in a garage. The contract I’ve got right now allows for tokens from different contracts but I’m not sure how to store multiple addresses with a token. When the token is staked the contract stores the token ID, the start time of staking and the owners address inside of a struct which is mapped to a vault. How would I go about doing this?

Can I save structs in a Mapping?

Shopping cart
There are no products in the cart!
Continue shopping
0