Skip to content

Commit 4628fba

Browse files
committed
Publish latest contracts and artifacts
1 parent a87a1ae commit 4628fba

File tree

57 files changed

+10001
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10001
-982
lines changed

contracts/CarbonOffsetBatches.sol

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,11 @@ contract CarbonOffsetBatches is
647647
function _beforeTokenTransfer(
648648
address from,
649649
address to,
650-
uint256 amount
650+
uint256 amount,
651+
uint256 batchSize
651652
) internal virtual override {
652653
onlyUnpaused();
653-
super._beforeTokenTransfer(from, to, amount);
654+
super._beforeTokenTransfer(from, to, amount, batchSize);
654655
}
655656

656657
/// @notice Append a comment to a Batch-NFT
@@ -682,16 +683,17 @@ contract CarbonOffsetBatches is
682683
/// @param serialNumber Serial number of the carbon credits to be tokenized
683684
/// @param quantity Quantity to be tokenized in 1e18 format, greater than 0
684685
/// @param projectVintageTokenId The token ID of the vintage
686+
/// @return tokenId The token ID of the newly minted batch
685687
function tokenize(
686688
address recipient,
687689
string calldata serialNumber,
688690
uint256 quantity,
689691
uint256 projectVintageTokenId
690-
) external {
692+
) external returns (uint256 tokenId) {
691693
onlyUnpaused();
692694
onlyWithRole(TOKENIZER_ROLE);
693695
// Prepare and confirm batch
694-
uint256 tokenId = _mintEmptyBatch(address(this), recipient);
696+
tokenId = _mintEmptyBatch(address(this), recipient);
695697
_updateSerialAndQuantity(tokenId, serialNumber, quantity);
696698
_linkWithVintage(tokenId, projectVintageTokenId);
697699
_confirmBatch(tokenId);

0 commit comments

Comments
 (0)