Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ten-protocol/go-ten into je…
Browse files Browse the repository at this point in the history
…nnifer/scan-updates
  • Loading branch information
Jennievon committed Nov 29, 2023
2 parents 5df7b43 + 362a80b commit 2f0b402
Show file tree
Hide file tree
Showing 22 changed files with 1,481 additions and 1,119 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/manual-deploy-obscuro-scan-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
uses: "azure/aci-deploy@v1"
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
dns-name-label: ${{ github.event.inputs.testnet_type }}-obscuro-scan
dns-name-label: ${{ github.event.inputs.testnet_type }}-obscuro-scan-v3
image: ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }}
name: ${{ github.event.inputs.testnet_type }}-fe-obscuro-scan
name: ${{ github.event.inputs.testnet_type }}-fe-obscuro-scan-v3
location: "uksouth"
restart-policy: "Never"
environment-variables: NEXT_PUBLIC_API_HOST=https://${{ github.event.inputs.testnet_type }}-api.obscuroscan.io NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }}
command-line: npm run start
command-line: npm run start-prod
ports: "80"
cpu: 2
memory: 2
Expand Down
10 changes: 8 additions & 2 deletions contracts/deployment_scripts/bridge/001_deploy_bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

// get management contract and write the L1 bridge address to it
const mgmtContract = (await hre.ethers.getContractFactory('ManagementContract')).attach(mgmtContractAddress)
const tx = await mgmtContract.SetImportantContractAddress("L1Bridge", layer1BridgeDeployment.address);
const receipt = await tx.wait();
const recordL1AddressTx = await mgmtContract.SetImportantContractAddress("L1Bridge", layer1BridgeDeployment.address);
const receipt = await recordL1AddressTx.wait();
if (receipt.status !== 1) {
console.log("Failed to set L1BridgeAddress in management contract");
}
Expand Down Expand Up @@ -69,6 +69,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
log: true,
}, "setRemoteBridge", layer2BridgeDeployment.address);

const recordL2AddressTx = await mgmtContract.SetImportantContractAddress("L2Bridge", layer2BridgeDeployment.address);
const receipt2 = await recordL2AddressTx.wait();
if (receipt2.status !== 1) {
console.log("Failed to set L2BridgeAddress in management contract");
}
console.log(`L2BridgeAddress=${layer2BridgeDeployment.address}`)
console.log(` Bridge deployed with from L1 address=${accountsL1.deployer} L2 Address=${accountsL2.deployer}`);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
if (receipt.status !== 1) {
console.log("Failed to set L1CrossChainMessenger in management contract");
}
console.log(`L1CrossChainMessenger=${crossChainDeployment.address}`)
console.log(`L1CrossChainMessenger=${crossChainDeployment.address}`);
};

export default func;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ import {DeployFunction} from 'hardhat-deploy/types';
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {
deployments,
getNamedAccounts
getNamedAccounts,
companionNetworks,
} = hre;
// Use the contract addresses from the management contract deployment.
const mgmtContractAddress = process.env.MGMT_CONTRACT_ADDRESS!!

// Get the prefunded L2 deployer account to use for deploying.
const {deployer} = await getNamedAccounts();
Expand All @@ -22,7 +25,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// TODO: Remove hardcoded L2 message bus address when properly exposed.
const messageBusAddress = hre.ethers.utils.getAddress("0x526c84529b2b8c11f57d93d3f5537aca3aecef9b");
// Deploy the L2 Cross chain messenger and use the L2 bus for validation
await deployments.deploy('CrossChainMessenger', {
const crossChainDeployment = await deployments.deploy('CrossChainMessenger', {
from: deployer,
log: true,
proxy: {
Expand All @@ -35,7 +38,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}
}
});
console.log("Deployed!")
// get L1 management contract and write the cross chain messenger address to it
const mgmtContract = (await hre.ethers.getContractFactory('ManagementContract')).attach(mgmtContractAddress);
const tx = await mgmtContract.SetImportantContractAddress("L2CrossChainMessenger", crossChainDeployment.address);
const receipt = await tx.wait();
if (receipt.status !== 1) {
console.log("Failed to set L2CrossChainMessenger in management contract");
}
console.log(`L2CrossChainMessenger=${crossChainDeployment.address}`);
};

