9 #include <tvm/schema/message.hpp>
10 #include <tvm/smart_switcher.hpp>
11 #include <tvm/contract_handle.hpp>
12 #include <tvm/replay_attack_protection/timestamp.hpp>
15 #include "bind_info.hpp"
19 static constexpr
unsigned FLEX_CLIENT_TIMESTAMP_DELAY = 1800;
20 using flex_client_replay_protection_t = replay_attack_protection::timestamp<FLEX_CLIENT_TIMESTAMP_DELAY>;
33 cell flex_client_code,
35 cell user_id_index_code,
44 using IFlexClientStubPtr = handle<IFlexClientStub>;
65 static std::pair<StateInit, uint256> execute(
DFlexClientStub data, cell code) {
66 auto init_hdr = persistent_data_header<IFlexClientStub, flex_client_replay_protection_t>::init();
67 cell data_cl = prepare_persistent_data<IFlexClientStub, flex_client_replay_protection_t>(init_hdr, data);
68 StateInit init { {}, {}, code, data_cl, {} };
69 cell init_cl = build(init).make_cell();
70 return { init, uint256(tvm_hash(init_cl)) };
FlexClientStub persistent data struct.
Definition: FlexClientStub.hpp:47
uint256 owner_
Owner's public key. Used for address calculation.
Definition: FlexClientStub.hpp:48
optcell auth_index_code_
AuthIndex code (no salt)
Definition: FlexClientStub.hpp:51
opt< bind_info > binding_
Binding info for exchange.
Definition: FlexClientStub.hpp:53
FlexVersion ex_triplet_
Ex-version triplet (initialized during code upgrade)
Definition: FlexClientStub.hpp:50
optcell user_id_index_code_
UserIdIndex code (unsalted)
Definition: FlexClientStub.hpp:52
FlexVersion triplet_
Version triplet.
Definition: FlexClientStub.hpp:49
FlexClientStub events interface.
Definition: FlexClientStub.hpp:58
Definition: FlexClientStub.hpp:22
Flex version triplet.
Definition: FlexVersion.hpp:14
FlexClientStub is a placement contract to be setcoded to an actual FlexClient.
Definition: FlexClientStub.hpp:27
resumable< void > unused()
void onDeploy(FlexVersion triplet, bind_info binding, cell flex_client_code, cell auth_index_code, cell user_id_index_code, bytes signature)
Deploy notification.
Binding to allow orders only to specific flex root and with specific unsalted PriceXchg code hash.
Definition: bind_info.hpp:8