Sample of storage-driven upgradeable contract.
Version: 1
import Control.Concurrent | |
import qualified Data.Text as T | |
import GHC.IO.Handle | |
import System.Process | |
getFileContent :: IO T.Text | |
getFileContent = withCreateProcess (proc "cat" ["very-big-file.txt"]){ std_out = CreatePipe } | |
\_mStdin mStdout _mStderr phandler -> | |
case mStdout of | |
Nothing -> error "No handler" |
Code revision: a53685a (Mon Feb 24 02:53:34 2020 +0300)
This documentation describes a smart contract which implements
FA1.2 interface.
This contract also maintains an entity called administrator which has an exclusive right to perform management operations like Mint
and Pause
.
Sample of storage-driven upgradeable contract.
Version: 1
This contract uses upgradeability approach described here. This mechanism provides adminstrator-forced address-preserving upgradeability
This documentation describes a smart contract which implements
FA1.2 interface.
This contract also maintains an entity called administrator which has an exclusive right to perform management operations like Mint
and Pause
.
This version targets Athens release of Tezos and implements the approach proposed in the relevant section of FA1.2.1.
class HelloWorld: | |
def __init__(self, name): | |
self.name = name.capitalize() | |
def sayHi(self): | |
print "Hello " + self.name + "!" | |
hello = HelloWorld("world") | |
hello.sayHi() |
This contract implements a smart contract which implements
FA1.2 interface.
This contract also maintains an entity called administrator which has an exclusive right to perform management operations like Mint
and Pause
.
This version targets Athens release of Tezos and implements the approach proposed in the relevant section of FA1.2.1.
parameter (or (pair %transfer address (pair address (nat :val))) (or (pair %approve address nat) (or (pair %getBalance address (contract (pair address (option nat)))) (or (pair %getAllowance (pair address address) (contract (pair (pair address address) (option nat)))) (or (pair %getTotalSupply unit (contract (pair unit (option nat)))) (or (bool %setPause) (or (address %setManager)
{"swagger":"2.0","info":{"contact":{"email":"hi@serokell.io","url":"https://serokell.io","name":"Serokell OÜ"},"termsOfService":"https://disciplina.io/tnc.pdf","version":"1.0.0","title":"Disciplina Educator API","license":{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","name":"Apache 2.0"}},"host":"127.0.0.1:8090","basePath":"/api/educator/v1","schemes":["http","https"],"paths":{"/status":{"get":{"tags":["General"],"produces":["application/json;charset=utf-8"],"responses":{"200":{"schema":{"$ref":"#/definitions/EducatorInfo"},"description":"Successfull operation"},"401":{"$ref":"#/responses/Unauthorized"}}}},"/students":{"get":{"tags":["Students"],"summary":"Get a list of all registered students' addresses","produces":["application/json;charset=utf-8"],"parameters":[{"default":false,"in":"query","name":"onlyCount","allowEmptyValue":true,"type":"boolean","description":"If this parameter is present, return only the total count of items."},{"format":"int32","required":false,"in":"query","name":"offset", |