Developers
Search…
Deposit
The deposit function transfers and locks QBT into the locker, which results in giving qScore to the user. If the user already has an unexpired lock, the unlockTime argument is ignored and additional amount of QBT is appended to the locker.

QubitLocker

1
function deposit(uint amount, uint unlockTime) external;
Copied!
  • amount: The amount of QBT to be locked, in wei.
  • unlockTime: The time when the lock will be expired. It should be greater than current time and smaller than the maximum lockup period (2 years after from now). The unlockTime value might be round-down to meet a week-based granularity rule.

Solidity

1
QubitLocker qubitLocker = QubitLocker(<qubitLockerAddress>);
2
qubitLocker.deposit(<lockAmount>, <unlockTime>);
Copied!

Ethers.js

1
const qubitLocker = await ethers.getContractAt(<lockerABI>, <lockerAddress>);
2
await qubitLocker.deposit(<lockAmount>, <unlockTime>);
Copied!
Last modified 2mo ago