export default func;
Expand Down
42 changes: 42 additions & 0 deletions docs/_docs/testnet/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@
---
# Ten Testnet Change Log

# Oct 2023-11-29 (v0.20.0)
* A list of the PRs merged in this release is as below;
* `c3775b52` Contract deploy: record l2 contract addresses (#1667)
* `23107b72` Add another signed message format gateway (#1672)
* `5bf20d97` L1 contracts: increase timeout for extra transactions (#1671)
* `1d08a78b` Proxy contracts deployment (#1663)
* `f6c7c1b9` Add token as query param (#1666)
* `34221a57` Local network: pass mgmt contract to l2 contract deploy script (#1664)
* `3af59e76` Add default user for old endpoints (#1665)
* `378aec67` Use eth sign typed data v4 in gateway (#1643)
* `8712e26d` Obscuroscan#2323 (#1640)
* `d37c0c78` Remove creating all clients at startup (#1662)
* `f5d4ddd6` Contract deployment: store important addresses (#1653)
* `12480861` Host: monitor and serve important contract addresses (#1645)
* `29cae5df` Adding tx hash to the faucet funding (#1660)
* `8c83d5e3` Fix json serialisation for batch (#1655)
* `e0e082db` Fix the repository dispatches to ten-protocol/ten-test after the repo renaming (#1658)
* `e8b7b50f` Prevent concurrent writes to a websocket connection (#1656)
* `43214832` Fix the msg bus deploy at genesis (#1652)
* `0b47af67` Added another promote to admin (#1651)
* `309b2405` Replacing github links (#1647)
* `0ec2d053` Rebranding .md files (#1648)
* `bb3a2bd2` Ui: replace obscuro logos with ten (#1649)
* `35b5ce45` Change base url to https (#1644)
* `ef01370c` Adding geths mempool (#1639)
* `82488783` Fix test ports (#1642)
* `991a2d67` Integrate google analytics for og and obscuroscan (#1638)
* `9e3cf212` Gateway unsubscribe for multiple subscribed clients (#1637)
* `e7ab386b` Gateway fixes (#1633)
* `47bb9e65` Obscuroscan: serve oldest batches first (#1635)
* `1d4e8d74` Subscribe to events with multiple accounts and deduplicate (#1627)
* `5c3fc3cd` Obscuroscan: metamask button show connected (#1634)
* `aae2f5fc` Return error instead of just logging it if client fails (#1632)
* `fb4c4492` Cais ui updates (#1631)
* `97ed3c31` Obscuroscan: small ui tweaks (#1630)
* `f6ac73a0` Update readme.md (#1613)
* `7399892f` Missed a couple of vars on the rename (#1629)
* `bddbf713` Obscuroscan: load eth price on init (#1626)
* `06e56bdd` Preparation for subscribing with multiple accounts and test that confirms current issues (#1516)
* `a96105d9` Obscuroscan: favicon, title, align icons (#1625)
* `9a370655` Respond with latest for 'pending' block number requests (#1623)

# Oct 2023-10-26 (v0.19.0)
* A list of the PRs merged in this release is as below;
* `9eb4dd0e` Contract changes for storing addresses (#1622)
Expand Down
7 changes: 7 additions & 0 deletions go/common/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ type EnclaveScan interface {

// GetPublicTransactionData returns a list of public transaction data
GetPublicTransactionData(pagination *QueryPagination) (*TransactionListingResponse, SystemError)

// EnclavePublicConfig returns network data that is known to the enclave but can be shared publicly
EnclavePublicConfig() (*EnclavePublicConfig, SystemError)
}

// BlockSubmissionResponse is the response sent from the enclave back to the node after ingesting a block
Expand All @@ -151,3 +154,7 @@ type ProducedSecretResponse struct {
RequesterID gethcommon.Address
HostAddress string
}

type EnclavePublicConfig struct {
L2MessageBusAddress gethcommon.Address
}
1 change: 1 addition & 0 deletions go/common/query_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ type ObscuroNetworkInfo struct {
L1StartHash common.Hash
SequencerID common.Address
MessageBusAddress common.Address
L2MessageBusAddress common.Address
ImportantContracts map[string]common.Address // map of contract name to address
}
Loading

0 comments on commit 2f0b402

Please sign in to comment.