Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ConfigParam* described in block.tlb #194

Merged
merged 13 commits into from
Oct 26, 2023
Merged

Support ConfigParam* described in block.tlb #194

merged 13 commits into from
Oct 26, 2023

Conversation

aleksej-paschenko
Copy link
Collaborator

No description provided.

  this commit adds support of two tlb features:

  1. "_ X = Y":
     for example, "_ CryptoSignatureSimple = CryptoSignature",
     tongo embeds CryptoSignatureSimple into CryptoSignature.

  2. constructor with number: "X <number":
     For example, " _ ConfigVotingSetup = ConfigParam 11".
    The implemented support is quite limited now,
    tlb parser works with files which contain conditions but
    it totally ignores them producing no code
    This commit adds support of the following constuction:

      _ (Hashmap 32 StoragePrices) = ConfigParam 18

    It becomes:

	type ConfigParam18 struct {
		tlb.Hashmap[tlb.Uint32, StoragePrices]
	}
To generate config.go from config.tlb:
cd tlb && go run generator-config.go

As of now, config.go requires some manual changes.
@aleksej-paschenko aleksej-paschenko merged commit d11b848 into master Oct 26, 2023
@aleksej-paschenko aleksej-paschenko deleted the tlb branch October 26, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant