vdAMM - Dependencies

Owned.sol

This is a solidity contract named 'Owned'. The contract establishes ownership of the contract and allows for the transfer of ownership. It defines a constructor and functions to nominate a new owner and to accept ownership. The contract also includes a modifier to restrict some functions to the current owner. It also emits events when ownership is nominated or changed to track these actions.

Owned

This contract establishes ownership of a contract, allows for the nomination of a new owner, and the acceptance of ownership by the nominated owner.

constructor

constructor (address _owner)

The constructor for the contract that sets the initial owner.

Parameters

  • _owner address: The initial owner of the contract.

Errors

  • Owner address cannot be 0: Emitted when the provided owner address is 0.

nominateNewOwner

nominateNewOwner(address _owner)

This function allows the current owner to nominate a new owner.

Parameters

  • _owner address: The address of the nominated owner.

acceptOwnership

acceptOwnership()

This function allows the nominated owner to accept ownership.

Errors

  • You must be nominated before you can accept ownership: Emitted when the sender is not the nominated owner.

onlyOwner

This modifier restricts function access to the current owner of the contract.

Errors

  • Only the contract owner may perform this action: Emitted when the sender is not the owner.
Previous
IERC20.sol