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

Implement the feature to convert ICon.Contract #31

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

taiseiKMC
Copy link
Contributor

@taiseiKMC taiseiKMC commented Mar 25, 2024

Try to implement the contract part of https://github.com/westpaddy/icon-why3/blob/nishida/contract-ty/req/gparam.md

  • the entrypoint type definition follows the implementation by Jun
  • the contract type definition follows that specification above
    • s.t. type contract = { ct_ep : entrypoint; ct_addr : address }
  • Xfer receives 3 parameters: gparam, mutez, and contract
    • Reverted 4 to 3. entrypoint and address are merged into contract (because it seems to have no problem)
  • ICon.Contract addr is converted to { ct_ep=(Default : ICon.Contract.entrypoint); ct_addr=addr }
  • ICon.Contract.ep addr is converted to { ct_ep=(Ep : ICon.Contract.entrypoint); ct_addr=addr) }

and some fixes (I commented in #30) and dao.tzw example that includes an entrypoint receiving a contact parameter.

@taiseiKMC taiseiKMC force-pushed the hsaito/icon-contract branch from fba8f42 to 6b6d318 Compare March 25, 2024 03:55
@taiseiKMC
Copy link
Contributor Author

Though the feature to convert ICon.Gp also has the same problem, local opened ICon can not be handled

ICon.(match st.entrypoint, gp with
| Contract.Default, Gp (p : ()) -> True 
    (* Contract.Default is acceptable, but Gp isn't *)
| _ -> True
    end)

Add feature to convert
- ICon.Contract to Default
- ICon.Contract.ep to Ep
- Change Sort.Scontract to fit mlw contract type
- Add superficial is_operation_wf and is_contract_wf
- Add entrypoints
  - It's difficult to use lambda unit operation
@taiseiKMC taiseiKMC force-pushed the hsaito/icon-contract branch from 9d79e3e to 0684b89 Compare March 26, 2024 12:47
@taiseiKMC taiseiKMC changed the title [DRAFT] Implement the feature to convert ICon.Contract Implement the feature to convert ICon.Contract Mar 26, 2024
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