Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset lock contract plus test base #13

Merged
merged 10 commits into from
Nov 17, 2021

Conversation

palmerss
Copy link
Collaborator

No description provided.

@palmerss palmerss linked an issue Nov 17, 2021 that may be closed by this pull request
def fund_account(address, initial_funds=2000000):
test_config = load_test_config('./test/testConfig.json')
client = get_algod_client(test_config['algodToken'], test_config['algodAddress'])
private_key = mnemonic.to_private_key(test_config['fund_account_Mnemonic'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config key isn't in the current test config template - however I think it would make more sense to pass in the mnemonic in the args

test_config = load_test_config('./test/testConfig.json')
client = get_algod_client(test_config['algodToken'], test_config['algodAddress'])
private_key = mnemonic.to_private_key(test_config['fund_account_Mnemonic'])
public_key = test_config['fund_account_public_key']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here we should pass in the public key so any account can be funded



def test_on_setup(self, app_id, wallet_1, asset_id, client):
from akita_inu_asa_utils import noop_app_signed_txn, wait_for_txn_confirmation, getApplicationAddress, \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from akita_inu_asa_utils import (
noop_app_signed_txn,
wait_for_txn_confirmation,
getApplicationAddress
)

assert os.path.exists('./build/globalSchema')

def test_deploy(self, app_id, client, asset_id, wallet_1):
from akita_inu_asa_utils import getApplicationAddress, \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from akita_inu_asa_utils import (
getApplicationAddress,
payment_signed_txn,
wait_for_txn_confirmation
)

@palmerss palmerss merged commit 872ddd0 into OfficialAkitaInu:development Nov 17, 2021
@palmerss palmerss added this to Done in smartContracts Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Build a smart contract to lock funds over a time period
2 participants