-
Contract
-
Resource (Composite Type)
-
Event
-
Interface
- Restricted types
-
Functions
- Function Preconditions and Postconditions
-
Optionals
-
References
-
Capabilities
-
Access Control
-
Script
-
Transactions
- UInt64
- UFix64
- Address
- AuthAccount
- Array
- Dictionary
- Types
- Functions
- Contract
- Transaction
- Script
- Resource (Composite Type)
- Interface
- Restricted types
- Optionals
- References
- Capabilities
- Flow CLI
- Flow Emulator
- Transaction Lifecycle
- Event
- Function Preconditions and Postconditions
- Access Control
- Testnet
flow emulator start
flow keys generate --sig-algo "ECDSA_secp256k1"
flow accounts create \
--key "2824549ffffe11edc1e170f0c1186b9a588444812cdfe9ec0c93df8b858679c0afb4f006a7c273c0fdd18f62e3632fb3f984a682a928fe3c2c82d845a1245137" \
--sig-algo "ECDSA_secp256k1" \
--signer "emulator-account"
flow transactions build ./transactions/test.cdc \
--authorizer owner \
--proposer owner \
--payer owner \
--filter payload \
--save test.rlp
flow transactions sign ./test.rlp \
--signer owner \
--filter payload \
--save test.signed.rlp
flow transactions send-signed ./test.signed.rlp
Initial idea
let numbers = [1, 2, 3]
let numbersRef = &numbers as &[Int]
for number in numbersRef {
log(number)
}
Produces expected array, got "&[Int]"
. This trick below works.
let numbers = [1, 2, 3]
let numbersRef = &numbers as &[Int]
for number in numbersRef.concat([]) {
log(number)
}
It does not call init()
a second time on the account.