Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 207 forks source link

Chain policy config written to vstorage #10512

Closed LuqiPan closed 1 day ago

LuqiPan commented 4 days ago

What is the Problem Being Solved?

Description of the Design

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

samsiegart commented 2 days ago

Chain policies would be keyed by chainId, which is the numeric identifier for each chain. E.g. ETH:1, OP: 10, ARB: 42161, etc..

The policy for each chain would contain:

nobleContractAddress: Hex;

cctpTokenMessengerAddress: Hex;

confrimations: integer; The number of confirmations needed before a submission occurs

bridgeContractAddress?: Hex; Denotes the bridging contract, or equivalent, we want the Oracle Operator to query to determine L1 inclusion Note: L2's communicate finality to ETH differently, so the term "bridgeContract" may not apply to all chains

We are also considering adding the following fields to the policy:

chainName: string; Since chainId is an integer, is it helpful to also include a human-readable identifier?

nobleDomainId: integer;

nobleAgoricChannelId: IBCChannelID;

eventFilter: ABIString;

chainType: Enum;