diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 89a9f58..db46aae 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -122,10 +122,42 @@ access(all) contract DependencyAudit { } } - access(self) fun getBoundaries(): Boundaries? { + access(all) fun getBoundaries(): Boundaries? { return self.account.copy(from: /storage/flowDependencyAuditBoundaries) } + access(all) fun getCurrentFailureProbability(): UFix64 { + if !DependencyAudit.panicOnUnstaged { + return 0.0 as UFix64 + } + + let maybeBoundaries = self.getBoundaries() + if maybeBoundaries == nil { + return 1.0 as UFix64 + } + + let boundaries = maybeBoundaries! + + let startBlock: UInt64 = boundaries.start + let endBlock: UInt64 = boundaries.end + let currentBlock: UInt64 = getCurrentBlock().height + + if startBlock >= endBlock { + return 1.0 as UFix64 + } + if currentBlock >= endBlock { + return 1.0 as UFix64 + } + if currentBlock < startBlock { + return 0.0 as UFix64 + } + + let dif = endBlock - startBlock + let currentDif = currentBlock - startBlock + + return UFix64(currentDif) / UFix64(dif) + } + access(self) fun setBoundaries(boundaries: Boundaries) { self.account.load(from: /storage/flowDependencyAuditBoundaries) self.account.save(boundaries, to: /storage/flowDependencyAuditBoundaries) diff --git a/lib/go/contracts/internal/assets/assets.go b/lib/go/contracts/internal/assets/assets.go index 1bfa3e0..3feeb59 100644 --- a/lib/go/contracts/internal/assets/assets.go +++ b/lib/go/contracts/internal/assets/assets.go @@ -1,6 +1,6 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: -// DependencyAudit.cdc (9.656kB) +// DependencyAudit.cdc (10.527kB) // MigrationContractStaging.cdc (19.438kB) package assets @@ -70,7 +70,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _dependencyauditCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x5a\x6d\x6f\x1b\x37\xf2\x7f\xef\x4f\x31\x11\xf0\x07\x24\x54\x59\xa7\xc5\xff\xae\xa8\x60\x25\x70\x9c\x04\x08\xd0\x36\x45\x9d\xde\xbd\x30\x8c\x8a\xda\x1d\x49\x8c\x29\x52\x47\x72\xa5\xe8\x5c\x7f\xf7\x03\x1f\xb4\x4b\x72\xb9\x6b\x07\x6d\x63\x14\x8d\x56\x3b\x9c\x87\xdf\x0c\x87\x33\x43\xd1\xed\x4e\x48\x0d\xa3\x9f\xe8\x5a\x12\x4d\x05\xbf\x12\x5c\x4b\x52\xea\x6b\x4d\xd6\x94\xaf\x47\x67\x67\xe7\xe7\xf0\x71\x43\x15\x94\xfe\x0d\x50\x65\xfe\xab\x15\x56\xb0\x3c\x82\xde\x20\xbc\xfb\xd7\x4f\x50\x12\xc6\x28\x5f\xdb\xe7\x45\xb9\xc1\xf2\xee\x0d\xee\x90\x57\xc8\x4b\x8a\x6a\x01\xab\x9a\x97\x46\x00\xac\xa4\xd8\x02\x69\x9f\xc5\xca\xae\x51\x64\x8b\xc0\xcd\xff\x08\xaf\x40\x51\xbe\xe6\x44\xd7\x12\x81\x72\x27\x83\x89\xc3\x35\xca\x3d\x2d\xf1\xb2\x2c\x45\xcd\x75\xa3\xd1\xd4\xe8\x48\xb4\x25\x43\x5e\x19\x8e\xb8\x47\x79\x04\x2d\x09\x57\xc4\x8a\x29\x9c\x1d\x08\x8b\x2a\x50\xeb\xb2\xaa\x24\x2a\x65\xf4\x33\x52\xa3\x77\x3f\x93\xad\xf9\xfe\x40\x19\x83\x25\x02\x61\xcc\x0a\x08\x49\x80\x23\x56\x15\x56\xa0\x05\xc8\xda\xe8\x69\xb4\x88\x85\x36\x72\x87\x30\xb1\x42\x2c\x01\xd0\x15\x10\x7e\x3c\xa1\x12\x49\x23\x12\x81\x0b\x0d\x4a\x93\x35\x56\x27\x60\xfa\x5c\xd7\xc0\x63\x4d\x7f\xff\x54\xb6\x53\x4b\x10\x6b\x86\x5b\xaa\x81\x70\x83\x2a\xd7\x70\xa0\x7a\x63\x89\x6a\xee\x35\x09\xd9\x4d\x41\x48\xd8\x11\x4e\x4b\x63\xca\xc2\x7e\xfa\xc0\x7f\xf3\xa4\x0b\x13\x3a\x0a\xb5\x41\x4c\xcb\x1a\x8b\x33\x52\x96\xa8\xd4\x98\x30\x36\x69\x43\xac\x81\xe9\x78\x59\x57\x54\xc3\xfd\xd9\x19\x00\x40\x48\xcb\x50\xc3\x65\xb5\xa5\x9c\x2a\x2d\x89\x16\xf2\x5a\x0b\x49\xd6\xf8\x0b\xd1\x9b\x19\x04\x0f\x6e\xa9\xf7\x82\x3a\x2a\x8d\x5b\x20\x27\xbf\xc3\x86\xec\xb1\x91\xab\x9c\x07\xad\xcd\x06\x91\x25\x3a\x50\x14\xec\x29\xb1\x26\x6f\x4f\x60\xb7\xba\x2a\x01\x07\x04\xfc\x5c\xb2\xba\x42\x43\xb4\x75\x21\x1e\xe1\x7c\x34\xde\xbd\x2b\x55\x68\x86\x42\xb6\x9a\xc0\x9e\xc8\xd3\xe2\xaa\x09\xc7\x19\xdc\xfb\xcf\x33\x78\x2d\x04\x7b\xe8\xda\x6f\xd6\x25\xe0\x3a\xda\x2e\xa9\x73\xdb\x89\x2a\x0c\xc1\x71\xe8\xb9\x19\xdc\xb4\xb8\xdf\x4e\xfa\xf8\xfc\x12\x0b\x0d\xd9\x5d\x6d\x08\x5f\x63\x35\x56\x1b\x51\xb3\xca\x12\x3a\x9d\x7a\x99\xbd\x66\xa2\xbc\x7b\x2d\x6a\x5e\x11\x19\x32\xd0\x44\xea\x19\xfc\xf6\x9e\xeb\x7f\xfe\xff\xab\xa9\xd9\xd5\xcd\xd3\xa4\x71\x68\x67\x47\x99\xe0\x32\x79\x08\xab\xd6\x05\x03\x79\x23\xd2\xc9\xbd\x9b\x98\xc8\xef\x32\x1e\xff\x0e\xd9\xb4\x31\x83\x1b\xff\xf9\x76\x0a\x31\x8d\x4d\x1f\x33\xb8\xb9\xd6\x92\xf2\xb5\x7d\x4d\x6a\xbd\x11\x92\xfe\x17\x65\xb8\x70\x02\xf7\x56\x11\xf3\x67\x9c\x5a\x67\x80\x8d\x5d\x03\x73\xb8\xb9\x3d\x8b\x16\xf1\x7a\x1b\x01\x31\xcf\xeb\x5b\x30\xe4\x6b\xbd\x89\x96\x52\x98\xc3\x8b\xe6\x9b\xc3\x86\x32\x04\x0a\x17\x1d\x96\xad\x96\xe6\xcf\x6c\x3f\xaa\xde\xfa\xc0\x85\x79\xba\x65\x8b\x4e\x4c\xdf\x64\x35\xba\xa1\xb7\xb7\xf0\xea\x15\xac\x08\x53\x18\x49\xa0\xab\x50\x40\x2c\xdd\xbe\x87\x39\x50\xf8\x06\xbe\xed\xbc\x31\xfe\xa5\xbc\x8e\xd9\x3d\x9c\x75\xf4\xf7\xd9\x6b\xde\x9b\x42\x0b\xaa\xae\x2d\xcd\x98\x9c\x76\x63\x9f\x11\x53\x7b\x76\xcd\xba\x21\x70\x43\x6f\x27\xa9\x5d\xcf\xbc\xe4\xae\x51\x39\xe7\x17\x64\x67\x1e\xc6\x2d\xc2\x7f\x52\x9d\xc9\x10\x30\x5d\x58\x03\x02\xba\xca\x6b\xe8\xc2\x0a\x5e\xc2\x8b\xc4\x26\x93\xe3\x8a\x2d\x39\x2e\x71\x20\x6d\x8c\x73\x3c\x27\xb1\x5a\xf6\x08\x7a\x42\x0a\xcb\xb3\x6a\x4d\x09\x0c\x8a\xd2\xb0\xd9\xf6\x8f\xea\xf9\xfb\x13\x36\x67\xb8\x9d\xdd\xb9\x3b\x74\x06\xda\xb0\xcf\x1d\xb9\x12\x75\x2d\xb9\x3d\x6b\x45\xad\x5d\xa6\xbf\xa3\x7c\x1d\xf2\xfe\xb8\x41\xde\x56\x0d\x07\x04\x97\x77\xfd\xe9\x2b\x09\xaf\xc4\x96\x1d\x43\xe7\x3d\x4b\x77\x69\xa2\x1a\xfc\xf1\x07\x3c\xb3\x3e\x0b\x52\xf8\xaf\x9e\xd1\x78\x92\x38\xd7\xe9\x98\x8b\x93\xbe\x3c\xe6\x92\x21\xcc\x61\x34\x4a\xd3\x57\x0e\x70\x98\x0f\x85\x5b\xc4\xe1\x53\x26\x8b\x7d\x72\x59\x2c\xcb\xf9\x3e\xdd\x93\x9f\x32\xd1\xdb\xb7\x23\x1b\x33\xfa\x5f\x16\xa5\xe0\x25\xd1\xe3\xd1\x14\x46\xe9\x7e\xfb\x0b\xd9\xe7\x28\x6e\x3e\xdd\x16\x5a\x38\xba\xf1\x24\xd9\x47\x06\xa7\x4f\x7d\xdb\xfb\xfc\xdc\x46\x62\x50\xc1\x2a\x17\x8d\x2b\x42\x99\xab\xfb\x08\x6c\x51\x29\xb2\x46\x57\x2a\x31\x21\xee\x14\x30\x7a\x67\x9e\xa9\x9a\xc1\x02\xa5\x14\x72\xe6\x62\x70\x06\xef\xcc\xd1\x9e\x2f\x14\x67\x70\x59\x7c\x57\x22\xc1\x1f\xfe\xf1\x03\x56\xdf\x92\xef\xf1\x7b\x52\xf4\x65\xe2\x69\x8e\x38\x09\xe6\x45\x63\x87\x15\x3e\x1e\xd9\xb6\x25\x30\xc6\xb5\x2d\x06\xda\xb8\x88\x6f\x4b\xea\x95\x90\x70\x25\x51\x95\xc8\x2b\x01\xf5\x6e\x2d\x49\x65\xca\xc3\xad\x59\xa4\x84\xe0\xcf\xe0\x47\x24\x92\xc3\x56\x48\x9c\xc1\x46\xeb\x9d\x9a\x9d\x9f\x2f\xa9\x2e\xd8\xf1\xfc\xdd\x8f\x1f\xfe\x7d\xf5\xeb\xdb\xeb\xab\xb7\x3f\xbf\xf9\x50\xc0\x9b\xbc\x90\x19\x8c\x86\xbc\xe7\xfc\xe6\x73\xf4\x43\x53\xeb\x64\xf6\x63\xd3\x85\x99\xee\xe3\xf4\x9d\xdb\xfb\x82\xe7\x31\x0f\x4b\xe1\x9d\x14\x4b\xb2\xa4\x8c\x6a\xdb\x16\x34\x19\xc6\xb0\x5d\x12\xc3\x57\xb8\x06\xa3\xac\xa5\x34\xb5\xda\xd2\xd4\x6a\xb0\x41\xba\xde\x68\xdb\x2e\xd9\xb6\xcd\x54\x6a\xf6\xc9\x74\x5e\x21\x49\x23\xec\xfd\x2a\xa0\x8c\x98\x50\x05\x6b\x89\x44\xa3\x34\xd1\xc4\x4d\xe7\x80\xff\xa9\x09\xb3\xdd\x81\x6f\xe6\xc2\x05\x03\x89\xd2\x34\x13\xa1\x75\x31\x11\x61\x07\x72\x54\x21\xad\xd9\xf2\x5d\xe3\xa8\xb2\x9e\x75\xda\xe4\x34\x78\xaa\x08\x9b\xd7\x7b\x65\x30\x54\xaa\x95\xd1\x05\xa6\x5f\x4a\x62\x01\xf1\x8e\x37\x69\x6e\x89\x12\x96\xa8\x0f\x88\xfc\x31\xcf\x74\x75\xc8\xf9\xb8\xd5\xc2\xc0\x82\x84\x2b\x4b\xda\x1f\x37\xbc\x94\x48\x4c\x53\xc5\x28\x47\x22\xd9\x11\x88\x1a\x88\xa0\xdd\x4e\x0a\x52\x6e\x50\xf5\x23\xdd\x39\xa2\xb3\xc7\x92\xeb\x31\xe2\x73\x77\xed\xea\xbb\x34\xe2\x84\x6c\x23\x25\xa0\x4c\x85\xf7\xd1\xf5\xc2\x14\xd0\xe4\x3d\x12\x79\x23\x5c\x42\x57\xc9\x8a\xc8\x37\xb1\xc0\x34\xd6\x3d\x0b\x34\xb1\x16\x06\x5e\x9b\xd1\x4d\x99\x6b\xcb\x9a\xb6\xc7\x82\xb9\xab\xca\xd6\xa8\xdb\x2f\xc7\x93\xb0\x4c\xe8\xac\x98\x03\xa7\x2c\x39\x1c\x9d\xee\x0a\xb5\xa6\x7c\xed\xa6\x08\x94\xef\x09\xa3\x95\xc9\x4a\x50\xe1\x8a\xd4\xcc\xf4\xd0\x1b\xb2\xa7\xa2\x3e\x9d\x09\xb1\xf6\xd0\x94\x11\xf1\xf7\x0f\x91\x05\xcb\x50\xf9\x44\xb9\x67\xb1\xb1\x16\x67\xdb\x55\x9e\x1a\x46\x98\x07\xeb\x0b\xfb\x3e\x5a\x81\xbc\x1a\xa0\x0f\xbd\xc5\xda\x08\x48\x57\xac\x51\x5f\x05\x6f\xc6\x93\xc2\x07\x47\x08\x6b\xab\x1b\xbc\x9c\x37\x72\xbb\xb0\x9a\x93\xf4\x54\xcb\x71\xdc\xa3\x84\x8d\x6d\x01\x60\x89\xa5\x81\xf6\x80\x60\x71\x26\xda\xce\x1b\x42\x78\x0e\xa6\x24\xf4\x3e\xb1\xb3\x88\xaf\xe9\xb2\x08\xa8\x8a\xae\x20\x30\xf2\x79\x60\x7d\x54\xb8\x49\x6e\x3a\x30\x69\xcc\xd4\x74\xc9\xd0\x6d\xeb\xf1\x04\xfe\xcf\xb0\x68\x48\x3d\x19\xaf\xe0\x9b\x90\x53\xb8\x0d\x6c\x91\xe2\x53\xee\xc0\x96\xea\x24\xa4\xb3\xc4\x2a\x23\xe4\x22\x72\x74\xa6\x6b\xb0\x33\x0c\xa5\x65\x5d\x6a\x08\x76\x4a\xeb\xcb\x74\x56\x15\x8d\x34\x7a\xa9\x82\x41\x47\x10\x3a\x9c\xea\x78\x24\x12\x4d\x44\xd2\xb2\xdc\xd5\xef\x36\xdf\xcc\x21\x8e\xf7\xe6\x35\x5a\x38\xc3\xe0\x1e\x6e\x8d\x92\x64\x31\x0b\x6c\x7e\x15\x88\xf7\x08\x5a\x11\x7e\xa2\x52\x94\x62\x77\xbc\x68\xc9\x5f\x8e\x57\x52\x6c\x67\x70\xae\xdc\x88\xee\x7c\xc5\xc4\x21\xa9\xe4\x5a\xea\xc9\xa0\x56\x2a\xd2\xaa\xdd\x06\xa1\x7a\x21\x3a\x91\x5e\x4c\x90\xea\x4f\xea\xd5\xe1\xa9\xc8\x1e\x03\x3d\xa6\xa0\xc5\x5f\x63\x69\xcd\x63\x5b\xff\x4e\xab\x1e\xa2\x89\x69\x34\x63\x05\x89\x4a\xc8\x12\xa1\x24\x26\x1b\x35\xe5\x27\xa9\x2a\xb0\x6f\xb7\x62\x8f\xc1\x74\xb5\x99\xc2\x75\xa6\x41\x50\x51\x5b\xd6\x10\x79\xf4\xd2\x3a\xbb\xcb\xc8\xaa\x8d\xb0\x58\x85\xe8\x98\x27\x55\xf5\xb6\xc3\xda\x68\x63\x84\xb6\x7a\x9c\xea\xc9\xc7\xb4\x48\x55\x30\xd0\xe7\x44\x8c\x49\x66\x02\x98\xee\x43\xd3\x4c\x78\x3a\xa0\x3c\xd0\xa6\xdb\x64\x3e\x3e\x3c\xf3\xab\x6f\x61\xde\xcd\xc6\x0f\x3d\xbd\x9c\x73\x47\x17\x1f\xef\xa6\x18\xa2\xa7\xbb\x2a\x07\x52\x8f\xa8\xaf\x8e\x53\xe1\x14\x19\xdf\xe1\x71\x76\xe2\xd4\xd7\x7e\xc7\x60\x29\xd4\x03\xa3\x1f\xf3\xda\xd5\xa9\xdd\x69\xce\x9e\x48\x4a\x96\x0c\x4f\x51\xb6\x27\xac\x46\x53\x1a\x2f\x82\x6a\x75\xd1\x0b\xdd\xb0\xe0\xcc\x2c\x3d\xc1\xe5\xb1\x91\xce\x3c\x2c\x9a\xbb\x33\xb5\x2f\x1d\xe7\x07\x0f\x93\x7e\x28\xaf\xcd\xb1\xf3\xf6\x74\xf8\x37\xe0\x0d\xf5\x24\x26\x0c\x2c\xc0\x99\x1a\xbf\xbd\x2a\x1b\x82\x31\x12\xfa\x05\x07\xe6\x4e\x62\x26\xd6\x9c\xae\x17\x6e\xe1\xe8\xba\xdb\x4b\x6c\x6b\x65\xaf\x88\xda\xd2\x22\x35\x6a\xf4\xd8\x04\x3a\x2a\x6c\x83\xf4\xee\x75\xb7\xff\x78\xd5\x91\x57\x93\x41\xbf\xf7\x1f\x86\xcb\xcc\xb1\xd5\xf8\x7f\xf8\x06\xa6\x57\x83\xd8\xe3\xf6\x78\x8a\x7d\x6e\xbf\xfa\xdb\xbd\xde\x15\xdc\x99\x52\xa6\x38\x75\x8e\xd2\x2f\xc5\x84\x53\xe6\x11\xe1\x94\xf5\x21\xa2\x51\xe9\xab\xdc\xfd\x94\x3d\x32\xad\xd5\xa8\x6c\x95\xbe\xab\xe5\x4e\x28\x3f\x9b\xf1\xab\xdf\xfb\x4b\xc8\xf2\x74\xeb\xfc\xc8\xed\xb1\xbf\x90\xdd\x49\xb1\xa7\x55\x6e\xe6\xe3\xf9\xe6\xd8\x50\x05\x42\x6f\x50\x1e\xa8\x72\xf7\xc0\x46\xa8\xcd\x67\xcd\x91\x20\x6a\xad\x68\x85\xbd\x5e\xc8\x1a\xfb\xb5\xee\xcc\xa0\xad\x3b\x53\x57\x77\xef\xf1\xb2\x1a\x4d\xbb\x4a\x4c\x43\xc1\xc3\xf7\x07\x61\x27\xd0\x2a\x30\xd0\x09\x34\x97\x37\x5e\x81\x5e\x42\x77\x85\xe3\xc0\x48\xba\x81\x94\xc7\x34\x22\xce\x76\x04\xa7\x23\x76\x7e\x52\xa0\x4b\x62\x7f\x7e\x31\xb7\xac\x72\x61\xdd\x71\x7b\x33\x64\x3e\x09\x4e\xe4\x9a\xfe\xce\x0b\x6b\x66\xda\xa1\x2e\xc1\x98\x3a\xed\x53\x7d\x8d\xf2\xe2\xb3\xc9\xce\x2b\xfa\x39\x7a\x9f\xf2\x8c\x9e\x0b\xc5\x68\x89\xbe\xee\xfd\x6e\x0a\xf5\xee\xa3\x98\x25\x24\xee\x02\x61\x92\x8b\xa1\xd1\x65\xd1\xcc\x67\xa3\x45\x93\x66\xa4\x5f\x8c\x9a\xcf\x0d\x6c\x3d\x31\xe2\x8b\x68\x62\x2a\xd8\xb6\xa0\x35\xed\x3d\xd9\xbb\xd2\xd9\x25\x48\x5b\x9c\x83\x12\xfe\x27\x24\xcd\x12\x5f\x67\x3b\xe4\xdb\x1f\xdc\x28\x77\xa1\x0d\xbe\xea\x0f\x45\x2d\x3a\x35\x51\xfb\x1b\x96\xb8\xe2\x6b\xd2\x86\xff\x51\x44\xf3\x2b\x88\xe2\xac\x89\xb3\xcc\x2f\x13\xb2\x9b\xd0\x35\x95\x9d\xca\x71\x0e\xf7\x0f\x31\x4d\xb7\x3a\x49\x26\x56\x96\xaa\xef\x87\x1d\x30\x1f\xec\x64\xec\xb2\x96\x55\x52\x58\x76\xd5\xcb\xec\x92\xa7\x57\xde\xc9\xbc\xc3\xf9\xeb\xe2\x39\x94\x76\xa2\x1d\x37\x2d\xe3\xa1\x7e\xf1\xe2\xb9\x5d\xeb\x9a\xc5\x41\xf3\x4f\xfd\xd9\xc3\xd9\xff\x02\x00\x00\xff\xff\x49\x78\x3d\x05\xb8\x25\x00\x00" +var _dependencyauditCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x5a\x5f\x6f\x1b\x37\x12\x7f\xf7\xa7\x98\x08\x38\x40\x42\x95\x75\x52\xf4\x5a\x54\xb0\x12\x38\x4e\x02\x04\x68\x9b\xa0\x4e\xee\x1e\x0c\xa3\xa2\x76\x47\x12\x63\x8a\xd4\x91\x5c\x29\x3a\xd7\xdf\xfd\xc0\x3f\xbb\x4b\xee\x72\xd7\xce\xa5\xc9\x4b\x8d\xa2\xd1\xee\x0e\x67\x7e\xf3\x87\xc3\x19\x92\x74\xbb\x13\x52\xc3\xe8\x57\xba\x96\x44\x53\xc1\x2f\x04\xd7\x92\xe4\xfa\x52\x93\x35\xe5\xeb\xd1\xc9\xc9\xe9\x29\xbc\xdf\x50\x05\xb9\xff\x02\x54\x99\xff\x4a\x85\x05\x2c\x8f\xa0\x37\x08\xaf\xff\xf5\x2b\xe4\x84\x31\xca\xd7\xf6\x79\x91\x6f\x30\xbf\x79\x89\x3b\xe4\x05\xf2\x9c\xa2\x5a\xc0\xaa\xe4\xb9\x11\x00\x2b\x29\xb6\x40\x9a\x67\xb1\xb2\x63\x14\xd9\x22\x70\xf3\x3f\xc2\x0b\x50\x94\xaf\x39\xd1\xa5\x44\xa0\xdc\xc9\x60\xe2\x70\x89\x72\x4f\x73\x3c\xcf\x73\x51\x72\x5d\x23\x9a\x1a\x8c\x44\x5b\x32\xe4\x85\xe1\x88\x7b\x94\x47\xd0\x92\x70\x45\xac\x98\xcc\xe9\x81\xb0\x28\x02\x58\xe7\x45\x21\x51\x29\x83\xcf\x48\x8d\xbe\xfd\x46\xb6\xe6\xfd\x81\x32\x06\x4b\x04\xc2\x98\x15\x10\x92\x00\x47\x2c\x0a\x2c\x40\x0b\x90\xa5\xc1\x69\x50\xc4\x42\x6b\xb9\x43\x36\xb1\x42\x2c\x01\xd0\x15\x10\x7e\xac\xac\x12\x49\x23\x12\x81\x0b\x0d\x4a\x93\x35\x16\x95\x61\xfa\x5c\x57\x9b\xc7\xaa\xfe\xe6\xa1\x6c\xa7\x96\x20\x46\x86\x5b\xaa\x81\x70\x63\x55\xae\xe1\x40\xf5\xc6\x12\x95\xdc\x23\x09\xd9\x4d\x41\x48\xd8\x11\x4e\x73\xa3\xca\xc2\xfe\x7a\xcb\x3f\x78\xd2\x85\x09\x1d\x85\xda\x58\x4c\xcb\x12\xb3\x13\x92\xe7\xa8\xd4\x98\x30\x36\x69\x42\xac\x36\xd3\xf1\xbc\x2c\xa8\x86\xdb\x93\x13\x00\x80\x90\x96\xa1\x86\xf3\x62\x4b\x39\x55\x5a\x12\x2d\xe4\xa5\x16\x92\xac\xf1\x1d\xd1\x9b\x19\x04\x0f\x6e\xa8\xf7\x82\x3a\x2a\x8d\x5b\x20\x95\xdf\x61\x43\xf6\x58\xcb\x55\xce\x83\x56\x67\x63\x91\x25\x3a\xa3\x28\xd8\x53\x62\x55\xde\x56\xc6\x6e\xb0\x2a\x01\x07\x04\xfc\x94\xb3\xb2\x40\x43\xb4\x75\x21\x1e\xd9\xf9\x68\xbc\x7b\x93\xab\x50\x0d\x85\x6c\x35\x81\x3d\x91\xd5\xe0\xa2\x0e\xc7\x19\xdc\xfa\xdf\x33\x78\x21\x04\xbb\xeb\xea\x6f\xc6\xb5\x8c\xeb\x68\xbb\xa4\xce\x6d\x15\x55\x18\x82\xe3\xd0\x73\x33\xb8\x6a\xec\x7e\x3d\xe9\xe3\xf3\x2e\x16\x1a\xb2\xbb\xd8\x10\xbe\xc6\x62\xac\x36\xa2\x64\x85\x25\x74\x98\x7a\x99\xbd\x60\x22\xbf\x79\x21\x4a\x5e\x10\x19\x32\xd0\x44\xea\x19\x7c\x78\xc3\xf5\x8f\x3f\x3c\x9f\x9a\x59\x5d\x3f\x4d\x6a\x87\x76\x66\x94\x09\x2e\x93\x87\xb0\x68\x5c\x30\x90\x37\x22\x4c\xee\xdb\xc4\x44\x7e\x97\xf1\xf8\x0f\x48\xa6\x8d\x19\x5c\xf9\xdf\xd7\x53\x88\x69\x6c\xfa\x98\xc1\xd5\xa5\x96\x94\xaf\xed\x67\x52\xea\x8d\x90\xf4\xbf\x28\xc3\x81\x13\xb8\xb5\x40\xcc\x9f\x71\x6a\x99\x30\x6c\xec\x1a\x98\xc3\xd5\xf5\x49\x34\x88\x97\xdb\xc8\x10\xf3\x34\xde\x8c\x21\x5f\xeb\x4d\x34\x94\xc2\x1c\x9e\xd4\x6f\x0e\x1b\xca\x10\x28\x9c\x75\x58\x36\x28\xcd\x9f\x99\x7e\x54\xbd\xf2\x81\x0b\xf3\xf6\x94\xcd\x3a\x31\x7d\x95\x44\x74\x45\xaf\xaf\xe1\xf9\x73\x58\x11\xa6\x30\x92\x40\x57\xa1\x80\x58\xba\xfd\x0e\x73\xa0\xf0\x1d\x3c\xed\x7c\x31\xfe\xa5\xbc\x8c\xd9\xdd\x9d\x74\xf0\xfb\xec\x35\xef\x4d\xa1\x19\x55\x97\x96\x66\x4c\xaa\xd9\xd8\xa7\xc4\xd4\xae\x5d\xb3\x6e\x08\x5c\xd1\xeb\x49\x5b\xaf\x47\x5e\x72\x57\xa9\x94\xf3\x33\xb2\x33\x0f\xe3\xc6\xc2\x5f\x08\x67\x32\x64\x98\xae\x59\x03\x02\xba\x4a\x23\x74\x61\x05\xcf\xe0\x49\x4b\x27\x93\xe3\xb2\x2d\x39\x2e\x71\x20\x6d\x8c\x53\x3c\x27\x31\x2c\xbb\x04\x3d\x20\x85\xa5\x59\x35\xaa\x04\x0a\x45\x69\xd8\x4c\xfb\x7b\x71\xfe\xf1\x80\xc9\x19\x4e\x67\xb7\xee\x0e\xad\x81\x36\xec\x53\x4b\xae\x44\x5d\x4a\x6e\xd7\x5a\x51\x6a\x97\xe9\x6f\x28\x5f\x87\xbc\xdf\x6f\x90\x37\x55\xc3\x01\xc1\xe5\x5d\xbf\xfa\x4a\xc2\x0b\xb1\x65\xc7\xd0\x79\x8f\xda\xb3\xb4\x05\x0d\xfe\xfc\x13\x1e\x59\x9f\x05\x29\xfc\x77\xcf\x68\x3c\x69\x39\xd7\x61\x4c\xc5\x49\x5f\x1e\x73\xc9\x10\xe6\x30\x1a\xb5\xd3\x57\xca\xe0\x30\x1f\x0a\xb7\x88\xc3\xc7\x44\x16\xfb\xe8\xb2\x58\x92\xf3\x6d\x7b\x4e\x7e\x4c\x44\x6f\xdf\x8c\xac\xd5\xe8\xff\x98\xe5\x82\xe7\x44\x8f\x47\x53\x18\xb5\xe7\xdb\x5f\xc8\x3e\x45\x71\xf5\xf1\x3a\xd3\xc2\xd1\x8d\x27\xad\x79\x64\xec\xf4\xb1\x6f\x7a\x9f\x9e\xda\x48\x0c\x2a\x58\xe5\xa2\x71\x45\x28\x73\x75\x1f\x81\x2d\x2a\x45\xd6\xe8\x4a\x25\x26\xc4\x8d\x02\x46\x6f\xcc\x33\x55\x33\x58\xa0\x94\x42\xce\x5c\x0c\xce\xe0\xb5\x59\xda\xd3\x85\xe2\x0c\xce\xb3\xef\x73\x24\xf8\xf3\x3f\x7f\xc6\xe2\x29\xf9\x09\x7f\x22\x59\x5f\x26\x9e\xa6\x88\x5b\xc1\xbc\xa8\xf5\xb0\xc2\xc7\x23\xdb\xb6\x04\xca\xb8\xb6\xc5\x98\x36\x2e\xe2\x9b\x92\x7a\x25\x24\x5c\x48\x54\x39\xf2\x42\x40\xb9\x5b\x4b\x52\x98\xf2\x70\x6b\x06\x29\x21\xf8\x23\xf8\x05\x89\xe4\xb0\x15\x12\x67\xb0\xd1\x7a\xa7\x66\xa7\xa7\x4b\xaa\x33\x76\x3c\x7d\xfd\xcb\xdb\x7f\x5f\xfc\xfe\xea\xf2\xe2\xd5\x6f\x2f\xdf\x66\xf0\x32\x2d\x64\x06\xa3\x21\xef\x39\xbf\xf9\x1c\x7d\x57\xd7\x3a\x89\xf9\x58\x77\x61\xa6\xfb\xa8\xde\xb9\xb9\x2f\x78\xda\xe6\x61\x29\xbc\x93\x62\x49\x96\x94\x51\x6d\xdb\x82\x3a\xc3\x18\xb6\x4b\x62\xf8\x0a\xd7\x60\xe4\xa5\x94\xa6\x56\x5b\x9a\x5a\x0d\x36\x48\xd7\x1b\x6d\xdb\x25\xdb\xb6\x99\x4a\xcd\x3e\x99\xce\x2b\x24\xa9\x85\xbd\x59\x05\x94\x11\x13\xaa\x60\x2d\x91\x68\x94\x26\x9a\xb8\xe9\x1c\xf0\x3f\x25\x61\xb6\x3b\xf0\xcd\x5c\x38\x60\x20\x51\x9a\x66\x22\xd4\x2e\x26\x22\xec\x40\x8e\x2a\xa4\x35\x53\xbe\xab\x1c\x55\xd6\xb3\x0e\x4d\x0a\xc1\x43\x45\xd8\xbc\xde\x2b\x83\xa1\x52\x8d\x8c\xae\x61\xfa\xa5\xb4\x34\x20\xde\xf1\x26\xcd\x2d\x51\xc2\x12\xf5\x01\x91\xdf\xe7\x99\x2e\x86\x94\x8f\x1b\x14\xc6\x2c\x48\xb8\xb2\xa4\xfd\x71\xc3\x73\x89\xc4\x34\x55\x8c\x72\x24\x92\x1d\x81\xa8\x81\x08\xda\xed\xa4\x20\xf9\x06\x55\xbf\xa5\x3b\x4b\x74\x72\x59\x72\x3d\x46\xbc\xee\xae\x5d\x7d\xd7\x8e\x38\x21\x9b\x48\x09\x28\xdb\xc2\xfb\xe8\x7a\xcd\x14\xd0\xa4\x3d\x12\x79\x23\x1c\x42\x57\xad\x11\x91\x6f\x62\x81\xed\x58\xf7\x2c\xd0\xc4\x5a\x18\x78\x4d\x46\x37\x65\xae\x2d\x6b\x9a\x1e\x0b\xe6\xae\x2a\x5b\xa3\x6e\x5e\x8e\x27\x61\x99\xd0\x19\x31\x07\x4e\x59\x6b\x71\x74\xd8\x15\x6a\x4d\xf9\xda\xed\x22\x50\xbe\x27\x8c\x16\x26\x2b\x41\x81\x2b\x52\x32\xd3\x43\x6f\xc8\x9e\x8a\xb2\x5a\x13\x62\xf4\x50\x97\x11\xf1\xfb\xbb\x48\x83\x65\x08\xbe\x05\xee\x51\xac\xac\xb5\xb3\xed\x2a\xab\x86\x11\xe6\xc1\xf8\xcc\x7e\x8f\x46\x20\x2f\x06\xe8\x43\x6f\xb1\x26\x02\xda\x23\xd6\xa8\x2f\x82\x2f\xe3\x49\xe6\x83\x23\x34\x6b\x83\x0d\x9e\xcd\x6b\xb9\x5d\xb3\x9a\x95\xb4\xaa\xe5\x38\xee\x51\xc2\xc6\xb6\x00\xb0\xc4\xdc\x98\xf6\x80\x60\xed\x4c\xb4\xdd\x6f\x08\xcd\x73\x30\x25\xa1\xf7\x89\xdd\x8b\xf8\x96\x2e\x8b\x0c\x55\xd0\x15\x04\x4a\x3e\x0e\xb4\x8f\x0a\x37\xc9\x4d\x07\x26\x8d\x9a\x9a\x2e\x19\xba\x69\x3d\x9e\xc0\x3f\x0c\x8b\x9a\xd4\x93\xf1\x02\xbe\x0b\x39\x85\xd3\xc0\x16\x29\x3e\xe5\x0e\x4c\xa9\x4e\x42\x3a\x69\x69\x65\x84\x9c\x45\x8e\x4e\x74\x0d\x76\x0f\x43\x69\x59\xe6\x1a\x82\x99\xd2\xf8\xb2\xbd\x57\x15\x6d\x69\xf4\x52\x05\x1b\x1d\x41\xe8\x70\xaa\xe3\x2d\x91\x68\x47\xa4\x5d\x96\xbb\xfa\xdd\xe6\x9b\x39\xc4\xf1\x5e\x7f\x46\x6b\xce\x30\xb8\x53\xad\x91\x85\x65\xd2\x6e\x2b\x57\xcc\x02\x95\x9f\x07\xd2\xbd\x01\xad\x04\xbf\xa1\x92\xe5\x62\x77\x3c\x6b\xc8\x9f\x8d\x57\x52\x6c\x67\x70\xaa\xdc\x0e\xdd\xe9\x8a\x89\x43\xab\x90\x6b\xa8\x27\xf7\x80\xf2\x73\xee\x35\xa1\xac\x94\xf8\xae\x59\x99\x0c\xc6\x0f\xaf\xe9\xa7\x1f\x7f\x08\xe0\x3d\xa4\x01\x4a\x75\x38\xf0\x24\x7b\x62\x96\x32\xc7\xb0\x2f\xe0\xbf\x52\x9a\xf5\x10\x9e\x3e\x04\xc2\xdf\x29\x4f\xde\x63\x97\x80\x5d\x08\xe5\xaf\x67\x78\x16\xc2\xfd\xff\xa3\xe7\x21\xe9\x32\xb0\xeb\x4b\x4b\x1e\x01\x79\x9c\xcc\x8b\x1e\x83\x13\x3e\x6e\x46\x4f\xe0\xb4\x7a\x59\xd0\x55\x6a\x9e\x05\x45\x57\x14\xc2\x8d\xd3\xc3\x34\x10\x26\xa1\x68\xfe\x33\x41\x8a\x2f\x9c\xff\x1d\x9e\x8a\xec\x31\xc0\x31\x05\x2d\xbe\x24\xa3\x34\x9a\x96\x3c\xd6\xf5\x6b\x6a\x75\x17\x1d\x4c\x44\x47\x19\x20\x51\x09\x99\x23\xe4\xc4\x2c\xfa\x75\x97\x47\x8a\x02\xec\xd7\xad\xd8\x63\x70\x88\x51\x6f\x76\x77\x36\x5d\xa1\xa0\xb6\x7b\x20\xf2\xe8\xa5\x75\x52\xa9\x91\x55\x1a\x61\x31\x84\xa8\x9a\x26\x45\xf1\xaa\xc3\xda\xa0\x31\x42\x1b\x1c\x55\xdb\x76\x1f\x8a\x36\x04\x63\xfa\x94\x88\x31\x49\x6c\xb4\xb7\x97\x3b\xd3\xb3\x7b\x3a\xa0\x3c\x40\xd3\xdd\xcb\xb9\x7f\x8f\xda\x8f\xbe\x86\x79\xb7\xe8\xb9\xeb\xd9\x32\x71\xee\xe8\xda\xc7\xbb\x29\x36\xd1\xc3\x5d\x95\x32\x52\x8f\xa8\x6f\x6e\xa7\xcc\x01\x19\xdf\xe0\x71\x56\x71\xea\xdb\xe5\x8a\x8d\xa5\x50\x0f\xec\xb0\x9a\xcf\xae\x1d\xec\x6e\x9a\xee\x89\xa4\x64\xc9\xb0\x8a\xb2\x3d\x61\x25\x9a\x0e\x74\x11\x34\x85\x8b\x5e\xd3\x0d\x0b\x4e\x1c\x59\xb5\xec\x72\x5f\xe1\x30\x0f\x7b\xd3\xee\xd6\xf5\xe7\x9e\x9a\x05\x0f\x93\x7e\x53\x5e\x9a\x8c\xff\xaa\x5a\x34\x6a\xe3\x0d\xb5\xfe\x26\x0c\xac\x81\x13\xad\x74\x73\x22\x3d\x64\xc6\x48\xe8\x67\xd4\xa5\x3b\x89\x89\x58\x73\x58\xcf\xdc\xc0\xd1\x65\xb7\x65\xdf\x96\xca\x9e\xc4\x36\x15\x7c\x5b\xa9\xd1\xd0\x79\x46\xa7\x2e\x0a\xd2\xbb\xc7\x6e\xff\xf1\xd0\x91\x17\x93\x41\xbf\xf7\x2f\x86\xcb\xc4\xb2\x55\xfb\x7f\xf8\xa0\xb3\x17\x41\xec\x71\xbb\x3c\xc5\x3e\xb7\xaf\xbe\xba\xd7\xbb\x82\x3b\x87\x01\x6d\x3b\x75\x96\xd2\xcf\xb5\x09\xa7\xcc\x5b\x84\x53\xd6\x67\x11\x8d\x4a\x5f\xa4\x8e\x81\xed\x92\x69\xb5\x46\x65\x9b\xe1\x5d\x29\x77\x42\xf9\x2d\x50\x3f\xfa\x8d\x3f\xeb\xcf\xab\xcb\x1d\xf7\x5c\xd2\xf0\xf7\x1e\x76\x52\xec\x69\x91\xda\x5a\xf5\x7c\x53\x6c\xa8\x02\xa1\x37\x28\x0f\x54\xb9\xeb\x16\x46\xa8\xcd\x67\xf5\x92\x20\x4a\xad\x68\x81\xbd\x5e\x48\x2a\xfb\xad\x8e\xa6\xa1\x29\x26\xdb\xae\xee\x1e\x97\x27\x11\x4d\xbb\x20\xa6\xa1\xe0\xe1\x63\xba\xb0\xe1\x6e\x00\x0c\x34\xdc\xf5\x19\xa9\x07\xd0\x4b\xe8\x4e\x4a\x9d\x31\x5a\x4d\x77\x9b\xc7\x34\x22\x4e\x36\xde\xd5\x12\x3b\xaf\x00\x74\x49\xec\x2d\xa7\xb9\x65\x95\x0a\xeb\x8e\xdb\xeb\xb3\x9c\x4a\x70\x4b\xee\x9e\xd4\x2b\x7b\x7d\x74\x14\x62\x09\x4e\x83\xda\xdb\x41\xbe\x46\x79\xf2\xc9\x64\xe7\x15\xfd\x14\x7d\x6f\xf3\x8c\x9e\x33\xc5\x68\x8e\xbe\xee\xfd\x7e\x0a\xe5\xee\xbd\x98\xb5\x48\xdc\x39\xdd\x24\x15\x43\xa3\xf3\xac\x3e\x06\x89\x06\x4d\xea\x93\xb3\x6c\x54\xff\xae\xcd\xd6\x13\x23\xbe\x88\x26\xa6\x82\x6d\x0a\x5a\xaa\xc0\x74\x0a\x45\x55\x31\xf8\xe2\x1c\x94\xf0\x37\xb5\xea\x21\xbe\xce\x76\x96\x6f\xee\xb5\x29\x77\x6f\x04\x7c\xd5\x1f\x8a\x5a\x74\x6a\xa2\xe6\xaa\x58\x5c\xf1\xd5\x69\xc3\xdf\x3d\xaa\x2f\x1b\x65\x27\x75\x9c\x25\x2e\x00\x25\x27\xa1\xdb\xbb\xe9\x54\x8e\x73\xb8\xbd\x8b\x69\xba\xd5\x49\x6b\x63\xd8\x52\xf5\xdd\x9f\x82\xf9\x60\x27\x63\x87\x35\xac\x5a\x85\x65\x17\x5e\x62\x96\x3c\xbc\xf2\x6e\xf5\xc9\xce\x5f\x67\x8f\x21\xb7\x07\x47\x71\xd3\x32\x1e\xea\x17\xcf\x1e\xdb\xb1\xae\x59\x1c\x54\xbf\xea\xcf\xee\x4e\xfe\x17\x00\x00\xff\xff\x76\x28\xb5\x8b\x1f\x29\x00\x00" func dependencyauditCdcBytes() ([]byte, error) { return bindataRead( @@ -86,7 +86,7 @@ func dependencyauditCdc() (*asset, error) { } info := bindataFileInfo{name: "DependencyAudit.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2b, 0xd7, 0x6b, 0x7d, 0x26, 0xdd, 0xbc, 0x21, 0x74, 0x11, 0x61, 0x22, 0x24, 0x57, 0xb, 0x15, 0x57, 0xe9, 0xa9, 0xb0, 0x1c, 0x68, 0xd5, 0xad, 0xcf, 0x95, 0x26, 0x0, 0x3c, 0x7f, 0x51, 0x85}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x87, 0xbc, 0xe2, 0xb3, 0x2a, 0xea, 0xb8, 0x68, 0x8d, 0xac, 0x3f, 0xc8, 0x6d, 0xd7, 0x34, 0xf1, 0xd6, 0x7e, 0xf6, 0x1d, 0xae, 0x31, 0x2e, 0x8b, 0xa9, 0xc8, 0x5e, 0x7e, 0xf8, 0x30, 0x27}} return a, nil } diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index 587cd57..7b1b153 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -1,6 +1,9 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: // scripts/delegatee/check_delegatee_has_valid_updater_cap.cdc (610B) +// scripts/dependency-audit/get_boundaries.cdc (125B) +// scripts/dependency-audit/get_failure_probability.cdc (119B) +// scripts/dependency-audit/get_should_panic_on_unstaged.cdc (105B) // scripts/migration-contract-staging/get_all_staged_contract_code_for_address.cdc (516B) // scripts/migration-contract-staging/get_all_staged_contract_hosts.cdc (455B) // scripts/migration-contract-staging/get_all_staged_contracts.cdc (406B) @@ -133,6 +136,66 @@ func scriptsDelegateeCheck_delegatee_has_valid_updater_capCdc() (*asset, error) return a, nil } +var _scriptsDependencyAuditGet_boundariesCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\xca\xb1\x0a\x02\x31\x0c\x06\xe0\x3d\x4f\xf1\x73\x53\xbb\xf8\x00\x2e\xa2\xf8\x22\xa1\x8d\x12\xb8\xcb\x95\x34\x19\x44\x7c\x77\x47\xc1\xdb\x3f\xdd\xc6\xee\x81\xe5\x2e\x43\xac\x8b\xb5\xd7\x35\xbb\xc6\x42\xc4\xad\xc9\x9c\x85\xd7\xb5\xe2\x91\x86\x8d\xd5\x4a\x3d\xe3\x4f\x9e\x6e\x7b\x5a\x67\x57\x99\x17\xbc\x09\x00\x5c\x22\xdd\x0e\xf0\x29\xf1\xb3\xa5\xd2\x87\xbe\x01\x00\x00\xff\xff\x33\x55\xbc\x15\x7d\x00\x00\x00" + +func scriptsDependencyAuditGet_boundariesCdcBytes() ([]byte, error) { + return bindataRead( + _scriptsDependencyAuditGet_boundariesCdc, + "scripts/dependency-audit/get_boundaries.cdc", + ) +} + +func scriptsDependencyAuditGet_boundariesCdc() (*asset, error) { + bytes, err := scriptsDependencyAuditGet_boundariesCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "scripts/dependency-audit/get_boundaries.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x46, 0x93, 0x15, 0xc8, 0x41, 0xb2, 0x55, 0x76, 0xe2, 0x8b, 0xf0, 0x72, 0xb9, 0x31, 0x10, 0x3e, 0x56, 0x28, 0x60, 0x7b, 0x48, 0x5f, 0xeb, 0x1e, 0xa7, 0xb1, 0x8f, 0x6c, 0xbf, 0xb5, 0x1b, 0x87}} + return a, nil +} + +var _scriptsDependencyAuditGet_failure_probabilityCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcb\x31\x0a\xc2\x50\x0c\x06\xe0\x3d\xa7\xf8\xe9\xd4\xb7\x38\x89\x83\x9b\x28\x9d\x5d\x3c\x40\xfa\x1a\x25\xf0\x9a\x96\x34\x01\x8b\x78\x77\x77\x0f\xf0\xe9\xbc\x2e\x1e\xe8\x6e\xb2\x8a\x4d\x62\x75\xbf\xe4\xa4\xd1\x11\x71\xad\xb2\x6d\x3d\xb7\x56\xf0\x4c\xc3\xcc\x6a\x7d\x39\xe3\x31\xe8\xfb\x74\xc4\x87\x00\xc0\x25\xd2\x0d\x7f\xfa\xf0\x92\xb8\xa6\xbb\x58\x0c\xac\x2d\x5d\xee\xbe\x8c\x3c\x6a\xd3\xd8\xfb\x42\x5f\xfa\x05\x00\x00\xff\xff\x59\x52\xf9\xce\x77\x00\x00\x00" + +func scriptsDependencyAuditGet_failure_probabilityCdcBytes() ([]byte, error) { + return bindataRead( + _scriptsDependencyAuditGet_failure_probabilityCdc, + "scripts/dependency-audit/get_failure_probability.cdc", + ) +} + +func scriptsDependencyAuditGet_failure_probabilityCdc() (*asset, error) { + bytes, err := scriptsDependencyAuditGet_failure_probabilityCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "scripts/dependency-audit/get_failure_probability.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x25, 0x2c, 0x52, 0x3d, 0x25, 0x8b, 0x9d, 0x24, 0xd8, 0xa5, 0xac, 0x78, 0xf1, 0xdb, 0xf, 0x59, 0xed, 0x43, 0x0, 0x76, 0x28, 0x53, 0x9d, 0x3d, 0xd4, 0xdf, 0x84, 0x10, 0x22, 0xec, 0x8c, 0x83}} + return a, nil +} + +var _scriptsDependencyAuditGet_should_panic_on_unstagedCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcb\xb1\x0d\x02\x31\x0c\x05\xd0\xde\x53\x7c\x5d\x75\xd7\x30\x00\x1d\x88\x9e\x8a\x01\xac\xc4\x20\x4b\xc9\x4f\x94\x38\x05\x42\xec\x4e\xcf\x00\xcf\x6b\x6f\x23\xb0\xdd\xac\x1b\xb3\x31\xbd\x2f\x2b\x7b\x6c\x22\x9a\x92\xcd\xb9\x6b\x29\x07\x9e\x8b\xa8\xea\xdc\x8f\x33\xae\xad\x15\x53\xe2\x23\x00\x30\x2c\xd6\x20\xfe\xf8\xa9\x2b\x3d\xdd\xf9\xe0\x0c\x7d\x59\x96\xaf\xfc\x02\x00\x00\xff\xff\x0f\x10\x1a\x81\x69\x00\x00\x00" + +func scriptsDependencyAuditGet_should_panic_on_unstagedCdcBytes() ([]byte, error) { + return bindataRead( + _scriptsDependencyAuditGet_should_panic_on_unstagedCdc, + "scripts/dependency-audit/get_should_panic_on_unstaged.cdc", + ) +} + +func scriptsDependencyAuditGet_should_panic_on_unstagedCdc() (*asset, error) { + bytes, err := scriptsDependencyAuditGet_should_panic_on_unstagedCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "scripts/dependency-audit/get_should_panic_on_unstaged.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdf, 0x3b, 0xc1, 0xae, 0x90, 0xfb, 0xde, 0xf9, 0x34, 0x5b, 0x6c, 0xeb, 0x29, 0x39, 0xf3, 0x78, 0x9f, 0x33, 0x6e, 0xaa, 0xe8, 0xdc, 0xbe, 0xb8, 0xef, 0x75, 0xc2, 0x17, 0x60, 0xba, 0xcd, 0x64}} + return a, nil +} + var _scriptsMigrationContractStagingGet_all_staged_contract_code_for_addressCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x91\xcd\x6a\xeb\x30\x10\x85\xf7\x7a\x8a\x83\xef\xc6\x86\x5c\xe7\x66\xeb\x5d\xc8\xe2\xae\xba\x69\xe8\x03\xa8\xd6\x58\x19\x90\x47\x46\x9a\x84\x96\x90\x77\x2f\xf2\x4f\x0a\x85\xae\x0c\xe3\x99\xef\x3b\x1c\xf1\x38\xc5\xa4\xa8\x5e\xd8\x27\xab\x1c\xe5\x14\x45\x93\xed\xf5\xac\xd6\xb3\xf8\xca\x98\x3f\x2c\x4a\x65\xc4\x51\x50\x1b\x00\xb8\x51\xca\x1c\xa5\x43\x75\x68\x0f\xed\xbf\x6a\x37\x4f\x95\x35\x50\x87\xea\x3f\x29\x8e\x21\xa0\x20\xc8\x61\x23\xe2\x14\x1d\x61\x88\x09\x47\xe7\x12\xe5\xbc\x9e\x39\xca\x7d\xe2\x49\x17\xe0\x2b\xe9\x35\x49\x86\xc5\x68\xa7\x89\xc5\x23\x0e\xb0\x21\xa0\xdf\x30\x7d\xc1\xe4\x85\x5d\x68\x16\x9e\x6f\x24\xb0\x0b\x15\x2c\x8e\x3e\xc8\x21\x0a\xf4\x42\xdf\x77\x62\x47\x6a\x57\x67\xb0\xe2\xaf\xd6\x97\xb4\x24\x7f\xdf\xce\xd5\xce\x34\xc6\xec\xf7\x7b\x6c\xfe\xe5\x74\x0d\x5c\xfc\xab\x71\xc3\x65\x5c\x62\x56\x72\x78\xff\x9c\x77\x97\x0c\x4f\xd9\x1a\xa6\x2d\x4c\x63\xfb\x9e\x72\xae\x6d\x08\x0d\x86\xab\x60\xb4\x2c\xf5\xb6\xba\x96\xd1\x6d\xad\x34\x1d\xee\x67\x4d\x2c\xbe\xc3\xf2\x7d\xe0\x3e\x87\x4e\x73\x34\xfc\xf6\x54\xad\x27\x3d\x86\xb0\xb4\xbe\xfd\x2b\x9d\xd7\x43\x4c\x4f\xcb\x0f\x6d\x63\x1e\xe6\x2b\x00\x00\xff\xff\xa3\x37\xd2\x4e\x04\x02\x00\x00" func scriptsMigrationContractStagingGet_all_staged_contract_code_for_addressCdcBytes() ([]byte, error) { @@ -1085,6 +1148,9 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ "scripts/delegatee/check_delegatee_has_valid_updater_cap.cdc": scriptsDelegateeCheck_delegatee_has_valid_updater_capCdc, + "scripts/dependency-audit/get_boundaries.cdc": scriptsDependencyAuditGet_boundariesCdc, + "scripts/dependency-audit/get_failure_probability.cdc": scriptsDependencyAuditGet_failure_probabilityCdc, + "scripts/dependency-audit/get_should_panic_on_unstaged.cdc": scriptsDependencyAuditGet_should_panic_on_unstagedCdc, "scripts/migration-contract-staging/get_all_staged_contract_code_for_address.cdc": scriptsMigrationContractStagingGet_all_staged_contract_code_for_addressCdc, "scripts/migration-contract-staging/get_all_staged_contract_hosts.cdc": scriptsMigrationContractStagingGet_all_staged_contract_hostsCdc, "scripts/migration-contract-staging/get_all_staged_contracts.cdc": scriptsMigrationContractStagingGet_all_staged_contractsCdc, @@ -1178,6 +1244,11 @@ var _bintree = &bintree{nil, map[string]*bintree{ "delegatee": {nil, map[string]*bintree{ "check_delegatee_has_valid_updater_cap.cdc": {scriptsDelegateeCheck_delegatee_has_valid_updater_capCdc, map[string]*bintree{}}, }}, + "dependency-audit": {nil, map[string]*bintree{ + "get_boundaries.cdc": {scriptsDependencyAuditGet_boundariesCdc, map[string]*bintree{}}, + "get_failure_probability.cdc": {scriptsDependencyAuditGet_failure_probabilityCdc, map[string]*bintree{}}, + "get_should_panic_on_unstaged.cdc": {scriptsDependencyAuditGet_should_panic_on_unstagedCdc, map[string]*bintree{}}, + }}, "migration-contract-staging": {nil, map[string]*bintree{ "get_all_staged_contract_code_for_address.cdc": {scriptsMigrationContractStagingGet_all_staged_contract_code_for_addressCdc, map[string]*bintree{}}, "get_all_staged_contract_hosts.cdc": {scriptsMigrationContractStagingGet_all_staged_contract_hostsCdc, map[string]*bintree{}}, diff --git a/scripts/dependency-audit/get_boundaries.cdc b/scripts/dependency-audit/get_boundaries.cdc new file mode 100644 index 0000000..8740605 --- /dev/null +++ b/scripts/dependency-audit/get_boundaries.cdc @@ -0,0 +1,5 @@ +import "DependencyAudit" + +access(all) fun main(): DependencyAudit.Boundaries? { + return DependencyAudit.getBoundaries() +} diff --git a/scripts/dependency-audit/get_failure_probability.cdc b/scripts/dependency-audit/get_failure_probability.cdc new file mode 100644 index 0000000..06e7fc9 --- /dev/null +++ b/scripts/dependency-audit/get_failure_probability.cdc @@ -0,0 +1,5 @@ +import "DependencyAudit" + +access(all) fun main(): UFix64 { + return DependencyAudit.getCurrentFailureProbability() +} diff --git a/scripts/dependency-audit/get_should_panic_on_unstaged.cdc b/scripts/dependency-audit/get_should_panic_on_unstaged.cdc new file mode 100644 index 0000000..0fdbc46 --- /dev/null +++ b/scripts/dependency-audit/get_should_panic_on_unstaged.cdc @@ -0,0 +1,5 @@ +import "DependencyAudit" + +access(all) fun main(): Boolean { + return DependencyAudit.panicOnUnstaged +} diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc index 638bc97..bf4134b 100644 --- a/tests/dependency_audit_tests.cdc +++ b/tests/dependency_audit_tests.cdc @@ -317,6 +317,15 @@ access(all) fun testBoundaries() { ) Test.expect(commitResult, Test.beSucceeded()) + let probability = (executeScript( + "../scripts/dependency-audit/get_failure_probability.cdc", + [] + ).returnValue as! UFix64?)! + + // depends on the block, so its better to check the range + Test.expect(probability, Test.beGreaterThan(0.5)) + Test.expect(probability, Test.beLessThan(0.7)) + var i = 0 var failCount = 0 while i < 10 {