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

Minor changes #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Install the dependencies and build

```sh
pnpm i
yarn build
pnpm build
acenolaza marked this conversation as resolved.
Show resolved Hide resolved
```

Test the contracts and get test coverage
Expand All @@ -25,4 +25,6 @@ BENEFICIARY=0x07b589f06bD0A5324c4E2376d66d2F4F25921DE1 \
pnpm print-irrevocable-vesting-address
```

_It is required that you also have a MNEMONIC environment variable set before runnning this script_

acenolaza marked this conversation as resolved.
Show resolved Hide resolved
See the [`beneficiary` guide](./beneficiary-guide.md) for instructions
12 changes: 4 additions & 8 deletions contracts/IrrevocableVesting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ contract IrrevocableVesting is IIrrevocableVesting {
_;
}

/// @dev This contract is means to be an implementation for
/// IrrevocableVestingFactory to clone. To prevent the implementation from
/// being used, the contract is rendered uninitializable.
/// @dev This contract is meant to serve as an implementation for
/// IrrevocableVestingFactory to clone. To prevent the implementation
/// from being used, the contract is rendered uninitializable.
acenolaza marked this conversation as resolved.
Show resolved Hide resolved
/// @param api3Token_ Api3Token address
constructor(address api3Token_) {
require(api3Token_ != address(0), "Api3Token address zero");
Expand Down Expand Up @@ -83,11 +83,7 @@ contract IrrevocableVesting is IIrrevocableVesting {
"Balance is not vesting amount"
);
beneficiary = beneficiary_;
vesting = Vesting({
startTimestamp: startTimestamp,
endTimestamp: endTimestamp,
amount: amount
});
vesting = Vesting(startTimestamp, endTimestamp, amount);
acenolaza marked this conversation as resolved.
Show resolved Hide resolved
}

/// @notice Called by the beneficiary to withdraw as many tokens the
Expand Down
2 changes: 1 addition & 1 deletion deploy/1_deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = async () => {
log(`Deploying example IrrevocableVesting at ${exampleIrrevocableVestingAddress}`);
const api3Token = new ethers.Contract(api3TokenAddress, ERC20__factory.abi, deployer) as unknown as ERC20;
if ((await api3Token.allowance(deployer!.address, irrevocableVestingFactoryAddress)) < exampleVesting.amount) {
log('Approving 1 (Wei) API3 to IrrevocableVestingFactory');
log(`Approving ${exampleVesting.amount} (Wei) API3 to IrrevocableVestingFactory`);
acenolaza marked this conversation as resolved.
Show resolved Hide resolved
await api3Token.approve(irrevocableVestingFactoryAddress, exampleVesting.amount);
}
const irrevocableVestingFactory = new ethers.Contract(
Expand Down
Loading