Compile script
Body
codestringRequired
Responses
200
Ok
application/json
400
BadRequest
application/json
401
Unauthorized
application/json
404
NotFound
application/json
500
InternalServerError
application/json
503
ServiceUnavailable
application/json
post
POST /contracts/compile-script HTTP/1.1
Host: alephium.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 192
{
"code": "TxScript Main { let token = Token(#36cdbfabca2d71622b6) token.withdraw(@1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y, 1024) }",
"compilerOptions": {
"ignoreUnusedConstantsWarnings": true
}
}
{
"version": "v0.0.1",
"name": "Main",
"bytecodeTemplate": "35d1b2a520a0da34c5eb8d712aa9cc",
"bytecodeDebugPatch": "=1-1+ef",
"fields": {
"names": [
"aa",
"bb",
"cc",
"dd",
"ee"
],
"types": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"isMutable": [
false,
true,
false,
true,
false
]
},
"functions": [
{
"name": "bar",
"usePreapprovedAssets": false,
"useAssetsInContract": false,
"isPublic": true,
"paramNames": [
"a",
"b",
"c",
"d",
"e"
],
"paramTypes": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"paramIsMutable": [
false,
true,
false,
true,
false
],
"returnTypes": [
"U256",
"I256",
"ByteVec",
"Address"
]
}
],
"warnings": [
"Found unused field in Foo: a"
]
}