Skip to content

Conversation

mbenke
Copy link
Collaborator

@mbenke mbenke commented Sep 26, 2025

Adds basic contract deployment code (no constructors or dispatch yet).

Testing example
Assuming running node & PRIVATE_KEY set:

$ cabal exec sol-core -- -f test/examples/spec/00answer.solc 
Emitting core for contract Answer
Writing to output1.core

$ cabal exec yule -- output1.core -o Answer.yul
found main
writing output to Answer.yul

$ hex=$(solc --strict-assembly --bin --optimize --optimize-yul Answer.yul | tail -1)

$ rawtx=$(cast mktx --private-key=$PRIVATE_KEY --create $hex)

$ cast publish $rawtx | jq .contractAddress
"0x5fc8d32690cc91d4c39d9d3abcbd16989f875707"

ben@grab:~/work/solcore$ cast call 0x5fc8d32690cc91d4c39d9d3abcbd16989f875707
0x000000000000000000000000000000000000000000000000000000000000002a

@mbenke mbenke requested a review from d-xo September 26, 2025 08:25
@d-xo d-xo closed this pull request by merging all changes into main in 9455ffb Oct 1, 2025
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.

2 participants