-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from sotatek-dev/develop
Develop
- Loading branch information
Showing
43 changed files
with
1,123 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@startuml | ||
actor admin as "Admin" | ||
boundary admin_site as "Admin Site" | ||
queue bull_queue | ||
boundary metamask | ||
boundary aurowallet | ||
control api | ||
database db | ||
actor user as "User" | ||
boundary user_site as "User Site" | ||
|
||
group Admin create new pair on web ui | ||
|
||
admin -> admin_site: enter create pair page | ||
admin -> admin_site: fill in form | ||
admin -> admin_site: click create button | ||
admin_site -> api: create pair in database | ||
|
||
api -> bull_queue: create job new pair | ||
api --> admin_site: pair created ok | ||
|
||
|
||
end | ||
group Job deploy token | ||
bull_queue -> job: trigger job | ||
job -> mina: create token | ||
job -> eth: whitelist token | ||
end | ||
group Crawler confirm new pair | ||
mina -> crawler: event from mina bridge | ||
eth -> crawler: event from eth bridge | ||
crawler --> crawler: process event | ||
crawler -> db: save pair status | ||
end | ||
group User see new pair | ||
user -> user_site: view pair list page | ||
user_site -> api: list of pairs | ||
api-> user_site: pairs include new pair | ||
user_site --> user: display pairs | ||
end | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
src/database/migrations/1735615966984-add-token-fields-common-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm'; | ||
|
||
export class AddTokenFieldsCommonConfig1735615966984 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.addColumns('common_configuration', [ | ||
new TableColumn({ | ||
name: 'from_chain', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'to_chain', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'from_symbol', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'to_symbol', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'from_address', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'to_address', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'from_decimal', | ||
type: 'int', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'to_decimal', | ||
type: 'int', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'from_sc_address', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'to_sc_address', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
new TableColumn({ | ||
name: 'status', | ||
type: 'varchar', | ||
length: '255', | ||
isNullable: true, | ||
}), | ||
]); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.dropColumns('common_configuration', [ | ||
'from_chain', | ||
'to_chain', | ||
'from_symbol', | ||
'to_symbol', | ||
'from_address', | ||
'to_address', | ||
'from_decimal', | ||
'to_decimal', | ||
'from_sc_address', | ||
'to_sc_address', | ||
'status', | ||
]); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/database/migrations/1736238200965-unique-token-address.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner, TableUnique } from 'typeorm'; | ||
|
||
export class UniqueTokenAddress1736238200965 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.createUniqueConstraint( | ||
'common_configuration', | ||
new TableUnique({ | ||
name: 'unique_from_address', | ||
columnNames: ['from_address'], | ||
}), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.dropUniqueConstraint('common_configuration', 'unique-from-address'); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/database/migrations/1736240154189-add-toggle-visibility-token-pair.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm'; | ||
|
||
export class AddToggleVisibilityTokenPair1736240154189 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.addColumns('common_configuration', [ | ||
new TableColumn({ | ||
name: 'is_hidden', | ||
type: 'boolean', | ||
default: false, | ||
}), | ||
]); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
return queryRunner.dropColumns('common_configuration', ['is_hidden']); | ||
} | ||
} |
30 changes: 27 additions & 3 deletions
30
src/database/repositories/common-configuration.repository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.