Skip to content

Commit

Permalink
add Cadence transaction comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed May 6, 2024
1 parent c417119 commit e2a5662
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
4 changes: 0 additions & 4 deletions cadence/tests/scripts/type_at.cdc

This file was deleted.

6 changes: 6 additions & 0 deletions cadence/transactions/bridge/admin/evm/add_deployer.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import "EVM"
import "EVMUtils"
import "FlowEVMBridgeUtils"

/// This transaction adds the given EVM address as a deployer in the bridge factory contract, indexed on the
/// provided tag.
///
/// @param deployerTag: The tag to index the deployer with - e.g. ERC20, ERC721, etc.
/// @param deployerEVMAddressHex: The EVM address of the deployer contract as a hex string, without the '0x' prefix
///
transaction(deployerTag: String, deployerEVMAddressHex: String) {

let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import "EVM"
import "EVMUtils"
import "FlowEVMBridgeUtils"

/// Sets the bridge factory contract address as a delegated deployer in the provided deployer contract. This enables the
/// factory contract to deploy new contracts via the deployer contract.
///
/// @param deployerEVMAddressHex The EVM address of the deployer contract as a hex string without the '0x' prefix
///
transaction(deployerEVMAddressHex: String) {

let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import "EVM"
import "EVMUtils"
import "FlowEVMBridgeUtils"

/// This transaction sets the address of the registry contract in the bridge factory contract. The registry contract
/// is tasked with maintaining associations between bridge-deployed EVM contracts and their corresponding Cadence
/// implementations.
///
/// NOTE: This is a sensitive operation as the registry contract serves as the source of truth for bridge-deployed
/// contracts.
///
/// @param registryEVMAddressHex The EVM address of the registry contract as a hex string without the '0x' prefix.
///
transaction(registryEVMAddressHex: String) {

let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
Expand Down
4 changes: 2 additions & 2 deletions cadence/transactions/bridge/admin/evm/set_registrar.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import "EVM"
import "EVMUtils"
import "FlowEVMBridgeUtils"

/// Sets the registrar address for the provided FlowBridgeDeploymentRegistry address. Should be called by the owner of
/// the registry contract.
/// Sets the bridge factory contract address as the registrar for the provided FlowBridgeDeploymentRegistry address.
/// Should be called by the owner of the registry contract.
///
/// @param registryEVMAddressHex The EVM address of the FlowBridgeDeploymentRegistry contract.
///
Expand Down

0 comments on commit e2a5662

Please sign in to comment.