How to assemble a contract’s code?Why does compiled solidity code do this check on the argument with which it was called?How can you split calldata bytes to an arbitrary number of different log events?Remix Warning - No visibility specified, Violate Checks-Effects-Interaction pattern, Function state mutability can be restricted to pure - Can ignore?Using a high level delegate call in upgradable contracts since ByzantiumWhat happens to a transaction after you clicked 'send' in Ethereum network?[Transaction life cycle at the EVM and P2P networking level]?Smart Contract To Send Multiple OutputsHow does Ethereum Smart Contract work on Mobile ClientHow to construct deployable bytecode from runtime bytecode?
Is insurance company’s preferred auto shop biased?
Minimum perfect squares needed to sum up to a target
How to be productive while waiting for meetings to start, when managers are casual about being late
Why is the time of useful consciousness only seconds at high altitudes, when I can hold my breath much longer at ground level?
Scorched receptacle
Why is my vegetable stock bitter, but the chicken stock not?
How to explain that the sums of numerators over sums of denominators isn't the same as the mean of ratios?
SHA3-255, one bit less
Why didn't Trudy wear a breathing mask in Avatar?
An example of a "regular poset" which does not belong to a convex polytope
Found a minor bug, affecting 1% of users. What should QA do?
Maintaining distance
Can/should you swim in zero G?
Can an animal produce milk all the time?
Advices to added homemade symbols
What benefits are there to blocking most search engines?
How to tension rope between two trees?
Was there an autocomplete utility in MS-DOS?
How to calculate Limit of this sequence
Did Joe Biden "stop the prosecution" of his son in Ukraine? And did he brag about stopping the prosecution?
Can I pay off my mortgage with a new one?
Use floats or doubles when writing mobile games
Unicode-math and declaring symbol font
How to prove (A v B), (A → C), (B → D) therefore (C v D)
How to assemble a contract’s code?
Why does compiled solidity code do this check on the argument with which it was called?How can you split calldata bytes to an arbitrary number of different log events?Remix Warning - No visibility specified, Violate Checks-Effects-Interaction pattern, Function state mutability can be restricted to pure - Can ignore?Using a high level delegate call in upgradable contracts since ByzantiumWhat happens to a transaction after you clicked 'send' in Ethereum network?[Transaction life cycle at the EVM and P2P networking level]?Smart Contract To Send Multiple OutputsHow does Ethereum Smart Contract work on Mobile ClientHow to construct deployable bytecode from runtime bytecode?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I wrote a contract into bare assembly (no solidity or Vhyper syntax and with all address being static).
How to convert it into bytecode? If possible using the new http://remix.ethereum.org or another web service where nothing has to be compiled.
contract-development evm
|
show 2 more comments
I wrote a contract into bare assembly (no solidity or Vhyper syntax and with all address being static).
How to convert it into bytecode? If possible using the new http://remix.ethereum.org or another web service where nothing has to be compiled.
contract-development evm
No difference from a contract written in any other language. Runsolc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.
– goodvibration
7 hours ago
1
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago
|
show 2 more comments
I wrote a contract into bare assembly (no solidity or Vhyper syntax and with all address being static).
How to convert it into bytecode? If possible using the new http://remix.ethereum.org or another web service where nothing has to be compiled.
contract-development evm
I wrote a contract into bare assembly (no solidity or Vhyper syntax and with all address being static).
How to convert it into bytecode? If possible using the new http://remix.ethereum.org or another web service where nothing has to be compiled.
contract-development evm
contract-development evm
edited 5 hours ago
user2284570
asked 8 hours ago
user2284570user2284570
2501 silver badge11 bronze badges
2501 silver badge11 bronze badges
No difference from a contract written in any other language. Runsolc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.
– goodvibration
7 hours ago
1
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago
|
show 2 more comments
No difference from a contract written in any other language. Runsolc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.
– goodvibration
7 hours ago
1
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago
No difference from a contract written in any other language. Run
solc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.– goodvibration
7 hours ago
No difference from a contract written in any other language. Run
solc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.– goodvibration
7 hours ago
1
1
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago
|
show 2 more comments
2 Answers
2
active
oldest
votes
In addition to @mafrasi2's answer, geth
ships with a binary called evm
. evm compile <filename>
can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
add a comment
|
I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "642"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f76313%2fhow-to-assemble-a-contract-s-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
In addition to @mafrasi2's answer, geth
ships with a binary called evm
. evm compile <filename>
can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
add a comment
|
In addition to @mafrasi2's answer, geth
ships with a binary called evm
. evm compile <filename>
can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
add a comment
|
In addition to @mafrasi2's answer, geth
ships with a binary called evm
. evm compile <filename>
can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.
In addition to @mafrasi2's answer, geth
ships with a binary called evm
. evm compile <filename>
can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.
edited 6 hours ago
answered 6 hours ago
smarxsmarx
21.9k1 gold badge9 silver badges20 bronze badges
21.9k1 gold badge9 silver badges20 bronze badges
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
add a comment
|
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
Do you know really no web services for that? Or a precompiled binary?
– user2284570
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
You can download geth here: geth.ethereum.org/downloads.
– smarx
5 hours ago
add a comment
|
I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.
add a comment
|
I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.
add a comment
|
I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.
I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.
answered 7 hours ago
mafrasi2mafrasi2
7992 silver badges14 bronze badges
7992 silver badges14 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Ethereum Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f76313%2fhow-to-assemble-a-contract-s-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
No difference from a contract written in any other language. Run
solc --bin --abi --optimize --optimize-runs=200 --output-dir=YourArtifactsFolder YourContractFileName
.– goodvibration
7 hours ago
1
Unless I'm mistaken, the Solidity compiler only accepts Solidity code as input.
– smarx
6 hours ago
@smarx Like in C Solidity has an assembler directive where you can write assembly. But in such directive, you still need to use solidity variables and you can’t be sure of the address of the instructions.
– user2284570
5 hours ago
@goodvibration do you know an online service for it?
– user2284570
5 hours ago
@user2284570 Yes, I'm aware that Solidity allows inline assembly, but you specifically said you weren't using Solidity.
– smarx
5 hours ago