-
Notifications
You must be signed in to change notification settings - Fork 7
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
added ImmutablePoolCreator contract #225
base: main
Are you sure you want to change the base?
Conversation
Summary by OctaneNew Contracts
Updated ContractsNo contracts were updated in this PR. 🔗 Commit Hash: 98cafec |
Thanks @mikechaban ! This is great. But it is lacking tests - could you please add tests, as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of nesting security/terminus. Create a folder in staker as auxiliary. Nesting should be ../contracts/staker/auxiliary
@@ -0,0 +1,45 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.0; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import IStaker.sol from the interface folder.
StakerInterface staker = StakerInterface(stakerAddress); | ||
|
||
// sender as the administrator | ||
staker.createPool(tokenType, tokenAddress, tokenID, transferable, lockupSeconds, cooldownSeconds, msg.sender); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can set msg.sender as null address in pool creation to reduce gas useage
// sender as the administrator | ||
staker.createPool(tokenType, tokenAddress, tokenID, transferable, lockupSeconds, cooldownSeconds, msg.sender); | ||
|
||
// 0 address as the administrator to make the pool immutable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unknown poolID Call will fail.
Created the ImmutablePoolCreator contract in the terminus directory. It creates a staking pool on the Staker contract and transfers the administrator to the 0 address