Comparing version 0.1.0-beta.0 to 0.1.0-beta.1
@@ -25,6 +25,6 @@ import type algosdk from 'algosdk'; | ||
declare enum CallConfig { | ||
NEVER = 0, | ||
CALL = 1, | ||
CREATE = 2, | ||
ALL = 3 | ||
NEVER = "NEVER", | ||
CALL = "CALL", | ||
CREATE = "CREATE", | ||
ALL = "ALL" | ||
} | ||
@@ -31,0 +31,0 @@ export interface OnCompleteCallConfig { |
@@ -21,6 +21,6 @@ "use strict"; | ||
(function (CallConfig) { | ||
CallConfig[CallConfig["NEVER"] = 0] = "NEVER"; | ||
CallConfig[CallConfig["CALL"] = 1] = "CALL"; | ||
CallConfig[CallConfig["CREATE"] = 2] = "CREATE"; | ||
CallConfig[CallConfig["ALL"] = 3] = "ALL"; | ||
CallConfig["NEVER"] = "NEVER"; | ||
CallConfig["CALL"] = "CALL"; | ||
CallConfig["CREATE"] = "CREATE"; | ||
CallConfig["ALL"] = "ALL"; | ||
})(CallConfig || (CallConfig = {})); | ||
@@ -27,0 +27,0 @@ var AVMType; |
@@ -17,6 +17,6 @@ export function getHint(spec, method) { | ||
(function (CallConfig) { | ||
CallConfig[CallConfig["NEVER"] = 0] = "NEVER"; | ||
CallConfig[CallConfig["CALL"] = 1] = "CALL"; | ||
CallConfig[CallConfig["CREATE"] = 2] = "CREATE"; | ||
CallConfig[CallConfig["ALL"] = 3] = "ALL"; | ||
CallConfig["NEVER"] = "NEVER"; | ||
CallConfig["CALL"] = "CALL"; | ||
CallConfig["CREATE"] = "CREATE"; | ||
CallConfig["ALL"] = "ALL"; | ||
})(CallConfig || (CallConfig = {})); | ||
@@ -23,0 +23,0 @@ export var AVMType; |
@@ -25,6 +25,6 @@ import type algosdk from 'algosdk'; | ||
declare enum CallConfig { | ||
NEVER = 0, | ||
CALL = 1, | ||
CREATE = 2, | ||
ALL = 3 | ||
NEVER = "NEVER", | ||
CALL = "CALL", | ||
CREATE = "CREATE", | ||
ALL = "ALL" | ||
} | ||
@@ -31,0 +31,0 @@ export interface OnCompleteCallConfig { |
{ | ||
"name": "beaker-ts", | ||
"version": "0.1.0-beta.0", | ||
"version": "0.1.0-beta.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -11,14 +11,18 @@ # Beaker Typescript Client Generator | ||
import json | ||
import pyteal as pt | ||
from beaker import Application | ||
# Create your Application with Beaker | ||
class HelloBeaker(Application): | ||
@external | ||
def hello(self, name: abi.String, *, output: abi.String): | ||
return output.set(Concat(Bytes("Hello, "), name.get())) | ||
# Create a new Application | ||
hello_app = Application("HelloBeaker") | ||
# Add method handler | ||
@hello_app.external | ||
def hello(name: pt.abi.String, *, output: pt.abi.String) -> pt.Expr: | ||
# Set output to the result of `Hello, `+name | ||
return output.set(pt.Concat(pt.Bytes("Hello, "), name.get())) | ||
if __name__ == "__main__": | ||
# Writes contract.json, HelloBeaker.json, approval.teal, and clear.teal | ||
# to the `artifacts` directory | ||
HelloBeaker().dump("artifacts") | ||
hello_app.build().export("artifacts") | ||
``` | ||
@@ -25,0 +29,0 @@ |
@@ -45,6 +45,6 @@ import type algosdk from 'algosdk'; | ||
enum CallConfig { | ||
NEVER = 0, | ||
CALL, | ||
CREATE, | ||
ALL, | ||
NEVER = 'NEVER', | ||
CALL = 'CALL', | ||
CREATE = 'CREATE', | ||
ALL = 'ALL', | ||
} | ||
@@ -51,0 +51,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
337145
98