#pragma version 2
int VAR_TMPL_AMOUNT
txn Amount
==
int 1
return
.....
In this code, VAR_TMPL_AMOUNT was given by the user, how to pass this input by using javascript SDK during compiling a program. Can anyone please help me to solve this?
const t = "... TMPL_REPLACE_ME ..." // the string representation of the TEAL source
t.replace('TMPL_REPLACE_ME', 'the_value_i_want') // Replaces the tmpl variable with a concrete value
//compile as normal