-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,372 additions
and
1,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,34 @@ | ||
{ | ||
"ABI version": 2, | ||
"version": "2.2", | ||
"header": ["time", "expire"], | ||
"functions": [ | ||
{ | ||
"name": "constructor", | ||
"inputs": [ | ||
{"name":"code","type":"cell"}, | ||
{"name":"params","type":"cell"}, | ||
{"name":"sendGasTo","type":"address"} | ||
], | ||
"outputs": [ | ||
] | ||
} | ||
], | ||
"data": [ | ||
{"key":1,"name":"root","type":"address"}, | ||
{"key":2,"name":"platformType","type":"uint8"}, | ||
{"key":3,"name":"initialData","type":"cell"}, | ||
{"key":4,"name":"platformCode","type":"cell"} | ||
], | ||
"events": [ | ||
], | ||
"fields": [ | ||
{"name":"_pubkey","type":"uint256"}, | ||
{"name":"_timestamp","type":"uint64"}, | ||
{"name":"_constructorFlag","type":"bool"}, | ||
{"name":"root","type":"address"}, | ||
{"name":"platformType","type":"uint8"}, | ||
{"name":"initialData","type":"cell"}, | ||
{"name":"platformCode","type":"cell"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
te6ccgECFwEAAj0AAgE0AwEBAcACAEPQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgBCSK7VMg4wMgwP/jAiDA/uMC8gsTBQQPA5jtRNDXScMB GaJ Gkh2zzTAAGegwjXGCD5AVj4QvkQ8qje0z8B EMhufK0IPgjgQPoqIIIG3dAoLnytPhj0x8B CO88rnTHwHbPPI8EQsGA1LtRNDXScMB GYi0NMD kAw GmpOADcIccA4wIh1w0f8rwh4wMB2zzyPBISBgEUIIIQP2FFnLrjAgcDejD4Qm7jAPhG8nMhldTU1NHQktTU4vpA0fhJ ErHBY6AjhT4ScjPhQjOgG/PQMmDBqYgtQf7AOJfA9s88gALCBYBCF8y2zwJAV74SsjO EvPCwfO E0BzPhMAczMIfsEAdAgizits1jHBZPXTdDe10zQ7R7tU8nbPAoABPACAhbtRNDXScIBjoDjDQ0MADrtRNDT/9M/0wAx kDTB9TU0fht Gz4a/hq GP4YgOIcO1E0PQFcSGAQPQOjoDfciKAQPQOb5GT1wsH3nMjgED0D46A33QkgED0D46A3/ht Gz4a/hqgED0DvK91wv/ GJw GMQDg4BAogPAAABAokRAEOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAr4RvLgTAIK9KQg9KEVFAAUc29sIDAuNjIuMAEYoAAAAAIw2zz4D/IAFgA2 E34TPhL Er4Q/hCyMv/yz/Pg87LB8zMye1U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,320 @@ | ||
.version sol 0.62.0 | ||
|
||
.macro constructor | ||
DROP | ||
GETGLOB 2 | ||
ISNULL | ||
IFREF { | ||
CALL $c4_to_c7_with_init_storage$ | ||
} | ||
GETGLOB 6 | ||
THROWIF 51 | ||
OVER | ||
PUSHCONT { | ||
LDREF | ||
LDREF | ||
LDREF | ||
ENDS | ||
CTOS | ||
} | ||
PUSHCONT { | ||
LDREF | ||
LDREF | ||
} | ||
IFELSE | ||
LDMSGADDR | ||
ENDS | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 13 | ||
GETGLOB 9 | ||
GETGLOB 10 | ||
SDEQ | ||
PUSHCONT { | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 16 | ||
BLKPUSH 3, 2 | ||
CALLREF { | ||
CALL $initialize_4c288c12_internal_macro$ | ||
} | ||
} | ||
PUSHCONT { | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 14 | ||
GETGLOB 9 | ||
NEWC | ||
STSLICECONST x42_ | ||
STSLICE | ||
PUSHINT 111 | ||
STZEROES | ||
ENDC | ||
PUSHPOW2 7 | ||
ADDCONST 32 | ||
UFITS 8 | ||
SENDRAWMSG | ||
} | ||
IFELSE | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 0 | ||
BLKDROP 3 | ||
.loc ../contracts/Platform.tsol, 0 | ||
CALLREF { | ||
CALL $c7_to_c4$ | ||
} | ||
THROW 0 | ||
|
||
.globl initialize_4c288c12_internal | ||
.type initialize_4c288c12_internal, @function | ||
CALL $initialize_4c288c12_internal_macro$ | ||
|
||
.macro initialize_4c288c12_internal_macro | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 24 | ||
GETGLOB 10 | ||
NEWC | ||
STSLICE | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 25 | ||
GETGLOB 11 | ||
STUR 8 | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 26 | ||
STSLICE | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 28 | ||
GETGLOB 13 | ||
SWAP | ||
STREF | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 29 | ||
GETGLOB 12 | ||
SWAP | ||
STREF | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 30 | ||
STREF | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 32 | ||
OVER | ||
SETCODE | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 33 | ||
SWAP | ||
CTOS | ||
DUP | ||
PUSHSLICE x8adb35 | ||
SDEQ | ||
PUSHCONT { | ||
PLDREFIDX 1 | ||
CTOS | ||
} | ||
IF | ||
PLDREF | ||
CTOS | ||
BLESS | ||
POP C3 | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 35 | ||
ENDC | ||
CALLREF { | ||
CALL $:onCodeUpgrade$ | ||
} | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 0 | ||
|
||
.internal-alias :onCodeUpgrade, 2 | ||
.internal :onCodeUpgrade | ||
DROP | ||
.loc ../node_modules/@broxus/contracts/contracts/platform/Platform.tsol, 0 | ||
CALLREF { | ||
CALL $c7_to_c4$ | ||
} | ||
COMMIT | ||
THROW 0 | ||
|
||
.macro c4_to_c7 | ||
PUSHROOT | ||
CTOS | ||
LDU 256 ; pubkey c4 | ||
LDU 64 ; pubkey timestamp c4 | ||
LDU 1 ; ctor flag | ||
NIP | ||
LDMSGADDR | ||
LDU 8 | ||
LDREF | ||
LDREF | ||
ENDS | ||
SETGLOB 13 | ||
SETGLOB 12 | ||
SETGLOB 11 | ||
SETGLOB 10 | ||
SETGLOB 3 | ||
SETGLOB 2 | ||
|
||
.macro c4_to_c7_with_init_storage | ||
PUSHROOT | ||
CTOS | ||
SBITS | ||
GTINT 1 | ||
PUSHCONT { | ||
PUSHINT 0 | ||
PUSHROOT | ||
CTOS | ||
PLDDICT ; D | ||
PUSHINT 1 | ||
OVER | ||
PUSHINT 64 | ||
DICTUGET | ||
PUSHCONT { | ||
PUSHREFSLICE { | ||
.blob x8000000000000000000000000000000000000000000000000000000000000000001_ | ||
} | ||
} | ||
IFNOT | ||
PUSHINT 2 | ||
PUSH S2 | ||
PUSHINT 64 | ||
DICTUGET | ||
ZEROSWAPIFNOT | ||
PUSHCONT { | ||
PLDU 8 | ||
} | ||
IF | ||
PUSHINT 3 | ||
PUSH S3 | ||
PUSHINT 64 | ||
DICTUGETREF | ||
PUSHCONT { | ||
PUSHREF { | ||
} | ||
} | ||
IFNOT | ||
PUSHINT 4 | ||
PUSH S4 | ||
PUSHINT 64 | ||
DICTUGETREF | ||
PUSHCONT { | ||
PUSHREF { | ||
} | ||
} | ||
IFNOT | ||
SETGLOB 13 | ||
SETGLOB 12 | ||
SETGLOB 11 | ||
SETGLOB 10 | ||
PUSHINT 64 | ||
DICTUGET | ||
THROWIFNOT 61 | ||
PLDU 256 | ||
SETGLOB 2 | ||
PUSHINT 0 ; timestamp | ||
SETGLOB 3 | ||
} | ||
IFREFELSE { | ||
CALL $c4_to_c7$ | ||
} | ||
|
||
.macro c7_to_c4 | ||
GETGLOB 13 | ||
GETGLOB 12 | ||
GETGLOB 11 | ||
GETGLOB 10 | ||
GETGLOB 3 | ||
GETGLOB 2 | ||
NEWC | ||
STU 256 | ||
STU 64 | ||
STONE | ||
STSLICE | ||
STU 8 | ||
STREF | ||
STREF | ||
ENDC | ||
POPROOT | ||
|
||
.macro upd_only_time_in_c4 | ||
PUSHROOT | ||
CTOS | ||
LDU 256 | ||
LDU 64 | ||
NIP | ||
GETGLOB 3 | ||
ROT | ||
NEWC | ||
STU 256 | ||
STU 64 | ||
STSLICE | ||
ENDC | ||
POPROOT | ||
|
||
.internal-alias :main_internal, 0 | ||
.internal :main_internal | ||
PUSHROOT | ||
CTOS | ||
SBITS | ||
NEQINT 1 | ||
SETGLOB 6 | ||
PUSH S2 | ||
CTOS | ||
LDU 4 ; bounced tail | ||
LDMSGADDR ; bounced src tail | ||
DROP | ||
SETGLOB 9 | ||
MODPOW2 1 | ||
IFRET | ||
OVER | ||
SEMPTY ; isEmpty | ||
IFJMPREF { | ||
GETGLOB 6 | ||
THROWIFNOT 76 | ||
} | ||
OVER | ||
LDUQ 32 ; [funcId] body' ok | ||
THROWIFNOT 60 | ||
OVER | ||
IFNOTJMPREF { | ||
GETGLOB 6 | ||
THROWIFNOT 76 | ||
} | ||
SWAP | ||
CALLREF { | ||
CALL $public_function_selector$ | ||
} | ||
THROW 60 | ||
|
||
.internal-alias :main_external, -1 | ||
.internal :main_external | ||
PUSHROOT | ||
CTOS | ||
SBITS | ||
NEQINT 1 | ||
SETGLOB 6 | ||
PUSHREFSLICE { | ||
.blob x8000000000000000000000000000000000000000000000000000000000000000001_ | ||
} | ||
SETGLOB 9 | ||
OVER | ||
CALLREF { | ||
CALL $c4_to_c7_with_init_storage$ | ||
} | ||
LDU 1 ; haveSign msgSlice | ||
SWAP | ||
PUSHCONT { | ||
PUSHPOW2 9 | ||
LDSLICEX ; signatureSlice msgSlice | ||
DUP | ||
HASHSU ; signatureSlice msgSlice hashMsgSlice | ||
ROT | ||
GETGLOB 2 | ||
CHKSIGNU ; msgSlice isSigned | ||
THROWIFNOT 40 | ||
} | ||
IF | ||
LDU 64 ; timestamp msgSlice | ||
SWAP | ||
CALL $replay_protection_macro$ | ||
LDU 32 ; expireAt msgSlice | ||
SWAP | ||
NOW ; msgSlice expireAt now | ||
GREATER ; msgSlice expireAt>now | ||
THROWIFNOT 57 | ||
LDU 32 ; funcId body | ||
SWAP | ||
CALLREF { | ||
CALL $public_function_selector$ | ||
} | ||
THROW 60 | ||
|
||
.macro public_function_selector | ||
DUP | ||
PUSHINT 1063339420 | ||
EQUAL | ||
IFJMPREF { | ||
CALL $constructor$ | ||
} | ||
|
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.