-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Illia malachyn/embed scripts to rosetta (#66)
* embed scripts instead of copypasting * add comments, update spork info * update sporks to version 7
- Loading branch information
1 parent
41d1988
commit 77ba663
Showing
6 changed files
with
70 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FlowFees from 0xe5a8b7f23e8b548f | ||
|
||
access(all) fun main(inclusionEffort: UFix64, executionEffort: UFix64): UFix64 { | ||
return FlowFees.computeFees(inclusionEffort: inclusionEffort, executionEffort: executionEffort) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import FlowColdStorageProxy from 0xProxy | ||
|
||
access(all) fun main(addr: Address): String { | ||
let acct = getAccount(addr) | ||
let ref = acct.capabilities.borrow<&FlowColdStorageProxy.Vault>(FlowColdStorageProxy.VaultCapabilityPublicPath) | ||
if let vault = ref { | ||
return String.encodeHex(vault.getPublicKey()) | ||
} | ||
return "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
transaction(publicKeys: [String]) { | ||
prepare(payer: auth(AddKey, BorrowValue) &Account) { | ||
for key in publicKeys { | ||
// Create an account and set the account public key. | ||
let acct = Account(payer: payer) | ||
let publicKey = PublicKey( | ||
publicKey: key.decodeHex(), | ||
signatureAlgorithm: SignatureAlgorithm.ECDSA_secp256k1 | ||
) | ||
acct.keys.add( | ||
publicKey: publicKey, | ||
hashAlgorithm: HashAlgorithm.SHA3_256, | ||
weight: 1000.0 | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters