Skip to content

Commit

Permalink
Add OpenZeppelin mint signature
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
  • Loading branch information
awrichar committed May 12, 2023
1 parent 6c9eb67 commit b562df3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/tokens/erc1155.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,23 @@ export const DynamicMethods: Record<TokenOperation, MethodSignature[]> = {
return undefined;
},
},
{
// Source: OpenZeppelin extension
name: 'mint',
inputs: [{ type: 'address' }, { type: 'uint256' }, { type: 'uint256' }, { type: 'bytes' }],
map: (poolLocator: PoolLocator, dto: TokenMint) => {
if (poolLocator.isFungible) {
return [dto.to, packTokenId(poolLocator), dto.amount, encodeHex(dto.data ?? '')];
} else {
return [
dto.to,
packTokenId(poolLocator, dto.tokenIndex),
dto.amount,
encodeHex(dto.data ?? ''),
];
}
},
},
],

transfer: [
Expand Down

0 comments on commit b562df3

Please sign in to comment.