Skip to content

Instantly share code, notes, and snippets.

@charlietilt
Created May 26, 2022 15:20
Show Gist options
  • Save charlietilt/74c60062993a0e7f1a251e32ad38339b to your computer and use it in GitHub Desktop.
Save charlietilt/74c60062993a0e7f1a251e32ad38339b to your computer and use it in GitHub Desktop.
const { expect } = require('chai');
const { starknet } = require('hardhat');
describe.only('Foo contract', function () {
let account;
let accountAddress;
let contract;
before(async function () {
console.info('deploying account...');
account = await starknet.deployAccount('OpenZeppelin');
accountAddress = BigInt(account.starknetContract.address);
console.info('deploying contract...');
const contractFactory = await starknet.getContractFactory('Foo');
contract = await contractFactory.deploy();
});
describe('get_caller', function () {
it('should return the caller address', async function () {
const result = await account.call(contract, 'get_caller');
console.info('result: ', result)
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment