Skip to content

Commit

Permalink
Merge branch 'main' into feat/service-upgrade-test
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth authored Nov 3, 2023
2 parents 48915fd + d8c3ae3 commit dc19ba9
Show file tree
Hide file tree
Showing 20 changed files with 421 additions and 915 deletions.
6 changes: 3 additions & 3 deletions contracts/interchain-token-service/InterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ExpressExecutorTracker } from '@axelar-network/axelar-gmp-sdk-solidity/
import { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';
import { Create3Address } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create3Address.sol';
import { SafeTokenTransferFrom } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';
import { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol';
import { StringToBytes32, Bytes32ToString } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/Bytes32String.sol';
import { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol';
import { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol';
Expand All @@ -22,7 +23,6 @@ import { IInterchainTokenExpressExecutable } from '../interfaces/IInterchainToke
import { ITokenManager } from '../interfaces/ITokenManager.sol';
import { IERC20Named } from '../interfaces/IERC20Named.sol';

import { AddressBytesUtils } from '../libraries/AddressBytesUtils.sol';
import { Operatable } from '../utils/Operatable.sol';

/**
Expand All @@ -42,8 +42,8 @@ contract InterchainTokenService is
{
using StringToBytes32 for string;
using Bytes32ToString for bytes32;
using AddressBytesUtils for bytes;
using AddressBytesUtils for address;
using AddressBytes for bytes;
using AddressBytes for address;
using SafeTokenTransferFrom for IERC20;

address internal immutable implementationLockUnlock;
Expand Down
18 changes: 0 additions & 18 deletions contracts/interfaces/ICanonicalTokenRegistrar.sol

This file was deleted.

37 changes: 0 additions & 37 deletions contracts/interfaces/IStandardizedTokenRegistrar.sol

This file was deleted.

67 changes: 67 additions & 0 deletions contracts/interfaces/ITokenRegistrar.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ITokenRegistrar {
error ZeroAddress();
error NotDistributor(address distributor);
error NotOperator(address operator);
error NonZeroMintAmount();
error ApproveFailed();

function chainNameHash() external view returns (bytes32);

function standardizedTokenSalt(bytes32 chainAddressHash_, address deployer, bytes32 salt) external view returns (bytes32);

function standardizedTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId);

function interchainTokenAddress(address deployer, bytes32 salt) external view returns (address tokenAddress);

function deployInterchainToken(
bytes32 salt,
string calldata name,
string calldata symbol,
uint8 decimals,
uint256 mintAmount,
address distributor,
address operator
) external payable;

function deployRemoteInterchainToken(
string calldata originalChainName,
bytes32 salt,
address additionalDistributor,
address optionalOperator,
string memory destinationChain,
uint256 gasValue
) external payable;

function canonicalTokenSalt(bytes32 chainAddressHash_, address tokenAddress) external view returns (bytes32 salt);

function canonicalTokenId(address tokenAddress) external view returns (bytes32 tokenId);

function registerCanonicalToken(address tokenAddress) external payable returns (bytes32 tokenId);

function deployRemoteCanonicalToken(
string calldata originalChainName,
address originalAddress,
string calldata destinationChain,
uint256 gasValue
) external payable;

function interchainTransfer(
bytes32 tokenId,
string calldata destinationChain,
bytes calldata destinationAddress,
uint256 amount,
uint256 gasValue
) external payable;

function interchainTransferFrom(
bytes32 tokenId,
string calldata destinationChain,
bytes calldata destinationAddress,
uint256 amount,
uint256 gasValue
) external payable;
}
38 changes: 0 additions & 38 deletions contracts/libraries/AddressBytesUtils.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Proxy } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgrada
* @title StandardizedTokenRegistrarProxy
* @dev Proxy contract for interchain token service contracts. Inherits from the Proxy contract.
*/
contract StandardizedTokenRegistrarProxy is Proxy {
bytes32 private constant CONTRACT_ID = keccak256('standardized-token-registrar');
contract TokenRegistrarProxy is Proxy {
bytes32 private constant CONTRACT_ID = keccak256('token-registrar');

/**
* @dev Constructs the InterchainTokenServiceProxy contract.
Expand Down
Loading

0 comments on commit dc19ba9

Please sign in to comment.