This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Tezos SmartPy contract deployment
Jonas Hals edited this page Jun 10, 2020
·
1 revision
Get set up with smartpy.io and the contract source code (https://smartpy.io/dev/?template=oracle.py).
Click the "Run" button in SmartPy. This populates the right column.
Go to the "Michelson" tab for each contract. This will show "Generated Michelson" with the tabs "Storage" and "Code".
Copy the code into a file $CONTRACT_NAME.tz
. Take note of the initial storage code (later referred as $INITIAL_STORAGE
).
We will originate/deploy these contracts using the tezos-client cli.
tezos-client --wait none originate contract $CONTRACT_NAME \
transferring 0 from $YOUR_ACCOUNT running $CONTRACT_NAME.tz \
--init '$INITIAL_STORAGE' \
--burn-cap 10 --force
A successful origination will end with something like this:
This origination was successfully applied
Originated contracts:
KT1CxSVG8NxNpt4u1sVWZ6wgX3ghDWpPmhFK
Storage size: 2385 bytes
Paid storage size diff: 2385 bytes
Consumed gas: 66149
Balance updates:
tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb ... -ꜩ2.385
tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb ... -ꜩ0.257
New contract KT1CxSVG8NxNpt4u1sVWZ6wgX3ghDWpPmhFK originated.
Contract memorized as Client.