You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment only following parameters could be set on jetton deploy/init:
jetton_name
jetton_description
jetton_symbol
max_supply
And if jetton master should be initialized with any other paramter like image_data or decimals it will only be possible via another request to jetton (JettonSetParameter)
I suggest to update JettonInit message with dynamic list of input fields to allow initialize jetton with any metadata fields
But how to do this? At the moment i don't have good solution for it
My first thought is to adopt a similar approach as the optional custom_payload used in the JettonTransfer message. In this case, we could introduce a parameter named something like metadata , which would serve as a flexible container for additional fields such as image_data, decimals and others.
The metadata parameter could map to a struct that accommodates all optional parameters.
Do you prefer a dynamic list (dictionary) of input fields instead of this?
Do you prefer a dynamic list (dictionary) of input fields instead of this?
I think it should be dynamic list because we can't describe all possible fields of metadata in advance. Some jettons theoretically could have custom logic for metadata fields.
The metadata parameter could map to a struct that accommodates all optional parameters.
You mean something like this?
messageJettonInit{
// non metadata fields firstmax_supply: Int;
// metadata fields will be stored like in `contracts/teps/tep64.tact`// key - sha256 of string keymetadata: map<Int, Cell>
}
I was thinking something like the below, a structural predefined optional values. Your suggestion to have metadata as a map will be more future proof to changes
message JettonInit{
// non metadata fields first
max_supply: Int;
//.....
//.....
//.....
metadata: Cell?;
}
struct Metadata {
decimals: Int? as uint256;
totalSupply: Int? as uint256;
name: Slice?;
string: Slice?;
attributes: Cell?;
//....
//....
//...
}
At the moment only following parameters could be set on jetton deploy/init:
jetton_name
jetton_description
jetton_symbol
max_supply
And if jetton master should be initialized with any other paramter like
image_data
ordecimals
it will only be possible via another request to jetton (JettonSetParameter
)I suggest to update
JettonInit
message with dynamic list of input fields to allow initialize jetton with any metadata fieldsBut how to do this? At the moment i don't have good solution for it
The text was updated successfully, but these errors were encountered: