Skip to content

Commit

Permalink
add movement contarct
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran committed Jan 7, 2025
1 parent 51630d7 commit c14fa69
Show file tree
Hide file tree
Showing 6 changed files with 1,452 additions and 148 deletions.
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func TestE2E(t *testing.T) {
sendETH(t, chainEndpoint, payerHex, projectOwnerAddr, 20)
projectID := big.NewInt(3)
registerIoID(t, chainEndpoint, contracts, deviceKey, projectID)
registerProject(t, chainEndpoint, contracts, projectOwnerKey, projectID, common.HexToAddress(contracts.MockDapp))
registerProject(t, chainEndpoint, contracts, projectOwnerKey, projectID, common.HexToAddress(contracts.MockDappMovement))

gnarkCodePath := "./testdata/geodnet.circuit"
gnarkMetadataPath := "./testdata/geodnet.pk"
Expand Down
5 changes: 5 additions & 0 deletions e2e/services/contractdeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var (
routerRe = regexp.MustCompile(`W3bstreamRouter deployed to (\S+)`)
mockDappRe = regexp.MustCompile(`MockDapp deployed to (\S+)`)
mockDappLivenessRe = regexp.MustCompile(`MockDappLiveness deployed to (\S+)`)
mockDappMovementRe = regexp.MustCompile(`MockDappMovement deployed to (\S+)`)
projectRewardRe = regexp.MustCompile(`W3bstreamProjectReward deployed to (\S+)`)
debitsRe = regexp.MustCompile(`W3bstreamDebits deployed to (\S+)`)
ioIDRe = regexp.MustCompile(`MockIoID deployed to (\S+)`)
Expand All @@ -38,6 +39,7 @@ type ContractsDeployments struct {
Router string
MockDapp string
MockDappLiveness string
MockDappMovement string
ProjectReward string
Debits string
IoID string
Expand Down Expand Up @@ -108,6 +110,9 @@ func DeployContract(endpoint string, payerHex string) (*ContractsDeployments, er
if match := mockDappLivenessRe.FindStringSubmatch(output); len(match) > 1 {
deployments.MockDappLiveness = match[1]
}
if match := mockDappMovementRe.FindStringSubmatch(output); len(match) > 1 {
deployments.MockDappMovement = match[1]
}
if match := routerRe.FindStringSubmatch(output); len(match) > 1 {
deployments.Router = match[1]
}
Expand Down
Loading

0 comments on commit c14fa69

Please sign in to comment.