Skip to content

Commit

Permalink
Fix contract code
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekjain23 committed Jun 14, 2024
1 parent 636bd7d commit 2cdfb5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ pragma solidity ^0.8.0;
import "@iota/iscmagic/ISC.sol";
contract NativeToken {
contract MyNativeToken {
function nativeTokenID(uint32 _foundrySN) public view returns (bytes memory) {
ERC20NativeTokens token = ERC20NativeTokens(
ISC.sandbox.erc20NativeTokensAddress(_foundrySN)
);
ISC.NativeTokenID memory id = token.nativeTokenID();
NativeTokenID memory id = token.nativeTokenID();
return id.data;
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ contract NativeTokenMinter {
function mintNativeTokens(uint32 _foundrySN, uint _amount, uint64 _storageDeposit) public payable {
require(msg.value == _storageDeposit * (10 ** 12), "Please send exact funds to pay for storage deposit");
ISC.ISCAssets memory allowance;
ISCAssets memory allowance;
allowance.baseTokens = _storageDeposit;
ISC.accounts.mintNativeTokens(_foundrySN, _amount, allowance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ contract ERC20NativeTokenRegistry {
ISCAssets memory allowance;
allowance.baseTokens = _storageDeposit;
ISC.registerERC20NativeToken(_foundrySN, _name, _symbol, _decimals, allowance);
address erc20address = ISC.erc20NativeTokensAddress(_foundrySN);
ISC.sandbox.registerERC20NativeToken(_foundrySN, _name, _symbol, _decimals, allowance);
address erc20address = ISC.sandbox.erc20NativeTokensAddress(_foundrySN);
emit ERC20Address(erc20address);
}
}
Expand Down

0 comments on commit 2cdfb5c

Please sign in to comment.