Commit 6d99996a authored by ttt's avatar ttt
Browse files

clean up comments

parent 255548e1
......@@ -23,7 +23,7 @@ const redirectorType = "(contract (pair signature (pair string int)) unit)"
func main() {
flag.Parse()
//check for tezos-client
// check for tezos-client
if *verbose {
fmt.Println("Checking for tezos-client.")
}
......@@ -33,13 +33,13 @@ func main() {
return
}
//check for file with suffix from previous run
// check for file with suffix from previous run
if *verbose {
fmt.Println("Detecting previous runs.")
}
if _, err := os.Stat(".setup_automated_insurance_suffix"); os.IsNotExist(err) {
//try detecting suffix
// try detecting suffix
if *verbose {
fmt.Println("No information found, trying to detect existing identities leftover from previous runs.")
}
......@@ -57,7 +57,7 @@ func main() {
break
}
}
//create file
// create file
if *verbose {
fmt.Println("Creating a file with the suffix number used for previous run.")
}
......@@ -71,7 +71,7 @@ func main() {
}
}
//get suffix from previous run
// get suffix from previous run
b, err := ioutil.ReadFile(".setup_automated_insurance_suffix")
if err != nil {
log.Fatal(fmt.Errorf("trying to read suffix file: %v", err))
......@@ -82,7 +82,7 @@ func main() {
}
s := scanner.Text()
//check that s contains digits only
// check that s contains digits only
for _, c := range s {
if *debug {
fmt.Println("character:", c)
......@@ -93,7 +93,7 @@ func main() {
}
}
//increment suffix and write back to file
// increment suffix and write back to file
old, err := strconv.Atoi(s)
if err != nil {
log.Fatal(fmt.Errorf("converting suffix: %v", err))
......@@ -118,7 +118,8 @@ func main() {
redirectorContract := "redirectorContract" + n
placeholderRedirectorContract := "placeholderRedirectorContract" + n
//check whether identity with money exists
// check whether identity with money exists
// if *debug {
// fmt.Println("checking money contract")
// }
......@@ -180,8 +181,6 @@ func main() {
// originate oracle contract
// desktop@desktop:~/tezos$ sudo ./alphanet.sh client originate contract oracle for oracle transferring 5000 from money running oracle.tz -init '(Pair "edpkuTish1pKwLHyMze3JJ5TBEusWvu2GY7VMnJ5tnTtyRKjVmH8gc" {})'
if *verbose {
fmt.Println("Originating oracle contract.")
}
......@@ -229,8 +228,6 @@ func main() {
// originate placeholder redirector contract
// desktop@desktop:~/tezos$ sudo ./alphanet.sh client originate contract provider for provider transferring 5000 from money running provider.tz -init '(Pair (Pair (Pair "edpkuchHTFouFQewRqZNTrJ18Xzvvi4T6GGaeaj7JyCyD2hCXvVVTe" False) (Pair "TZ1tQSYQisn2EKLZy3ANWzjhZEEYc8aEhEg6" "TZ1muLzH2NB6MvkvaDJMBFvaqK6khXbEsTzu")) {})'
if *verbose {
fmt.Println("Originating placeholder redirector contract.")
}
......@@ -253,9 +250,6 @@ func main() {
// originate provider contract
// desktop@desktop:~/tezos$ sudo ./alphanet.sh client originate contract provider for provider transferring 5000 from money running provider.tz -init '(Pair (Pair (Pair "edpkuchHTFouFQewRqZNTrJ18Xzvvi4T6GGaeaj7JyCyD2hCXvVVTe" False) (Pair "TZ1tQSYQisn2EKLZy3ANWzjhZEEYc8aEhEg6" "TZ1muLzH2NB6MvkvaDJMBFvaqK6khXbEsTzu")) {})'
// provider key oracle redirector
if *verbose {
fmt.Println("Originating provider contract.")
}
......@@ -281,8 +275,6 @@ func main() {
// originate redirector contract
// desktop@desktop:~/tezos$ sudo ./alphanet.sh client originate contract redirector for provider transferring 5000 from money running redirector.tz -init '(Pair "edpkuchHTFouFQewRqZNTrJ18Xzvvi4T6GGaeaj7JyCyD2hCXvVVTe" "TZ1muLzH2NB6MvkvaDJMBFvaqK6khXbEsTzu")'
if *verbose {
fmt.Println("Originating redirector contract.")
}
......@@ -322,8 +314,6 @@ func main() {
// init provider with redirector address
// desktop@desktop:~/tezos$ sudo ./alphanet.sh client transfer 0 from money to provider -arg '(Left (Right (Right (Pair "40717e32cd584b81e1de85d0331b7107425ac893783ccae2a78b4207cab22a404b8e6309b44a6e05a0463483f37e9b408c61443e411eaed64db4a7a402918e06" "TZ1oMrpyikUHdnP1AQvAvGaYnPwTJiVb3NWr"))))'
if *verbose {
fmt.Println("Initializing provider contract.")
fmt.Println("The initialization is done by sending a transaction to the provider contract, that contains the address and the signature above.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment