algo/testnet: Wormhole name fix (#1134)

* algo/testnet: Wormhole name fix

Co-authored-by: Evan Gray <battledingo@gmail.com>
This commit is contained in:
jumpsiegel 2022-04-29 20:19:30 -05:00 committed by GitHub
parent d54b883009
commit f69c74961b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View File

@ -122,7 +122,7 @@ gtxnsa Accounts 2
txna Accounts 2 txna Accounts 2
== ==
&& &&
pushint 483 // 483 pushint 506 // 506
&& &&
assert assert
bytec_3 // "currentGuardianSetIndex" bytec_3 // "currentGuardianSetIndex"
@ -485,7 +485,7 @@ store 15
txn GroupIndex txn GroupIndex
intc_1 // 0 intc_1 // 0
> >
pushint 403 // 403 pushint 422 // 422
&& &&
assert assert
txn GroupIndex txn GroupIndex
@ -496,7 +496,7 @@ load 10
gtxns NumAppArgs gtxns NumAppArgs
intc_1 // 0 intc_1 // 0
> >
pushint 405 // 405 pushint 425 // 425
&& &&
assert assert
load 10 load 10
@ -536,7 +536,7 @@ pushint 66 // 66
* *
+ +
== ==
pushint 474 // 474 pushint 497 // 497
&& &&
assert assert
intc_0 // 1 intc_0 // 1
@ -566,7 +566,7 @@ gtxnsa Accounts 2
txna Accounts 2 txna Accounts 2
== ==
&& &&
pushint 421 // 421 pushint 444 // 444
&& &&
assert assert
load 10 load 10
@ -609,7 +609,7 @@ len
extract3 extract3
load 18 load 18
== ==
pushint 438 // 438 pushint 461 // 461
&& &&
assert assert
load 15 load 15
@ -639,7 +639,7 @@ gtxnsa ApplicationArgs 3
load 16 load 16
== ==
&& &&
pushint 458 // 458 pushint 481 // 481
&& &&
assert assert
b main_l41 b main_l41
@ -655,7 +655,7 @@ load 20
getbit getbit
intc_1 // 0 intc_1 // 0
== ==
pushint 449 // 449 pushint 472 // 472
&& &&
assert assert
load 17 load 17

View File

@ -1514,6 +1514,8 @@ bnz main_l75
main_l70: main_l70:
load 30 load 30
callsub trimbytes_13 callsub trimbytes_13
pushbytes 0x2028576f726d686f6c6529 // " (Wormhole)"
concat
store 30 store 30
load 28 load 28
pushint 8 // 8 pushint 8 // 8

View File

@ -375,7 +375,7 @@ def approve_token_bridge(seed_amt: int, tmpl_sig: TmplSig, devMode: bool):
# Lets trim this... seems these are limited to 7 characters # Lets trim this... seems these are limited to 7 characters
Symbol.store(trim_bytes(Symbol.load())), Symbol.store(trim_bytes(Symbol.load())),
If (Len(Symbol.load()) > Int(7), Symbol.store(Extract(Symbol.load(), Int(0), Int(7)))), If (Len(Symbol.load()) > Int(7), Symbol.store(Extract(Symbol.load(), Int(0), Int(7)))),
Name.store(trim_bytes(Name.load())), Name.store(Concat(trim_bytes(Name.load()), Bytes(" (Wormhole)"))),
# Due to constrains on some supported chains, all token # Due to constrains on some supported chains, all token
# amounts passed through the token bridge are truncated to # amounts passed through the token bridge are truncated to