Releases: vittominacori/erc1363-payable-token
Releases · vittominacori/erc1363-payable-token
v6.3.0
v6.2.1
What's Changed
- update dependencies
- fix typo in interface name (docs)
Full Changelog: v6.2.0...v6.2.1
v6.2.0
What's Changed
- feat: add mint and call by @vittominacori in #35
_mintAndCall
is an internal method, and it should be called from derived contract.
For instance, you may choose to check if the receiver is a contract or an EOA and call the _mint
method instead.
pragma solidity ^0.8.20;
// other imports
import "erc-payable-token/contracts/token/ERC1363/extensions/ERC1363Mintable.sol";
contract MyToken is ERC1363Mintable, Ownable {
// your stuff
function safeMint(address account, uint256 value, bytes memory data) public onlyOwner {
if (account.code.length == 0) {
_mint(account, value);
} else {
_mintAndCall(account, value, data);
}
}
// your stuff
}
Full Changelog: v6.1.0...v6.2.0
v6.1.0
What's Changed
- feat: update internal hook name
- chore(deps-dev): bump braces from 3.0.2 to 3.0.3 by @dependabot in #31
- chore(deps): bump axios from 1.6.7 to 1.7.5 by @dependabot in #32
Full Changelog: v6.0.0...v6.1.0
v6.0.0
What's Changed
- feat: add ERC1363Payable contract as example
- feat: add ERC20 tests against ERC1363
- feat: rename owner to initialHolder to avoid confusion
- feat: move ERC1363Guardian to presets
- chore: remove truffle
- chore: bump version
- fix(ci): temp disable slither pragma detector d4ea674
NOTE
ERC1363Guardian
, has been moved from examples
to presets
.
If you used ERC1363Guardian
update your contracts with the new path. You MUST also implements _transferReceived
and _approvalReceived
.
pragma solidity ^0.8.20;
-import {ERC1363Guardian} from "erc-payable-token/contracts/examples/ERC1363Guardian.sol";
+import {ERC1363Guardian} from "erc-payable-token/contracts/presets/ERC1363Guardian.sol";
contract MyContract is ERC1363Guardian {
// your stuff
+ function _transferReceived(address token, address operator, address from, uint256 value, bytes calldata data) internal override {
+ // your stuff
+ }
+ function _approvalReceived(address token, address owner, uint256 value, bytes calldata data) internal override {
+ // your stuff
+ }
}
Full Changelog: v5.4.0...v6.0.0
v5.4.0
What's Changed
- chore: update dependencies and solc
- feat: move docs to vitepress by @vittominacori in #26
Full Changelog: v5.3.0...v5.4.0
v5.3.0
What's Changed
- update node to v20 and solc to v0.8.24
- chore: update solidity-coverage
- chore(deps-dev): bump ip from 1.1.8 to 1.1.9 by @dependabot in #24
- chore(deps-dev): bump undici from 5.28.2 to 5.28.3 by @dependabot in #23
- chore(deps): bump @openzeppelin/contracts from 5.0.1 to 5.0.2 by @dependabot in #25
Full Changelog: v5.2.0...v5.3.0
v5.2.0
What's Changed
- feat: check erc20 return behavior by @vittominacori in #22
Full Changelog: v5.1.7...v5.2.0
v5.1.7
Fix a typo.
v5.1.6
Update return values docs.
Full Changelog: v5.1.5...v5.1.6