Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const loadContracts = () => {
return Boba_AuthenticatedFaucet
}

const handle = async(event, callback) => {
const handle = async (event, callback) => {
const body = JSON.parse(event.body)

const { hashedMsg, signature, tweetId, walletAddress } = body
Expand All @@ -59,14 +59,7 @@ const handle = async(event, callback) => {

// Send transaction to node
try {
console.log(
'SendFundsMeta: ',
walletAddress,
tweetId,
hashedMsg,
signature,
L2_NODE_WEB3_URL
)
console.log('SendFundsMeta: ', walletAddress, tweetId, hashedMsg, signature)

await Boba_AuthenticatedFaucet.estimateGas.sendFundsMeta(
walletAddress,
Expand Down
22 changes: 3 additions & 19 deletions ops_boba/api/metatransaction-api/serverless-goerli.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
service: sls-boba-goerli-metaTransaction # NOTE: update this with your service name

plugins:
- serverless-better-credentials

provider:
name: aws
runtime: nodejs12.x
stackName: sls-boba-goerli-metaTransaction
stage: prod
region: us-east-1
role: ${file(env-goerli.yml):ROLE}
region: us-east-2

package:
exclude:
Expand All @@ -22,33 +18,21 @@ functions:
handler: metaTransaction_swapBOBAForETH.goerliHandler
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- ${file(env-goerli.yml):SECURITY_GROUPS}
subnetIds:
- ${file(env-goerli.yml):SUBNET_ID_1}
- ${file(env-goerli.yml):SUBNET_ID_2}
events:
- http:
path: send.swapBOBAForETH
method: post
cors: true
layers:
- ${file(env-goerli.yml):LAYERS}
- ${file(env.yml):LAYERS}
boba_getTestnetETH:
handler: metaTransaction_getTestnetETH.goerliHandler
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- ${file(env-goerli.yml):SECURITY_GROUPS}
subnetIds:
- ${file(env-goerli.yml):SUBNET_ID_1}
- ${file(env-goerli.yml):SUBNET_ID_2}
events:
- http:
path: send.getTestnetETH
method: post
cors: true
layers:
- ${file(env-goerli.yml):LAYERS}
- ${file(env.yml):LAYERS}
9 changes: 1 addition & 8 deletions ops_boba/api/metatransaction-api/serverless-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ provider:
stackName: sls-boba-mainnet-metaTransaction
stage: prod
region: us-east-1
role: ${file(env-mainnet.yml):ROLE}

package:
exclude:
Expand All @@ -19,17 +18,11 @@ functions:
handler: metaTransaction_swapBOBAForETH.mainnetHandler
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- ${file(env-mainnet.yml):SECURITY_GROUPS}
subnetIds:
- ${file(env-mainnet.yml):SUBNET_ID_1}
- ${file(env-mainnet.yml):SUBNET_ID_2}
events:
- http:
path: send.swapBOBAForETH
method: post
cors: true
layers:
- ${file(env-mainnet.yml):LAYERS}
- ${file(env.yml):LAYERS}

51 changes: 0 additions & 51 deletions ops_boba/api/metatransaction-api/serverless-rinkeby.yml

This file was deleted.

134 changes: 134 additions & 0 deletions ops_boba/api/watcher-api/serverless-goerli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
service: sls-boba-goerli-watcher # NOTE: update this with your service name

provider:
name: aws
runtime: python3.7
stackName: sls-boba-goerli-watcher
stage: prod
region: us-east-2

package:
exclude:
- .gitignore
individually: true

functions:
watcher_getL2Transactions:
handler: watcher_getL2Transactions.watcher_getL2Transactions
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.l2.transactions
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_getL2Deployments:
handler: watcher_getL2Deployments.watcher_getL2Deployments
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.l2.deployments
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_getL2CrossDomainMessage:
handler: watcher_getL2CrossDomainMessage.watcher_getL2CrossDomainMessage
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.l2.crossdomainmessage
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_getL1Transactions:
handler: watcher_getL1Transactions.watcher_getL1Transactions
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.l1.transactions
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_sendCrossDomainMessage:
handler: watcher_sendCrossDomainMessage.watcher_sendCrossDomainMessage
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: send.crossdomainmessage
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_getL2PendingExits:
handler: watcher_getL2PendingExits.watcher_getL2PendingExits
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.l2.pendingexits
method: get
cors: true
layers:
- ${file(env.yml):LAYERS}
watcher_getLayerZeroTransactions:
handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- !ImportValue ${file(env.yml):NETWORK}-monitor-ecs-security-group
subnetIds:
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-a
- !ImportValue ${file(env.yml):NETWORK}-vpc-private-b
events:
- http:
path: get.layerzero.transactions
method: post
cors: true
layers:
- ${file(env.yml):LAYERS}
Loading