Skip to content

Commit

Permalink
add outer token address
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Mar 27, 2024
1 parent 6e81229 commit 5c96fd0
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apollo/prisma/migrations/20240327060430_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "HistoryRecord" ADD COLUMN "recvOuterTokenAddress" TEXT,
ADD COLUMN "sendOuterTokenAddress" TEXT;
2 changes: 2 additions & 0 deletions apollo/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ model HistoryRecord {
messageNonce String
sendTokenAddress String
recvTokenAddress String?
sendOuterTokenAddress String?
recvOuterTokenAddress String?
guardSignatures String?
relayer String?
endTxHash String?
Expand Down
2 changes: 2 additions & 0 deletions apollo/src/aggregation/aggregation.history.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type HistoryRecord {
messageNonce: String
sendTokenAddress: String
recvTokenAddress: String
sendOuterTokenAddress: String
recvOuterTokenAddress: String
guardSignatures: String
relayer: String
endTxHash: String
Expand Down
1 change: 1 addition & 0 deletions apollo/src/base/TransferServiceT2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface PartnerSymbol {
key: string;
symbol: string;
address: string;
outerAddress: string;
protocolFee: number;
decimals: number;
}
Expand Down
2 changes: 2 additions & 0 deletions apollo/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export class HistoryRecord {
messageNonce?: Nullable<string>;
sendTokenAddress?: Nullable<string>;
recvTokenAddress?: Nullable<string>;
sendOuterTokenAddress?: Nullable<string>;
recvOuterTokenAddress?: Nullable<string>;
guardSignatures?: Nullable<string>;
relayer?: Nullable<string>;
endTxHash?: Nullable<string>;
Expand Down
27 changes: 27 additions & 0 deletions apollo/src/lnv3/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'RING',
symbol: 'RING',
address: '0x9C1C23E60B72Bc88a043bf64aFdb16A02540Ae8f',
outerAddress: '0x9C1C23E60B72Bc88a043bf64aFdb16A02540Ae8f',
protocolFee: 30000000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
outerAddress: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
protocolFee: 100000,
decimals: 6,
}
Expand Down Expand Up @@ -87,20 +89,23 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'RING',
symbol: 'RING',
address: '0x9e523234D36973f9e38642886197D023C88e307e',
outerAddress: '0x9e523234D36973f9e38642886197D023C88e307e',
protocolFee: 30000000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9',
outerAddress: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9',
protocolFee: 100000,
decimals: 6,
},
{
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 10000000000000,
decimals: 18,
}
Expand Down Expand Up @@ -154,6 +159,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0x55d398326f99059fF775485246999027B3197955',
outerAddress: '0x55d398326f99059fF775485246999027B3197955',
protocolFee: 100000000000000000,
decimals: 18,
}
Expand Down Expand Up @@ -199,13 +205,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0xA219439258ca9da29E9Cc4cE5596924745e12B93',
outerAddress: '0xA219439258ca9da29E9Cc4cE5596924745e12B93',
protocolFee: 100000,
decimals: 6,
},
{
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 10000000000000,
decimals: 18,
}
Expand Down Expand Up @@ -251,6 +259,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58',
outerAddress: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58',
protocolFee: 100000,
decimals: 6,
}
Expand Down Expand Up @@ -296,6 +305,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
outerAddress: '0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
protocolFee: 100000,
decimals: 6,
}
Expand Down Expand Up @@ -341,6 +351,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE',
outerAddress: '0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE',
protocolFee: 100000,
decimals: 6,
}
Expand Down Expand Up @@ -386,6 +397,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDT',
symbol: 'USDT',
address: '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df',
outerAddress: '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df',
protocolFee: 100000,
decimals: 6,
}
Expand Down Expand Up @@ -431,6 +443,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'RING',
symbol: 'RING',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 30000000000000000000,
decimals: 18,
}
Expand All @@ -456,6 +469,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 10000000000000,
decimals: 18,
}
Expand All @@ -481,20 +495,23 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDC',
symbol: 'USDC',
address: '0x0ac58Df0cc3542beC4cDa71B16D06C3cCc39f405',
outerAddress: '0x0ac58Df0cc3542beC4cDa71B16D06C3cCc39f405',
protocolFee: 10000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB',
outerAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB',
protocolFee: 10000000000000000,
decimals: 18,
},
{
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 1000000000000000,
decimals: 18,
},
Expand All @@ -520,20 +537,23 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDC',
symbol: 'USDC',
address: '0x8A87497488073307E1a17e8A12475a94Afcb413f',
outerAddress: '0x8A87497488073307E1a17e8A12475a94Afcb413f',
protocolFee: 10000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0x3b8Bb7348D4F581e67E2498574F73e4B9Fc51855',
outerAddress: '0x3b8Bb7348D4F581e67E2498574F73e4B9Fc51855',
protocolFee: 10000000000000000,
decimals: 18,
},
{
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 1000000000000000,
decimals: 18,
},
Expand Down Expand Up @@ -567,20 +587,23 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDC',
symbol: 'USDC',
address: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0',
outerAddress: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0',
protocolFee: 10000,
decimals: 6,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb',
outerAddress: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb',
protocolFee: 10000,
decimals: 6,
},
{
key: 'ETH',
symbol: 'ETH',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 1000000000000000,
decimals: 18,
},
Expand All @@ -606,13 +629,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDC',
symbol: 'USDC',
address: '0x3F7DF5866591e7E48D18C8EbeAE61Bc343a63283',
outerAddress: '0x3F7DF5866591e7E48D18C8EbeAE61Bc343a63283',
protocolFee: 1000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0x89AF830781A2C1d3580Db930bea11094F55AfEae',
outerAddress: '0x89AF830781A2C1d3580Db930bea11094F55AfEae',
protocolFee: 1000000000000000,
decimals: 18,
},
Expand All @@ -634,13 +659,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'USDC',
symbol: 'USDC',
address: '0x89AF830781A2C1d3580Db930bea11094F55AfEae',
outerAddress: '0x89AF830781A2C1d3580Db930bea11094F55AfEae',
protocolFee: 1000000000000000,
decimals: 18,
},
{
key: 'USDT',
symbol: 'USDT',
address: '0x463D1730a8527CA58d48EF70C7460B9920346567',
outerAddress: '0x463D1730a8527CA58d48EF70C7460B9920346567',
protocolFee: 1000000000000000,
decimals: 18,
},
Expand Down
6 changes: 6 additions & 0 deletions apollo/src/xtoken/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'RING',
symbol: 'RING',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 0,
decimals: 18,
},
{
key: 'CRAB',
symbol: 'xWCRAB',
address: '0x656567Eb75b765FC320783cc6EDd86bD854b2305',
outerAddress: '0x656567Eb75b765FC320783cc6EDd86bD854b2305',
protocolFee: 0,
decimals: 18,
}
Expand All @@ -51,13 +53,15 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'RING',
symbol: 'xWRING',
address: '0x273131F7CB50ac002BDd08cA721988731F7e1092',
outerAddress: '0x273131F7CB50ac002BDd08cA721988731F7e1092',
protocolFee: 0,
decimals: 18,
},
{
key: 'CRAB',
symbol: 'CRAB',
address: '0x0000000000000000000000000000000000000000',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 0,
decimals: 18,
}
Expand All @@ -83,6 +87,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'PRING',
symbol: 'PRING',
address: '0x617E55f692FA2feFfdD5D9C513782A479cC1FF57',
outerAddress: '0x0000000000000000000000000000000000000000',
protocolFee: 0,
decimals: 18,
},
Expand All @@ -104,6 +109,7 @@ export class TransferService extends BaseTransferServiceT2 {
key: 'PRING',
symbol: 'xPRING',
address: '0xF874fad204757588e67EE55cE93D654b6f5C39C6',
outerAddress: '0xBD50868F36Eb46355eC5a153AbD3a7eA094A5c37',
protocolFee: 0,
decimals: 18,
},
Expand Down
2 changes: 2 additions & 0 deletions apollo/src/xtoken/xtoken.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export class xTokenService implements OnModuleInit {
reason: '',
sendTokenAddress: sendTokenInfo.address.toLowerCase(),
recvTokenAddress: recvTokenInfo.address.toLowerCase(),
sendOuterTokenAddress: sendTokenInfo.outerAddress.toLowerCase(),
recvOuterTokenAddress: recvTokenInfo.outerAddress.toLowerCase(),
endTxHash: '',
confirmedBlocks: '',
extData: record.extData,
Expand Down

0 comments on commit 5c96fd0

Please sign in to comment.