Skip to content

Commit

Permalink
feat: Update contract.py.j2 templates
Browse files Browse the repository at this point in the history
- Updated the `hello` method in the `contract.py.j2` template files to return a modified greeting message.
- The greeting message now includes a comma after "Hello" for better readability and clarity.
  • Loading branch information
aorumbayev committed Dec 19, 2023
1 parent d78457a commit a894e76
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ describe('{{ contract_name.split('_')|join(' ') }} contract', () => {
algod,
)
await client.deploy({
allowDelete: true,
allowUpdate: true,
onSchemaBreak: 'replace',
onUpdate: 'update',
onSchemaBreak: 'append',
onUpdate: 'append',
})
return { client }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class CoolContract(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class HelloWorld(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class CoolContract(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class HelloWorld(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ describe('hello world contract', () => {
algod,
)
await client.deploy({
allowDelete: true,
allowUpdate: true,
onSchemaBreak: 'replace',
onUpdate: 'update',
onSchemaBreak: 'append',
onUpdate: 'append',
})
return { client }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class CoolContract(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class HelloWorld(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ from puyapy.arc4 import String, abimethod
class {{ contract_name.split('_')|map('capitalize')|join }}(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class CoolContract(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class HelloWorld(ARC4Contract):
@abimethod()
def hello(self, name: String) -> String:
return String.encode(Bytes(b"Hello ") + name.decode())
return String.encode(Bytes(b"Hello, ") + name.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ describe('hello world contract', () => {
algod,
)
await client.deploy({
allowDelete: true,
allowUpdate: true,
onSchemaBreak: 'replace',
onUpdate: 'update',
onSchemaBreak: 'append',
onUpdate: 'append',
})
return { client }
}
Expand Down

0 comments on commit a894e76

Please sign in to comment.