Skip to content

Commit 46db15d

Browse files
committed
rename
1 parent 5a5b764 commit 46db15d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

contracts/crosschain/axelar/AxelarGatewaySource.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract contract AxelarGatewaySource is IGatewaySource, AxelarGatewayBase {
3535
// Emit event
3636
emit MessageCreated(
3737
0,
38-
CAIP10.format(CAIP2.format(), sender),
38+
CAIP10.format(CAIP2.local(), sender),
3939
CAIP10.format(destination, receiver),
4040
payload,
4141
attributes

contracts/utils/CAIP-10.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ library CAIP10 {
1515
using Strings for address;
1616
using Bytes for bytes;
1717

18-
function format(address account) internal view returns (string memory) {
19-
return format(CAIP2.format(), account.toHexString());
18+
function local(address account) internal view returns (string memory) {
19+
return format(CAIP2.local(), account.toHexString());
2020
}
2121

2222
function format(string memory caip2, string memory account) internal pure returns (string memory) {

contracts/utils/CAIP-2.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ library CAIP2 {
1414
using Strings for uint256;
1515
using Bytes for bytes;
1616

17-
function format() internal view returns (string memory) {
17+
function local() internal view returns (string memory) {
1818
return format("eip155", block.chainid.toString());
1919
}
2020

test/crosschain/utils/CAIP.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ describe('CAIP utilities', function () {
1717
});
1818

1919
describe('CAIP-2', function () {
20-
it('format()', async function () {
21-
expect(await this.caip2.$format()).to.equal(format('eip155', this.chainId));
20+
it('local()', async function () {
21+
expect(await this.caip2.$local()).to.equal(format('eip155', this.chainId));
2222
});
2323

2424
for (const { namespace, reference, caip2 } of Object.values(CHAINS))
@@ -35,9 +35,9 @@ describe('CAIP utilities', function () {
3535
describe('CAIP-10', function () {
3636
const { address: account } = ethers.Wallet.createRandom();
3737

38-
it(`format(${account})`, async function () {
38+
it(`local(${account})`, async function () {
3939
// lowercase encoding for now
40-
expect(await this.caip10.$format(ethers.Typed.address(account))).to.equal(format('eip155', this.chainId, account.toLowerCase()));
40+
expect(await this.caip10.$local(ethers.Typed.address(account))).to.equal(format('eip155', this.chainId, account.toLowerCase()));
4141
});
4242

4343
for (const { account, caip2, caip10 } of Object.values(CHAINS))

0 commit comments

Comments
 (0)