Skip to content

Commit

Permalink
chore: add strict checks
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-llimos committed Oct 5, 2023
1 parent 57a3234 commit 4c7c4be
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions scripts/deploy_tokenVestings.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def main():
governor = os.environ["GOV_KEY"]
sc_gateway_address = os.environ["SC_GATEWAY_ADDRESS"]
flip_address = os.environ["FLIP_ADDRESS"]
stMinter_address = os.environ.get("ST_MINTER_ADDRESS")
stBurner_address = os.environ.get("ST_BURNER_ADDRESS")
stFlip_address = os.environ.get("ST_FLIP_ADDRESS")
stMinter_address = os.environ["ST_MINTER_ADDRESS"]
stBurner_address = os.environ["ST_BURNER_ADDRESS"]
stFlip_address = os.environ["ST_FLIP_ADDRESS"]

flip = FLIP.at(f"0x{cleanHexStr(flip_address)}")

Expand Down Expand Up @@ -95,29 +95,22 @@ def main():
elif lockup_type == options_lockup_type[2]:
continue
else:
continue
# raise Exception(f"Incorrect lockup type parameter {lockup_type}")
raise Exception(f"Incorrect lockup type parameter {lockup_type}")

beneficiary = row[columns.index("Beneficiary Wallet Address")]
amount = int(row[columns.index("# tokens")].replace(",", ""))
transferable = row[
columns.index("Address transfer enabled in smart contract?")
]

# assert web3.isAddress(beneficiary), f"Incorrect beneficiary address {beneficiary}"

# To remove
validAddress = web3.isAddress(beneficiary)
if not validAddress:
continue
assert web3.isAddress(beneficiary), f"Incorrect beneficiary address {beneficiary}"

if transferable in ["yes", "Yes"]:
transferable = True
elif transferable in ["no", "No"]:
transferable = False
else:
continue
# raise Exception(f"Incorrect transferability parameter {transferable}")
raise Exception(f"Incorrect transferability parameter {transferable}")

vesting_list.append([beneficiary, amount, lockup_type, transferable])

Expand Down

0 comments on commit 4c7c4be

Please sign in to comment.