Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1237 commits
Select commit Hold shift + click to select a range
43c0ca8
set federator to run again
RafilxTenfen Oct 13, 2021
6f192be
set federator to run again
RafilxTenfen Oct 13, 2021
626175f
removed unused variable
RafilxTenfen Oct 13, 2021
1b4ca0a
init refactory of integration test
RafilxTenfen Oct 13, 2021
4ba6eec
refactory for checkAddressBalance
RafilxTenfen Oct 13, 2021
764d152
refactory for checkTxDataHash
RafilxTenfen Oct 13, 2021
224b134
refactory for checkTxDataHash
RafilxTenfen Oct 13, 2021
d65cb93
refactory for sendFederatorTx
RafilxTenfen Oct 13, 2021
1cd534e
fix const value being reassign
RafilxTenfen Oct 13, 2021
76ddf15
fix code sonar cloud code smells
RafilxTenfen Oct 13, 2021
d7e7313
fix sonar cloud code smells
RafilxTenfen Oct 13, 2021
0783bc0
fix mkdir sync error and sonar cloud code smells
RafilxTenfen Oct 14, 2021
024f7bc
fix sonar cloud code smells
RafilxTenfen Oct 14, 2021
a381e16
refactory check balances
RafilxTenfen Oct 14, 2021
a6d70ee
refactory run federators
RafilxTenfen Oct 14, 2021
8df95bd
refactory transferBackTokens
RafilxTenfen Oct 14, 2021
ccb1a96
refactory transferCheckStartErc777
RafilxTenfen Oct 14, 2021
b2e1979
refactory transferCheckErc777ReceiveTokensOtherSide
RafilxTenfen Oct 14, 2021
a82bd6e
refactory tranferCheckAmounts
RafilxTenfen Oct 14, 2021
c818dbd
refactory callReceiveTokens
RafilxTenfen Oct 14, 2021
721e30f
fix code smells
RafilxTenfen Oct 14, 2021
d2fde14
fix code smells
RafilxTenfen Oct 14, 2021
6addfb9
refactory of claimLargeAmounts
RafilxTenfen Oct 14, 2021
92c4f7b
refactory of transferCheckSendingTokens
RafilxTenfen Oct 14, 2021
8b613ed
fix code smells
RafilxTenfen Oct 14, 2021
7f96727
refactory transferChecks
RafilxTenfen Oct 14, 2021
4c05018
refactory transfer
RafilxTenfen Oct 14, 2021
fd1c5e1
Add Datadog metric tracking for heartbeat and federators
Oct 13, 2021
934948e
Update bridge's package-lock.json, handle error cases when using metr…
Oct 13, 2021
abc13ee
Add Datadog documentation to Federation README
Oct 14, 2021
0778232
update from BridgeV2 to BridgeV3
RafilxTenfen Oct 15, 2021
fa58d83
removed double import
RafilxTenfen Oct 15, 2021
3274baa
migrate ContractFactory js to ts
RafilxTenfen Oct 19, 2021
a8fa8bd
add packages
RafilxTenfen Oct 19, 2021
51a7bb2
add types ts to config directory
RafilxTenfen Oct 19, 2021
cb4d9a9
add constants and FederationV4 interface
RafilxTenfen Oct 19, 2021
1527228
add check for BRIDGE_SKIP_HTTPS
RafilxTenfen Oct 19, 2021
cc872cd
fix codesmells
RafilxTenfen Oct 19, 2021
58576a5
add AllowTokens V2
RafilxTenfen Oct 19, 2021
47c13b8
add Bridge V4
RafilxTenfen Oct 19, 2021
662eebb
add Federation V4
RafilxTenfen Oct 19, 2021
db04175
migrate AllowTokens to typescript
RafilxTenfen Oct 19, 2021
49b0e38
migrate Ibridge to typescript
RafilxTenfen Oct 19, 2021
94120e0
update pull request template
RafilxTenfen Oct 19, 2021
8f59516
removed unused semicolon
RafilxTenfen Oct 19, 2021
28e67b0
add BRIDGE_SKIP_HTTPS to readme
RafilxTenfen Oct 20, 2021
891c8b8
deploy for multichain contracts
RafilxTenfen Oct 18, 2021
d78a693
update deployments for multichain
RafilxTenfen Oct 20, 2021
366fada
fix code smells
RafilxTenfen Oct 20, 2021
b6dd3f6
add destination chainId to methods
RafilxTenfen Oct 27, 2021
48152f1
removed chainId from allowTokens
RafilxTenfen Oct 28, 2021
1f3884e
add type to structs
RafilxTenfen Oct 28, 2021
122d476
fix tests for contracts multichain
RafilxTenfen Nov 3, 2021
5b8299f
add chain id to integrations ganache
RafilxTenfen Nov 4, 2021
cc0013b
federation integration test with multichain contracts
RafilxTenfen Nov 4, 2021
7785a26
add chain id to ganache circle ci
RafilxTenfen Nov 4, 2021
2e17f3b
fix code smells
RafilxTenfen Nov 5, 2021
accc5ae
fix sonnar lint code smells
RafilxTenfen Nov 5, 2021
5089c78
fix code smells
RafilxTenfen Nov 5, 2021
487d33f
add multichain logic to NFT Bridge
RafilxTenfen Nov 8, 2021
1a53735
add chain ids to cross event
RafilxTenfen Nov 11, 2021
817cac1
fix federator for NFT
RafilxTenfen Nov 11, 2021
0b9c8c7
fix multichain in nft integration test
RafilxTenfen Nov 11, 2021
43caf17
fix code smells
RafilxTenfen Nov 11, 2021
3c25bb6
fix code smells
RafilxTenfen Nov 11, 2021
9ada241
Idented bridge/contracts/nftbridge/INFTBridge.sol
RafilxTenfen Nov 11, 2021
2c4e374
Idented bridge/contracts/nftbridge/INFTBridge.sol
RafilxTenfen Nov 11, 2021
2f37a28
Apply suggestions from code review
RafilxTenfen Nov 11, 2021
0cd27fa
update tokenId and amount from number to BN
RafilxTenfen Nov 11, 2021
09bad37
changed version objects
RafilxTenfen Nov 11, 2021
a210c81
Use sub instead of minus
Nov 12, 2021
e06b89c
removed undeployed version of federation contracts
RafilxTenfen Nov 12, 2021
96f329e
removed undeployed version of bridge contracts
RafilxTenfen Nov 12, 2021
8fcbd65
removed undeployed version of allowTokens contracts
RafilxTenfen Nov 12, 2021
97a69f4
add natspec to bytes param
RafilxTenfen Nov 12, 2021
948cbb9
update version
RafilxTenfen Nov 12, 2021
ca4882d
Add rKovWBTC to deployment list
Nov 12, 2021
c5f295a
removed unused lib
RafilxTenfen Nov 26, 2021
4ca4f14
add WBTC to tests
RafilxTenfen Nov 30, 2021
63163e6
set federator to run 3 retries
RafilxTenfen Dec 1, 2021
ec226d6
set federator to run 3 retries
RafilxTenfen Dec 1, 2021
5aa5b2f
add config as singleton
RafilxTenfen Dec 2, 2021
620efa1
migrated federators to ts
RafilxTenfen Dec 2, 2021
c5f3796
fix parse of Json config
RafilxTenfen Dec 2, 2021
fff079f
add values to json config test
RafilxTenfen Dec 2, 2021
f355f32
add return to federator run
RafilxTenfen Dec 2, 2021
a0515ff
fix code smells
RafilxTenfen Dec 2, 2021
68df52b
fix code smells
RafilxTenfen Dec 2, 2021
278ec3a
fix code smells
RafilxTenfen Dec 2, 2021
3bf05ce
fix code smells
RafilxTenfen Dec 2, 2021
3c49fcc
fix code smells
RafilxTenfen Dec 2, 2021
6153a90
add some logs to federator
RafilxTenfen Dec 2, 2021
ca2a7df
add multichain run to federator
RafilxTenfen Dec 6, 2021
59b3211
add multichain federator to integration tests
RafilxTenfen Dec 6, 2021
c9bef78
add validation for use nft
RafilxTenfen Dec 6, 2021
7a5c0ad
add interfaces to federator and allowTokens
RafilxTenfen Dec 6, 2021
a0ab663
removed unused variables
RafilxTenfen Dec 6, 2021
4a8b3c4
set function params as objects
RafilxTenfen Dec 6, 2021
0f3e480
fix code smells line size
RafilxTenfen Dec 6, 2021
41f66a7
fix code smells line size
RafilxTenfen Dec 6, 2021
ce082bb
Update Custom Error to typescript
RafilxTenfen Dec 7, 2021
dd9b8a0
Update Endpoints to typescript
RafilxTenfen Dec 7, 2021
db3361c
Update Heartbeat to typescript
RafilxTenfen Dec 7, 2021
e86558d
Update TransactionSEnder to typescript
RafilxTenfen Dec 7, 2021
b176087
set hartbeat as default
RafilxTenfen Dec 7, 2021
ff48feb
add SCheduler to typescript
RafilxTenfen Dec 7, 2021
f9ea1f2
Change utils to typescript
RafilxTenfen Dec 8, 2021
0cfbd75
add Main as typescript
RafilxTenfen Dec 8, 2021
b6e7291
removed get instance
RafilxTenfen Dec 8, 2021
49c2cac
fix security hotspot
RafilxTenfen Dec 8, 2021
6db9470
fix security hotspot
RafilxTenfen Dec 8, 2021
a9fd64c
fix code smells
RafilxTenfen Dec 8, 2021
70ce8d3
fix code smells
RafilxTenfen Dec 8, 2021
6ac2374
fix code smells
RafilxTenfen Dec 8, 2021
bf0f523
fix code smells
RafilxTenfen Dec 8, 2021
ac2898e
add Log Wrapper logic
RafilxTenfen Dec 9, 2021
7cb2315
add nodemon
RafilxTenfen Dec 9, 2021
ada741f
add nodemon to package json
RafilxTenfen Dec 9, 2021
f771de3
fix code smells
RafilxTenfen Dec 9, 2021
121b799
update logs and name of logger category to CAMEL_CASE
RafilxTenfen Dec 10, 2021
3f13184
removed unused import
RafilxTenfen Dec 10, 2021
893433f
first test bridge v2 to v3
RafilxTenfen Dec 10, 2021
4907973
add test
RafilxTenfen Dec 12, 2021
903b897
test
Dec 12, 2021
cb57a2b
add tokens received to Bridge V2
Dec 13, 2021
97f2bf2
add test of upgrade multichain contracts
RafilxTenfen Dec 15, 2021
8c3a21b
add link bridge util to before instead of beforeEach
RafilxTenfen Dec 15, 2021
3c2f2ec
removed trailling spaces
RafilxTenfen Dec 15, 2021
56deba3
Remove symbol prefix,update readme and dependencies
Jan 9, 2022
3891a81
Update package-lock after merge
Jan 9, 2022
6626dd6
Add verification programatically remove verify.py
Jan 9, 2022
7f8752e
Fix variable naming in bridge events add tests
Jan 9, 2022
010855e
Fix SonarCloud smells
Jan 9, 2022
b649982
Fix integration test
Jan 9, 2022
81a6ed3
Fix more sonar code smells
Jan 9, 2022
643787e
Require chainId not 0
Jan 11, 2022
99031d7
Replace all expectThrow for tuffleAssertions
Jan 12, 2022
ece0f36
Check destination chainId for acceptTransfer and votes
Jan 12, 2022
1e4a3c6
Add wrong destination chainId test
Jan 13, 2022
908dc63
WIP Heartbeat now events an event with an array of information
Jan 17, 2022
24682c5
WIP Change Hartbeat.ts to be multichain
Jan 18, 2022
464e3ee
Finish changes for Heartbeat multichain
Jan 19, 2022
23fcc46
Add heartbeatIntegrationTest to CircleCI
Jan 21, 2022
837d2b8
Remove unused scripts, rename tags, tidy deployments
Jan 21, 2022
d7e6683
Add upgrade deploy scripts, rename federatorProxy to federationProxy
Jan 21, 2022
cd87be2
Update Bridgeold version to match V3
Jan 24, 2022
025bd09
Update cross event and Bridges interfaces
Jan 26, 2022
32dfc23
Update Crossing event to filter for destinationChainId
Jan 27, 2022
c2bf3f8
Add chainId to NFT create config file
Jan 27, 2022
754ee84
Fix double polling and incorrect network to Block
Jan 27, 2022
9feef55
Check if upsertContext exists
Jan 27, 2022
fa48e17
add checkHttps to the config.sample
aguschirico Feb 4, 2022
d061e1e
Adds test to verify that single voter can't vote twice.
aguschirico Feb 8, 2022
23f35cb
Makes some public methods internal.
aguschirico Feb 8, 2022
09a2562
adds missing validations for origin and destination chain
aguschirico Feb 8, 2022
dc04b63
fix wrongly indented line
aguschirico Feb 8, 2022
bf39699
add missing tests
aguschirico Feb 8, 2022
4ff9d53
fix failing test
aguschirico Feb 8, 2022
32b778a
fix identation problem
aguschirico Feb 8, 2022
5c1e922
Fix Factories to use chainId on cached web3
Feb 1, 2022
453efc0
Fix methods not using .call() at the end
Feb 2, 2022
03b9f01
Fix Nft Integration Tests
Feb 3, 2022
1c5312a
Added tests to LibUtils contract
Feb 8, 2022
fe3c3db
Fixed sonar code smells
Feb 8, 2022
31a4f65
Test git configuration
gsoares85 Feb 9, 2022
81fba39
Added more complete test for the happy path
gsoares85 Feb 9, 2022
0982851
Removed code smell
gsoares85 Feb 9, 2022
c297b66
Remove unnecessary test
gsoares85 Feb 9, 2022
b72aa23
Added assert for when the hexadecimal has more than 34 bytes
gsoares85 Feb 9, 2022
576944e
Fix bscscan verification on deployment
Feb 11, 2022
9b9dc24
Added tests to the hasVoted method
gsoares85 Feb 17, 2022
12a30d0
Flatten and addresses after deploy
Feb 11, 2022
4679b98
Use deployments.get('Bridge') instead of Artifact
Feb 11, 2022
f49fc52
add script to get fee percentage of a network
aguschirico Feb 16, 2022
94eba75
script to check whether a transaction was claimed
aguschirico Feb 16, 2022
dda4941
set setTokenInfoByTokenAddress internal
aguschirico Feb 21, 2022
ed1f879
Bump version on package-lock
Mar 4, 2022
7c03d31
Merge pull request #325 from rsksmart/readme-patch-ui
pmprete Mar 5, 2022
b71382b
make use of the rsk node
augustoIOV Mar 7, 2022
5061a39
Fixed federator error
gsoares85 Mar 9, 2022
a5b689e
Fixed sonar code quality
gsoares85 Mar 9, 2022
b7523ff
Fixed validation of side chain
gsoares85 Mar 10, 2022
9f5f88d
Removed unnecessary if
gsoares85 Mar 10, 2022
61ad5b8
Fixed code smell
gsoares85 Mar 10, 2022
f373233
Added the filter in federator
gsoares85 Mar 11, 2022
5e1de58
Merge pull request #327 from rsksmart/feature/TBRE-502-federatorError
pmprete Mar 11, 2022
891775a
Add tryCall script to get the revert reason of reverted Tx
Mar 14, 2022
394a95c
Merge pull request #328 from rsksmart/TBRE-517-tryCall
augustoIOV Mar 14, 2022
3f2c121
Get info and limits in isTokenAllowed
Mar 14, 2022
36b64ab
Merge pull request #296 from rsksmart/nftbridge-rebased
augustoIOV Mar 16, 2022
92a1db0
Bump ansi-regex from 5.0.0 to 5.0.1 in /federator
dependabot[bot] Mar 16, 2022
b1dbf0e
Bump simple-get from 2.8.1 to 2.8.2 in /federator
dependabot[bot] Mar 16, 2022
0aef6eb
Remove RUN npm run build from dockerfile
Mar 16, 2022
bd2b083
Merge pull request #329 from rsksmart/TBRE-517-tryCall
augustoIOV Mar 17, 2022
31accef
New method createMultipleSideTokens
Mar 5, 2022
2bb458b
Fix coverage test, refactor tokens info, createSideToken upgrade script
Mar 6, 2022
04c4420
Finish multipleCreateSideToken deployment script
Mar 25, 2022
e807978
Fix deploy test for local tokens
Mar 25, 2022
de8e2c8
fix SonalCloud issues
Mar 25, 2022
714b6b4
Warn if member is not part of the fed and skip
augustoIOV Mar 25, 2022
316babb
Merge pull request #330 from rsksmart/TBRE-462-createSideToken
pmprete Mar 25, 2022
6f3fc2a
Bump follow-redirects from 1.14.1 to 1.14.9 in /bridge
dependabot[bot] Mar 25, 2022
0ab5141
fix LGTM warning
Mar 25, 2022
e28dfdb
Merge pull request #332 from rsksmart/TBRE-462-createSideToken
augustoIOV Mar 25, 2022
69a0c7e
fix wrong chain being validated.
augustoIOV Mar 25, 2022
f25a621
return false in case no execution happened
augustoIOV Mar 25, 2022
c208386
fix smells.
augustoIOV Mar 25, 2022
3656281
Merge pull request #331 from rsksmart/TBRE-533-federation-throws-a-em…
pmprete Mar 25, 2022
319393f
modify scripts and configs that were wrong.
augustoIOV Mar 31, 2022
f1f2b05
fix script
augustoIOV Mar 31, 2022
7416cd8
change binance rpc endpoint
augustoIOV Apr 1, 2022
7984c03
Merge pull request #333 from rsksmart/small_fixes
augustoIOV Apr 1, 2022
c22f64a
Bump minimist from 1.2.5 to 1.2.6 in /federator
dependabot[bot] Apr 11, 2022
4dfd9c3
Merge pull request #316 from rsksmart/dependabot/npm_and_yarn/federat…
augustoIOV Apr 27, 2022
08b3c75
Merge pull request #317 from rsksmart/dependabot/npm_and_yarn/federat…
augustoIOV Apr 27, 2022
661884e
Merge pull request #334 from rsksmart/dependabot/npm_and_yarn/federat…
augustoIOV Apr 27, 2022
66205f1
Merge pull request #322 from rsksmart/dependabot/npm_and_yarn/bridge/…
augustoIOV Apr 27, 2022
e44e2c6
CD to AWS ECS
juan-rsk Apr 2, 2022
68f825b
remove all references of NFT
joaoiovlabs Apr 28, 2022
77dd5c7
Merge branch 'master' of github.com:rsksmart/tokenbridge into GBI-543…
joaoiovlabs Apr 28, 2022
1b83172
Remove TokenType (unused parameter)
joaoiovlabs Apr 28, 2022
f477a9b
Remove TokenType (unused parameter)
joaoiovlabs Apr 28, 2022
8ab4f37
Fix sonar code smell
joaoiovlabs Apr 28, 2022
b2d06b0
Merge pull request #335 from rsksmart/juantelez/CD
augustoIOV Apr 29, 2022
0209382
Remove utils.tokenType from tests Federation_test.js
joaoiovlabs Apr 29, 2022
0079db2
Merge branch 'master' of github.com:rsksmart/tokenbridge into GBI-543…
joaoiovlabs Apr 29, 2022
475cb32
Remove all references of BINANCE.
joaoiovlabs May 3, 2022
c2cd5f6
Merge pull request #336 from rsksmart/GBI-543_Federator_Remove_all_co…
augustoIOV May 4, 2022
e27c379
Syntax error fixed on testnet workflow
juan-rsk May 4, 2022
d899c77
Merge pull request #338 from rsksmart/juantelez/fix-CD
augustoIOV May 4, 2022
10a0b57
Merge branch 'master' of github.com:rsksmart/tokenbridge into GBI_540…
joaoiovlabs May 6, 2022
c79fcd8
Merge pull request #337 from rsksmart/GBI_540_Federator_Remove_functi…
augustoIOV May 16, 2022
c8678f6
Removed federator.key and added a env var for that
gsoares85 May 23, 2022
02ac464
update deployment info
augustoIOV May 23, 2022
cfa1316
Merge remote-tracking branch 'origin/master' into update_deployment_info
augustoIOV May 23, 2022
c3e37e1
Fixed ununsed vars warning
gsoares85 May 23, 2022
8e77d9b
Merge pull request #340 from rsksmart/update_deployment_info
augustoIOV May 24, 2022
c049ab2
Fixed ununsed values and create env.example
gsoares85 May 24, 2022
c3dfbc8
Merge pull request #339 from rsksmart/feature/GBI-644-Move-federator.…
augustoIOV May 24, 2022
2fe2604
Fix ECS task executionRoleArn, cpu and memory paramters
lucasvuotto Jun 2, 2022
358a2ef
Merge pull request #341 from lucasvuotto/fix/ecs-task-execution-role
augustoIOV Jun 2, 2022
0a5d4b1
Fix GitHub workflow ECS_SERVICE value
lucasvuotto Jun 2, 2022
33abc79
Merge pull request #342 from lucasvuotto/fix/ecs-service-name
augustoIOV Jun 2, 2022
d6aff67
Deploy improvements
lucasvuotto Jun 2, 2022
1b68ae2
Merge pull request #343 from lucasvuotto/fix/ecs-awslogs-group
augustoIOV Jun 2, 2022
e4438a4
Rework Dockerfile
lucasvuotto Jun 3, 2022
297ed54
Merge pull request #344 from lucasvuotto/fix/docker-build
augustoIOV Jun 6, 2022
8fbcb8b
Added more information to reverted transaction log
gsoares85 Nov 10, 2022
86af496
Merge pull request #349 from rsksmart/feature/GBI-875-createLogForPen…
gsoares85 Nov 11, 2022
777c5de
RSK Urls and Name changes
maximstanciu Jan 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .aws/testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"executionRoleArn":"arn:aws:iam::094889878379:role/rif-gateways-ccbridge20220420234144997100000001",
"family":"rif-gateways-ccbridge",
"networkMode":"awsvpc",
"requiresCompatibilities":[
"FARGATE"
],
"cpu":"2048",
"memory":"4096",
"containerDefinitions":[
{
"name":"rif-gateways-ccbridge-testnet",
"image":"094889878379.dkr.ecr.us-west-2.amazonaws.com/rif-gateways-ccbridge:latest",
"logConfiguration":{
"logDriver":"awslogs",
"options":{
"awslogs-region":"us-west-2",
"awslogs-group":"/ecs/rif-gateways-ccbridge",
"awslogs-stream-prefix":"testnet"
}
}
}
]
}
68 changes: 68 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: 2.1
orbs:
coveralls: coveralls/[email protected]
jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:lts
# The first ganache-cli container is meant to simulate a main chain, and the second one for a side chain (integration testing only)
- image: trufflesuite/ganache-cli
# The gas limit is 6700000 to avoid trying to deploy a contract larger than expected
command: ganache-cli -i 5777 --chainId 5777 -l 6700000 -k istanbul
- image: trufflesuite/ganache-cli
command: ganache-cli -i 5776 --chainId 5776 -p 8546 -l 6700000 -k istanbul
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "bridge/package.json" }}
# Fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install bridge dependencies
command: |
cd bridge
npm ci
- run:
name: install federator dependencies
command: |
cd federator
npm ci
- save_cache:
paths:
- bridge/node_modules
key: v1-dependencies-{{ checksum "bridge/package.json" }}
- run:
name: contracts lint
command: |
cd bridge
npm run lint
- run:
name: deploy contracts in development and mirror
command: |
cd bridge
npm run deployLocalIntegrationTest
- run:
name: federator integration tests
command: |
cd federator
npm run integrationTest
- run:
name: Heartbeat federator integration tests
command: |
cd federator
npm run integrationHeartbeatTest
- run:
name: federator unit tests
command: |
cd federator
npm test
- run:
name: bridge unit tests + coverage
command: |
cd bridge
npm run coverage
- coveralls/upload:
path_to_lcov: "./bridge/coverage/lcov.info"
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
./docs
./ui
./federator/test
./federator/integrationTest
./federator/node_modules
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
76 changes: 76 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
### Title of pull request

