Skip to content

Commit

Permalink
Fix double new line encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Mar 22, 2024
1 parent c366c30 commit ac99073
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,19 @@ def get_abi_by_filename(fname: str) -> dict:
new_line_escaped_msg = TRADING_STRATEGY_ACCEPTANCE_MESSAGE.format(
version=version,
date=date,
).replace("\n", "\\n")
)

acceptance_message_hash = get_signing_hash(new_line_escaped_msg)
acceptance_message = f"{new_line_escaped_msg}"
terms_of_service_version = str(version)
gas = web3.eth.get_balance(account.address) / 10**18

new_line = "\n"
escaped_new_line = "\\n"

print(f"Deployer: {account.address}")
print(f"Contract: {contract.address}")
print(f"Acceptance message: {acceptance_message}")
print(f"Acceptance message: {acceptance_message.replace(new_line, escaped_new_line)}")
print(f"Acceptance hash: {acceptance_message_hash.hex()}")
print(f"Version: {version}")
print(f"Date: {date}")
Expand Down

0 comments on commit ac99073

Please sign in to comment.