The pull request should be described here

### Description

- Describe here your pull request modifications
- It could be more than one thing

### How to Test

- Run both `ganache-cli`
- Enter into the bridge directory and run all the tests

#### Case 1

1. Go to bridge directory
```shell
$~ cd bridge
```

2. Run all the tests
```shell
$~ npm run test
```

__Expected Result__
- It should pass the test
![image](https://user-images.githubusercontent.com/17556614/131563928-05d6cb84-caf0-4ee0-8458-3464257e7f6c.png)

3. Run the first ganache-cli
```shell
$~ npm run ganache
```

4. Open another shell and run the ganache mirror
```shell
$~ npm run ganache-mirror
```

5. Go to the federator directory
```shell
$~ cd ../federator
```

6. Run the integration test
```shell
$~ npm run integrationTest
```

__Expected Result__
- It should pass the test
![image](https://user-images.githubusercontent.com/17556614/137998725-3938ce87-87b1-4631-9cff-095935854d6e.png)


7. Run the integration test
```shell
$~ npm run integrationTest
```
__Expected Result__
- It should pass the test
![image](https://user-images.githubusercontent.com/17556614/137998804-e984a70a-2ae3-4cc4-861e-83c691d53a77.png)

#### Case N...

### Checklist

#### Bridge Directory `cd bridge`
- [] Lint is clean `npm run lint`
- [] Test is passing `npm run test`
- [] Contracts are compiling `npm run compile`

#### Federator Directory `cd federator`
- [] Lint is clean `npm run lint`
- [] Test is passing `npm run test`
- [] Typescript is compiling `npm run build`
54 changes: 54 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 9 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
62 changes: 62 additions & 0 deletions .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy TestNet CC Bridge federator

on:
release:
types: [published]

env:
AWS_REGION: ${{ secrets.AWS_REGION }}
ECR_REPOSITORY: rif-gateways-ccbridge
ECS_SERVICE: ccbridge_services_testnet # set this to your Amazon ECS service name
ECS_CLUSTER: rif-gateways-ccbridge # set this to your Amazon ECS cluster name
ECS_TASK_DEFINITION: .aws/testnet.json # set this to the path to your Amazon ECS task definition
# file, e.g. .aws/task-definition.json
CONTAINER_NAME: rif-gateways-ccbridge-testnet # set this to the name of the container in the
# containerDefinitions section of your task definition

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: rif-gateways-ccbridge
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
container-name: ${{ env.CONTAINER_NAME }}
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
node_modules
build
federator.log
.DS_Store
.idea
.vscode

# dotenv environment variables file
.env
.env.test
.env.prod

federator/built
Loading